mirror of
https://git.asonix.dog/asonix/pict-rs
synced 2024-11-01 10:09:57 +00:00
42 lines
891 B
Nix
42 lines
891 B
Nix
{ exiftool
|
|
, ffmpeg_6-full
|
|
, imagemagick
|
|
, lib
|
|
, makeWrapper
|
|
, nixosTests
|
|
, protobuf
|
|
, rustPlatform
|
|
, Security
|
|
, stdenv
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage {
|
|
pname = "pict-rs";
|
|
version = "0.5.0-alpha.19";
|
|
src = ./.;
|
|
|
|
cargoLock = {
|
|
lockFile = ./Cargo.lock;
|
|
};
|
|
|
|
PROTOC = "${protobuf}/bin/protoc";
|
|
PROTOC_INCLUDE = "${protobuf}/include";
|
|
|
|
RUSTFLAGS = "--cfg tokio_unstable --cfg uuid_unstable";
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
|
|
|
|
postInstall = ''
|
|
wrapProgram $out/bin/pict-rs \
|
|
--prefix PATH : "${lib.makeBinPath [ imagemagick ffmpeg_6-full exiftool ]}"
|
|
'';
|
|
|
|
passthru.tests = { inherit (nixosTests) pict-rs; };
|
|
|
|
meta = with lib; {
|
|
description = "A simple image hosting service";
|
|
homepage = "https://git.asonix.dog/asonix/pict-rs";
|
|
license = with licenses; [ agpl3Plus ];
|
|
};
|
|
}
|