Merge pull request #201889 from BeneSim/photoprism-change-tests
photoprism: add valid passthru test
This commit is contained in:
commit
bf337d217d
2 changed files with 19 additions and 15 deletions
|
@ -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
|
let
|
||||||
version = "221102-905925b4d";
|
version = "221102-905925b4d";
|
||||||
|
@ -74,7 +74,7 @@ stdenv.mkDerivation {
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru.tests.photoprism = nixosTests.photoprism;
|
passthru.tests.version = testers.testVersion { package = pkgs.photoprism; };
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://photoprism.app";
|
homepage = "https://photoprism.app";
|
||||||
|
|
|
@ -15,12 +15,14 @@ stdenv.mkDerivation rec {
|
||||||
aarch64-linux = "sha256-qnj4vhSWgrk8SIjzIH1/4waMxMsxMUvqdYZPaSaUJRk=";
|
aarch64-linux = "sha256-qnj4vhSWgrk8SIjzIH1/4waMxMsxMUvqdYZPaSaUJRk=";
|
||||||
}.${system};
|
}.${system};
|
||||||
|
|
||||||
url = let
|
url =
|
||||||
systemName = {
|
let
|
||||||
x86_64-linux = "amd64";
|
systemName = {
|
||||||
aarch64-linux = "arm64";
|
x86_64-linux = "amd64";
|
||||||
}.${system};
|
aarch64-linux = "arm64";
|
||||||
in "https://dl.photoprism.app/tensorflow/${systemName}/libtensorflow-${systemName}-${version}.tar.gz";
|
}.${system};
|
||||||
|
in
|
||||||
|
"https://dl.photoprism.app/tensorflow/${systemName}/libtensorflow-${systemName}-${version}.tar.gz";
|
||||||
})
|
})
|
||||||
# Upstream tensorflow tarball (with .h's photoprism's tarball is missing)
|
# Upstream tensorflow tarball (with .h's photoprism's tarball is missing)
|
||||||
(fetchurl {
|
(fetchurl {
|
||||||
|
@ -49,13 +51,15 @@ stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Patch library to use our libc, libstdc++ and others
|
# Patch library to use our libc, libstdc++ and others
|
||||||
patchPhase = let
|
patchPhase =
|
||||||
rpath = lib.makeLibraryPath [ stdenv.cc.libc stdenv.cc.cc.lib ];
|
let
|
||||||
in ''
|
rpath = lib.makeLibraryPath [ stdenv.cc.libc stdenv.cc.cc.lib ];
|
||||||
chmod -R +w lib
|
in
|
||||||
patchelf --set-rpath "${rpath}:$out/lib" lib/libtensorflow.so
|
''
|
||||||
patchelf --set-rpath "${rpath}" lib/libtensorflow_framework.so
|
chmod -R +w lib
|
||||||
'';
|
patchelf --set-rpath "${rpath}:$out/lib" lib/libtensorflow.so
|
||||||
|
patchelf --set-rpath "${rpath}" lib/libtensorflow_framework.so
|
||||||
|
'';
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
# Write pkg-config file.
|
# Write pkg-config file.
|
||||||
|
|
Loading…
Reference in a new issue