![Rebecca Turner](/assets/img/avatar_default.png)
A lot of build failures when testing: ``` pict-rs> Executing cargoCheckHook pict-rs> ++ cargo test -j 20 --profile release --target aarch64-apple-darwin --frozen -- --test-threads=20 pict-rs> Compiling ring v0.17.8 pict-rs> Compiling io-uring v0.5.13 pict-rs> Compiling socket2 v0.4.10 pict-rs> Compiling scoped-tls v1.0.1 pict-rs> error[E0425]: cannot find value `MAP_POPULATE` in crate `libc` pict-rs> --> /private/tmp/nix-build-pict-rs-0.5.7.drv-0/pict-rs-0.5.7-vendor.tar.gz/io-uring/src/util.rs:19:42 pict-rs> | pict-rs> 19 | libc::MAP_SHARED | libc::MAP_POPULATE, pict-rs> | ^^^^^^^^^^^^ help: a constant with a similar name exists: `MAP_PRIVATE` pict-rs> | pict-rs> ::: /private/tmp/nix-build-pict-rs-0.5.7.drv-0/pict-rs-0.5.7-vendor.tar.gz/libc/src/unix/bsd/apple/mod.rs:3314:1 ```
50 lines
1.2 KiB
Nix
50 lines
1.2 KiB
Nix
{ stdenv
|
|
, lib
|
|
, fetchFromGitea
|
|
, rustPlatform
|
|
, makeWrapper
|
|
, protobuf
|
|
, darwin
|
|
, imagemagick
|
|
, ffmpeg
|
|
, exiftool
|
|
, nixosTests
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "pict-rs";
|
|
version = "0.5.7";
|
|
|
|
src = fetchFromGitea {
|
|
domain = "git.asonix.dog";
|
|
owner = "asonix";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-MBV92+mu41ulT6wuzTGbobbspoQA0hNbRIiISol0n48=";
|
|
};
|
|
|
|
cargoHash = "sha256-p7s/gs+sMXR1l08C81tY4K3oV9fWgm07C0nRGspfoR8=";
|
|
|
|
# needed for internal protobuf c wrapper library
|
|
PROTOC = "${protobuf}/bin/protoc";
|
|
PROTOC_INCLUDE = "${protobuf}/include";
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
buildInputs = lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security;
|
|
|
|
postInstall = ''
|
|
wrapProgram "$out/bin/pict-rs" \
|
|
--prefix PATH : "${lib.makeBinPath [ imagemagick ffmpeg exiftool ]}"
|
|
'';
|
|
|
|
passthru.tests = { inherit (nixosTests) pict-rs; };
|
|
|
|
meta = with lib; {
|
|
broken = stdenv.isDarwin;
|
|
description = "A simple image hosting service";
|
|
homepage = "https://git.asonix.dog/asonix/pict-rs";
|
|
license = with licenses; [ agpl3Plus ];
|
|
maintainers = with maintainers; [ happysalada ];
|
|
};
|
|
}
|