![stuebinm](/assets/img/avatar_default.png)
The nixpkgs-unstable channel's programs.sqlite was used to identify packages producing exactly one binary, and these automatically added to their package definitions wherever possible.
51 lines
1.2 KiB
Nix
51 lines
1.2 KiB
Nix
{ stdenv
|
|
, lib
|
|
, fetchFromGitea
|
|
, rustPlatform
|
|
, makeWrapper
|
|
, protobuf
|
|
, darwin
|
|
, imagemagick
|
|
, ffmpeg
|
|
, exiftool
|
|
, nixosTests
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "pict-rs";
|
|
version = "0.5.9";
|
|
|
|
src = fetchFromGitea {
|
|
domain = "git.asonix.dog";
|
|
owner = "asonix";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-ZRT382ClImnlwvWyA1w7ZIIF4PXr3rWmeIsqJYngkfM=";
|
|
};
|
|
|
|
cargoHash = "sha256-FTb8VoQJFS55CKlQvoWkBQEBUCvUnFaUAxIW22zEIHI=";
|
|
|
|
# needed for internal protobuf c wrapper library
|
|
PROTOC = "${protobuf}/bin/protoc";
|
|
PROTOC_INCLUDE = "${protobuf}/include";
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
buildInputs = lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security;
|
|
|
|
postInstall = ''
|
|
wrapProgram "$out/bin/pict-rs" \
|
|
--prefix PATH : "${lib.makeBinPath [ imagemagick ffmpeg exiftool ]}"
|
|
'';
|
|
|
|
passthru.tests = { inherit (nixosTests) pict-rs; };
|
|
|
|
meta = with lib; {
|
|
broken = stdenv.isDarwin;
|
|
description = "A simple image hosting service";
|
|
mainProgram = "pict-rs";
|
|
homepage = "https://git.asonix.dog/asonix/pict-rs";
|
|
license = with licenses; [ agpl3Plus ];
|
|
maintainers = with maintainers; [ happysalada ];
|
|
};
|
|
}
|