mirror of
https://github.com/danbulant/dotfiles
synced 2026-09-19 06:14:11 +00:00
fixup photoprism+osu
This commit is contained in:
parent
fbab7110c0
commit
dff632373b
3 changed files with 37 additions and 0 deletions
|
|
@ -167,6 +167,11 @@
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
photoprismOverlay = final: prev: {
|
||||||
|
photoprism = final.callPackage ./pkgs/photoprism/package.nix {
|
||||||
|
photoprism = prev.photoprism;
|
||||||
|
};
|
||||||
|
};
|
||||||
desktopCompatibilityOverlay = _: prev: {
|
desktopCompatibilityOverlay = _: prev: {
|
||||||
codex =
|
codex =
|
||||||
let
|
let
|
||||||
|
|
@ -271,6 +276,7 @@
|
||||||
desktopCompatibilityOverlay
|
desktopCompatibilityOverlay
|
||||||
pyfilesystemOverlay
|
pyfilesystemOverlay
|
||||||
spacedriveOverlay
|
spacedriveOverlay
|
||||||
|
photoprismOverlay
|
||||||
];
|
];
|
||||||
networking.hostName = "fern";
|
networking.hostName = "fern";
|
||||||
imports = [ ./servers/fern/hardware-configuration.nix ];
|
imports = [ ./servers/fern/hardware-configuration.nix ];
|
||||||
|
|
|
||||||
30
pkgs/photoprism/package.nix
Normal file
30
pkgs/photoprism/package.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
{
|
||||||
|
fetchurl,
|
||||||
|
fetchzip,
|
||||||
|
photoprism,
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
scrfd = fetchurl {
|
||||||
|
url = "https://raw.githubusercontent.com/laolaolulu/FaceTrain/master/model/scrfd/scrfd_500m_bnkps_shape640x640.onnx";
|
||||||
|
hash = "sha256-rnIYVlPieaogVrKIZioZ7DUZztVCbSre/74FioY2miQ=";
|
||||||
|
};
|
||||||
|
|
||||||
|
onnxruntime = fetchzip {
|
||||||
|
url = "https://github.com/microsoft/onnxruntime/releases/download/v1.26.0/onnxruntime-linux-x64-1.26.0.tgz";
|
||||||
|
hash = "sha256-pSA5JzCpVYMhP0r2l2pyYXhgBYtPOOCEKY0eG9TnXCM=";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
photoprism.overrideAttrs (old: {
|
||||||
|
postInstall = (old.postInstall or "") + ''
|
||||||
|
mkdir -p "$out/share/photoprism/models/scrfd"
|
||||||
|
ln -s ${scrfd} "$out/share/photoprism/models/scrfd/scrfd.onnx"
|
||||||
|
|
||||||
|
wrapProgram "$out/bin/photoprism" \
|
||||||
|
--prefix LD_LIBRARY_PATH : "${onnxruntime}/lib"
|
||||||
|
'';
|
||||||
|
|
||||||
|
passthru = (old.passthru or { }) // {
|
||||||
|
inherit onnxruntime scrfd;
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
@ -336,6 +336,7 @@
|
||||||
mesa
|
mesa
|
||||||
libxkbcommon
|
libxkbcommon
|
||||||
openssl
|
openssl
|
||||||
|
icu
|
||||||
libGL
|
libGL
|
||||||
libva
|
libva
|
||||||
libelf
|
libelf
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue