2023-03-10 01:54:03 +00:00
|
|
|
{ exiftool
|
2023-06-19 20:46:23 +00:00
|
|
|
, ffmpeg_6-full
|
2023-03-10 01:54:03 +00:00
|
|
|
, imagemagick
|
|
|
|
, lib
|
|
|
|
, makeWrapper
|
|
|
|
, nixosTests
|
|
|
|
, protobuf
|
|
|
|
, rustPlatform
|
|
|
|
, Security
|
|
|
|
, stdenv
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage {
|
|
|
|
pname = "pict-rs";
|
2023-08-28 23:44:13 +00:00
|
|
|
version = "0.5.0-alpha.14";
|
2023-03-10 01:54:03 +00:00
|
|
|
src = ./.;
|
2023-05-23 23:54:33 +00:00
|
|
|
|
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
};
|
2023-03-10 01:54:03 +00:00
|
|
|
|
|
|
|
PROTOC = "${protobuf}/bin/protoc";
|
|
|
|
PROTOC_INCLUDE = "${protobuf}/include";
|
|
|
|
|
2023-08-18 16:35:04 +00:00
|
|
|
RUSTFLAGS = "--cfg tokio_unstable --cfg uuid_unstable";
|
|
|
|
|
2023-03-10 01:54:03 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/pict-rs \
|
2023-06-19 20:46:23 +00:00
|
|
|
--prefix PATH : "${lib.makeBinPath [ imagemagick ffmpeg_6-full exiftool ]}"
|
2023-03-10 01:54:03 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|