pict-rs/pict-rs.nix
asonix 7021c50156
All checks were successful
/ check (aarch64-unknown-linux-musl) (push) Successful in 2m54s
/ check (armv7-unknown-linux-musleabihf) (push) Successful in 3m0s
/ check (x86_64-unknown-linux-musl) (push) Successful in 2m24s
/ tests (push) Successful in 1m52s
/ publish-docker (push) Successful in 16s
/ publish-crate (push) Successful in 2m57s
/ clippy (push) Successful in 2m5s
/ build (map[artifact:linux-arm32v7 platform:linux/arm/v7 target:armv7-unknown-linux-musleabihf]) (push) Successful in 6m10s
/ build (map[artifact:linux-amd64 platform:linux/amd64 target:x86_64-unknown-linux-musl]) (push) Successful in 5m52s
/ build (map[artifact:linux-arm64v8 platform:linux/arm64 target:aarch64-unknown-linux-musl]) (push) Successful in 5m4s
/ publish-forgejo (push) Successful in 13s
Prepare 0.5.8
2024-03-10 22:48:11 -05:00

41 lines
902 B
Nix

{ exiftool
, ffmpeg_6-full
, imagemagick
, lib
, makeWrapper
, nixosTests
, rustPlatform
, Security
, stdenv
}:
rustPlatform.buildRustPackage {
pname = "pict-rs";
version = "0.5.8";
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 [ 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 ];
};
}