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.

51 lines
1.2 KiB
Nix
Raw Normal View History

2021-09-29 02:43:07 +00:00
{ stdenv
, lib
, fetchFromGitea
, rustPlatform
, makeWrapper
, protobuf
, darwin
2021-09-29 02:43:07 +00:00
, imagemagick
, ffmpeg
, exiftool
, nixosTests
2021-09-29 02:43:07 +00:00
}:
rustPlatform.buildRustPackage rec {
pname = "pict-rs";
2024-05-01 23:14:45 +00:00
version = "0.5.13";
2021-09-29 02:43:07 +00:00
src = fetchFromGitea {
domain = "git.asonix.dog";
owner = "asonix";
repo = pname;
rev = "v${version}";
2024-05-01 23:14:45 +00:00
sha256 = "sha256-zFsxX7pZc8Hm8XcKWZK5zE3XAYmFPT0IJKD0+zazaeI=";
2021-09-29 02:43:07 +00:00
};
2024-05-01 23:14:45 +00:00
cargoHash = "sha256-NjNfMyNEliyJQuwWJ/owyKOz+P5gT8Ov0w298I6A/Bk=";
2021-09-29 02:43:07 +00:00
# needed for internal protobuf c wrapper library
PROTOC = "${protobuf}/bin/protoc";
PROTOC_INCLUDE = "${protobuf}/include";
2021-09-29 08:58:20 +00:00
nativeBuildInputs = [ makeWrapper ];
buildInputs = lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security;
2021-09-29 02:43:07 +00:00
postInstall = ''
wrapProgram "$out/bin/pict-rs" \
--prefix PATH : "${lib.makeBinPath [ imagemagick ffmpeg exiftool ]}"
'';
passthru.tests = { inherit (nixosTests) pict-rs; };
2021-09-29 02:43:07 +00:00
meta = with lib; {
broken = stdenv.isDarwin;
2021-09-29 08:58:20 +00:00
description = "A simple image hosting service";
mainProgram = "pict-rs";
2021-09-29 02:43:07 +00:00
homepage = "https://git.asonix.dog/asonix/pict-rs";
license = with licenses; [ agpl3Plus ];
maintainers = with maintainers; [ happysalada ];
};
}