nixpkgs/pkgs/servers/web-apps/pict-rs/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
1.1 KiB
Nix
Raw Normal View History

2021-09-29 03:43:07 +01:00
{ stdenv
, lib
, fetchFromGitea
, rustPlatform
, makeWrapper
, protobuf
, Security
, imagemagick
, ffmpeg
, exiftool
, nixosTests
2021-09-29 03:43:07 +01:00
}:
rustPlatform.buildRustPackage rec {
pname = "pict-rs";
version = "0.3.0-alpha.37";
src = fetchFromGitea {
domain = "git.asonix.dog";
owner = "asonix";
repo = pname;
rev = "v${version}";
sha256 = "sha256-21yfsCicn2bjSNEMMWDG8wvnw10uT3M1L3cXCUhc24c=";
};
cargoSha256 = "sha256-F/mqdIjF5QOq5Plnq0DyeFP1+b7dCBcoU9iFxzcaZws=";
# needed for internal protobuf c wrapper library
PROTOC = "${protobuf}/bin/protoc";
PROTOC_INCLUDE = "${protobuf}/include";
2021-09-29 09:58:20 +01:00
nativeBuildInputs = [ makeWrapper ];
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
2021-09-29 03:43:07 +01:00
postInstall = ''
wrapProgram "$out/bin/pict-rs" \
--prefix PATH : "${lib.makeBinPath [ imagemagick ffmpeg exiftool ]}"
'';
passthru.tests = { inherit (nixosTests) pict-rs; };
2021-09-29 03:43:07 +01:00
meta = with lib; {
2021-09-29 09:58:20 +01:00
description = "A simple image hosting service";
2021-09-29 03:43:07 +01:00
homepage = "https://git.asonix.dog/asonix/pict-rs";
license = with licenses; [ agpl3Plus ];
maintainers = with maintainers; [ happysalada ];
};
}