pict-rs/pict-rs.nix
asonix 1c4e343d9d
All checks were successful
/ check (aarch64-unknown-linux-musl) (push) Successful in 3m32s
/ check (armv7-unknown-linux-musleabihf) (push) Successful in 3m31s
/ check (x86_64-unknown-linux-musl) (push) Successful in 2m41s
/ tests (push) Successful in 1m56s
/ clippy (push) Successful in 2m23s
/ build (map[artifact:linux-amd64 platform:linux/amd64 target:x86_64-unknown-linux-musl]) (push) Successful in 6m41s
/ build (map[artifact:linux-arm64v8 platform:linux/arm64 target:aarch64-unknown-linux-musl]) (push) Successful in 4m7s
/ build (map[artifact:linux-arm32v7 platform:linux/arm/v7 target:armv7-unknown-linux-musleabihf]) (push) Successful in 6m45s
/ publish-docker (push) Successful in 15s
/ publish-forgejo (push) Successful in 20s
/ publish-crate (push) Successful in 1m55s
Prepare 0.5.14
2024-05-20 22:23:08 -05:00

40 lines
925 B
Nix

{ exiftool
, ffmpeg6_pict-rs
, imagemagick7_pict-rs
, lib
, makeWrapper
, nixosTests
, rustPlatform
, Security
, stdenv
}:
rustPlatform.buildRustPackage {
pname = "pict-rs";
version = "0.5.14";
src = ./.;
cargoLock = {
lockFile = ./Cargo.lock;
};
nativeBuildInputs = [ stdenv makeWrapper ];
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
RUSTFLAGS = "--cfg tokio_unstable";
TARGET_CC = "${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc";
TARGET_AR = "${stdenv.cc}/bin/${stdenv.cc.targetPrefix}ar";
postInstall = ''
wrapProgram $out/bin/pict-rs \
--prefix PATH : "${lib.makeBinPath [ imagemagick7_pict-rs ffmpeg6_pict-rs 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 ];
};
}