mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-09 14:33:22 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
55 lines
1.2 KiB
Nix
55 lines
1.2 KiB
Nix
{ stdenv
|
|
, lib
|
|
, fetchFromGitea
|
|
, rustPlatform
|
|
, makeWrapper
|
|
, protobuf
|
|
, Security
|
|
, imagemagick
|
|
, ffmpeg
|
|
, exiftool
|
|
, nixosTests
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "pict-rs";
|
|
version = "0.3.3";
|
|
|
|
src = fetchFromGitea {
|
|
domain = "git.asonix.dog";
|
|
owner = "asonix";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "mEZBFDR+/aMRFw54Yq+f1gyEz8H+5IggNCpzv3UdDFg=";
|
|
};
|
|
|
|
cargoLock = {
|
|
lockFile = ./Cargo-0.3.lock;
|
|
outputHashes = {
|
|
"aws-creds-0.29.1" = "bwDFmDPThMLrpaB7cAj/2/vJKhbX6/DqgcIRBVKSZhg=";
|
|
};
|
|
};
|
|
|
|
# needed for internal protobuf c wrapper library
|
|
PROTOC = "${protobuf}/bin/protoc";
|
|
PROTOC_INCLUDE = "${protobuf}/include";
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ];
|
|
|
|
postInstall = ''
|
|
wrapProgram "$out/bin/pict-rs" \
|
|
--prefix PATH : "${lib.makeBinPath [ imagemagick ffmpeg exiftool ]}"
|
|
'';
|
|
|
|
passthru.tests = { inherit (nixosTests) pict-rs; };
|
|
|
|
meta = with lib; {
|
|
description = "Simple image hosting service";
|
|
mainProgram = "pict-rs";
|
|
homepage = "https://git.asonix.dog/asonix/pict-rs";
|
|
license = with licenses; [ agpl3Plus ];
|
|
maintainers = with maintainers; [ happysalada ];
|
|
};
|
|
}
|