2023-03-10 01:54:03 +00:00
|
|
|
{ exiftool
|
2024-04-21 19:28:20 +00:00
|
|
|
, ffmpeg6_pict-rs
|
|
|
|
, imagemagick7_pict-rs
|
2023-03-10 01:54:03 +00:00
|
|
|
, lib
|
|
|
|
, makeWrapper
|
|
|
|
, nixosTests
|
|
|
|
, rustPlatform
|
|
|
|
, Security
|
|
|
|
, stdenv
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage {
|
|
|
|
pname = "pict-rs";
|
2024-06-04 16:49:13 +00:00
|
|
|
version = "0.5.15";
|
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
|
|
|
|
2023-11-11 00:42:21 +00:00
|
|
|
nativeBuildInputs = [ stdenv makeWrapper ];
|
2023-03-10 01:54:03 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
|
|
|
|
|
2023-12-13 00:02:54 +00:00
|
|
|
RUSTFLAGS = "--cfg tokio_unstable";
|
2023-11-11 00:42:21 +00:00
|
|
|
TARGET_CC = "${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc";
|
|
|
|
TARGET_AR = "${stdenv.cc}/bin/${stdenv.cc.targetPrefix}ar";
|
|
|
|
|
2023-03-10 01:54:03 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/pict-rs \
|
2024-04-21 19:28:20 +00:00
|
|
|
--prefix PATH : "${lib.makeBinPath [ imagemagick7_pict-rs ffmpeg6_pict-rs 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 ];
|
|
|
|
};
|
|
|
|
}
|