mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
photofield: init at 0.10.3
This commit is contained in:
parent
75b4d0ff2b
commit
ab0e7fbedc
70
pkgs/servers/photofield/default.nix
Normal file
70
pkgs/servers/photofield/default.nix
Normal file
@ -0,0 +1,70 @@
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, buildGoModule
|
||||
, buildNpmPackage
|
||||
, makeWrapper
|
||||
, exiftool
|
||||
, ffmpeg
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "photofield-ui";
|
||||
version = "0.10.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "SmilyOrg";
|
||||
repo = "photofield";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-OrLsthhnjX6LWehwiBDRzhCmTp3IBsbu9WKVu0zhgaQ=";
|
||||
};
|
||||
|
||||
webui = buildNpmPackage {
|
||||
inherit src version;
|
||||
pname = "photofield-ui";
|
||||
|
||||
sourceRoot = "source/ui";
|
||||
|
||||
npmDepsHash = "sha256-YVyaZsFh5bolDzMd5rXWrbbXQZBeEIV6Fh/kwN+rvPk=";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share
|
||||
mv dist $out/share/photofield-ui
|
||||
'';
|
||||
};
|
||||
in
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "photofield";
|
||||
inherit version src;
|
||||
|
||||
vendorHash = "sha256-g6jRfPALBAgZVuljq/JiCpea7gZl/8akiabxjRmDsFs=";
|
||||
|
||||
preBuild = ''
|
||||
cp -r ${webui}/share/photofield-ui ui/dist
|
||||
'';
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X main.version=${version}"
|
||||
"-X main.builtBy=Nix"
|
||||
];
|
||||
|
||||
tags = [ "embedstatic" ];
|
||||
|
||||
doCheck = false; # tries to modify filesytem
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/photofield \
|
||||
--prefix PATH : "${lib.makeBinPath [exiftool ffmpeg]}"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Experimental fast photo viewer";
|
||||
homepage = "https://github.com/SmilyOrg/photofield";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ dit7ya ];
|
||||
};
|
||||
}
|
@ -5585,6 +5585,8 @@ with pkgs;
|
||||
|
||||
photon = callPackage ../tools/networking/photon { };
|
||||
|
||||
photofield = callPackage ../servers/photofield { };
|
||||
|
||||
photoprism = callPackage ../servers/photoprism { };
|
||||
|
||||
piglit = callPackage ../tools/graphics/piglit { };
|
||||
|
Loading…
Reference in New Issue
Block a user