diff --git a/pkgs/servers/photoprism/default.nix b/pkgs/servers/photoprism/default.nix index 4c5fb08c30df..678f30c372d0 100644 --- a/pkgs/servers/photoprism/default.nix +++ b/pkgs/servers/photoprism/default.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, stdenv, fetchFromGitHub, fetchzip, darktable, rawtherapee, ffmpeg, libheif, exiftool, nixosTests, makeWrapper }: +{ pkgs, lib, stdenv, fetchFromGitHub, fetchzip, darktable, rawtherapee, ffmpeg, libheif, exiftool, makeWrapper, testers }: let version = "221102-905925b4d"; @@ -74,7 +74,7 @@ stdenv.mkDerivation { runHook postInstall ''; - passthru.tests.photoprism = nixosTests.photoprism; + passthru.tests.version = testers.testVersion { package = pkgs.photoprism; }; meta = with lib; { homepage = "https://photoprism.app"; diff --git a/pkgs/servers/photoprism/libtensorflow.nix b/pkgs/servers/photoprism/libtensorflow.nix index 869f9fc8da1c..e1c8f9338cc8 100644 --- a/pkgs/servers/photoprism/libtensorflow.nix +++ b/pkgs/servers/photoprism/libtensorflow.nix @@ -15,12 +15,14 @@ stdenv.mkDerivation rec { aarch64-linux = "sha256-qnj4vhSWgrk8SIjzIH1/4waMxMsxMUvqdYZPaSaUJRk="; }.${system}; - url = let - systemName = { - x86_64-linux = "amd64"; - aarch64-linux = "arm64"; - }.${system}; - in "https://dl.photoprism.app/tensorflow/${systemName}/libtensorflow-${systemName}-${version}.tar.gz"; + url = + let + systemName = { + x86_64-linux = "amd64"; + aarch64-linux = "arm64"; + }.${system}; + in + "https://dl.photoprism.app/tensorflow/${systemName}/libtensorflow-${systemName}-${version}.tar.gz"; }) # Upstream tensorflow tarball (with .h's photoprism's tarball is missing) (fetchurl { @@ -49,13 +51,15 @@ stdenv.mkDerivation rec { ''; # Patch library to use our libc, libstdc++ and others - patchPhase = let - rpath = lib.makeLibraryPath [ stdenv.cc.libc stdenv.cc.cc.lib ]; - in '' - chmod -R +w lib - patchelf --set-rpath "${rpath}:$out/lib" lib/libtensorflow.so - patchelf --set-rpath "${rpath}" lib/libtensorflow_framework.so - ''; + patchPhase = + let + rpath = lib.makeLibraryPath [ stdenv.cc.libc stdenv.cc.cc.lib ]; + in + '' + chmod -R +w lib + patchelf --set-rpath "${rpath}:$out/lib" lib/libtensorflow.so + patchelf --set-rpath "${rpath}" lib/libtensorflow_framework.so + ''; buildPhase = '' # Write pkg-config file.