ajs124 2024-07-31 18:52:05 +02:00 committed by Pascal Bach
parent 41d395c8a9
commit 614af05b77
3 changed files with 17 additions and 7 deletions

View File

@ -1,12 +1,20 @@
{ lib, buildGoModule, coreutils, libtensorflow, src, version, ... }: { lib, buildGoModule, coreutils, libtensorflow, src, version
, pkg-config
, vips
}:
buildGoModule rec { buildGoModule rec {
inherit src version; inherit src version;
pname = "photoprism-backend"; pname = "photoprism-backend";
nativeBuildInputs = [
pkg-config
];
buildInputs = [ buildInputs = [
coreutils coreutils
libtensorflow libtensorflow
vips
]; ];
ldflags = [ ldflags = [
@ -19,7 +27,7 @@ buildGoModule rec {
substituteInPlace internal/commands/passwd.go --replace '/bin/stty' "${coreutils}/bin/stty" substituteInPlace internal/commands/passwd.go --replace '/bin/stty' "${coreutils}/bin/stty"
''; '';
vendorHash = "sha256-ogJ/FwWJt1L0NGKX29tqWmHo4WslzC7ck5r7vn5PEuY="; vendorHash = "sha256-6xE1j/Vh9ltE6TpBkvjK4rzLyXv8OJzy84vf9Iqw3yU=";
subPackages = [ "cmd/photoprism" ]; subPackages = [ "cmd/photoprism" ];

View File

@ -1,14 +1,15 @@
{ pkgs, lib, stdenv, fetchFromGitHub, fetchzip, darktable, rawtherapee, ffmpeg, libheif, exiftool, imagemagick, makeWrapper, testers }: { pkgs, lib, stdenv, fetchFromGitHub, fetchzip, darktable, rawtherapee, ffmpeg_7, libheif, exiftool, imagemagick, makeWrapper, testers
, librsvg }:
let let
version = "240420-ef5f14bc4"; version = "240711-2197af848";
pname = "photoprism"; pname = "photoprism";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = pname; owner = pname;
repo = pname; repo = pname;
rev = version; rev = version;
hash = "sha256-oJRd4eTwoTYKAJAsG9y0mnG+zF+eeLlSXNgaKLcb43w="; hash = "sha256-ihDv5c5RUjDbFcAHJjzp/8qCwKfA+rlFXPziaYarzs8=";
}; };
libtensorflow = pkgs.callPackage ./libtensorflow.nix { }; libtensorflow = pkgs.callPackage ./libtensorflow.nix { };
@ -61,7 +62,8 @@ stdenv.mkDerivation {
--set PHOTOPRISM_DARKTABLE_BIN ${darktable}/bin/darktable-cli \ --set PHOTOPRISM_DARKTABLE_BIN ${darktable}/bin/darktable-cli \
--set PHOTOPRISM_RAWTHERAPEE_BIN ${rawtherapee}/bin/rawtherapee-cli \ --set PHOTOPRISM_RAWTHERAPEE_BIN ${rawtherapee}/bin/rawtherapee-cli \
--set PHOTOPRISM_HEIFCONVERT_BIN ${libheif}/bin/heif-convert \ --set PHOTOPRISM_HEIFCONVERT_BIN ${libheif}/bin/heif-convert \
--set PHOTOPRISM_FFMPEG_BIN ${ffmpeg}/bin/ffmpeg \ --set PHOTOPRISM_RSVGCONVERT_BIN ${librsvg}/bin/rsvg-convert \
--set PHOTOPRISM_FFMPEG_BIN ${ffmpeg_7}/bin/ffmpeg \
--set PHOTOPRISM_EXIFTOOL_BIN ${exiftool}/bin/exiftool \ --set PHOTOPRISM_EXIFTOOL_BIN ${exiftool}/bin/exiftool \
--set PHOTOPRISM_IMAGEMAGICK_BIN ${imagemagick}/bin/convert --set PHOTOPRISM_IMAGEMAGICK_BIN ${imagemagick}/bin/convert

View File

@ -8,7 +8,7 @@ buildNpmPackage {
cd frontend cd frontend
''; '';
npmDepsHash = "sha256-mgDg6awsEHkZyMzvFLwlfXGjdvjtwkNJiiNcnRBSJVo="; npmDepsHash = "sha256-y2Mj0sJP2urTDrsVPReVFi7G9fLjuKz76vDPLvkaMFA=";
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall