2
0
Fork 0
mirror of https://git.asonix.dog/asonix/pict-rs synced 2024-12-25 03:51:24 +00:00
pict-rs/pict-rs.nix
2023-12-08 20:19:52 -06:00

36 lines
732 B
Nix

{ exiftool
, ffmpeg_6-full
, imagemagick
, lib
, makeWrapper
, nixosTests
, rustPlatform
, Security
, stdenv
}:
rustPlatform.buildRustPackage {
pname = "pict-rs";
version = "0.4.6";
src = ./.;
cargoLock = {
lockFile = ./Cargo.lock;
};
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 ];
};
}