Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
52 lines
1.5 KiB
Nix
52 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
buildNpmPackage,
|
|
fetchFromGitHub,
|
|
nix-update-script,
|
|
nixosTests,
|
|
nodejs,
|
|
}:
|
|
buildNpmPackage rec {
|
|
pname = "immich-public-proxy";
|
|
version = "1.13.2";
|
|
src = fetchFromGitHub {
|
|
owner = "alangrainger";
|
|
repo = "immich-public-proxy";
|
|
tag = "v${version}";
|
|
hash = "sha256-AoRqlTEwcS+RhN59/opqlYAftihmN20mW6Vn6RbLzSw=";
|
|
};
|
|
|
|
sourceRoot = "${src.name}/app";
|
|
|
|
npmDepsHash = "sha256-ZH1D0Q5SCoOwr8CLe2HLMy4xJoO3VLha4MfE9fBmhec=";
|
|
|
|
# patch in absolute nix store paths so the process doesn't need to cwd in $out
|
|
postPatch = ''
|
|
substituteInPlace src/index.ts --replace-fail \
|
|
"const app = express()" \
|
|
"const app = express()
|
|
// Set the views path to the nix output
|
|
app.set('views', '$out/lib/node_modules/immich-public-proxy/views')" \
|
|
--replace-fail \
|
|
"static('public'" \
|
|
"static('$out/lib/node_modules/immich-public-proxy/public'"
|
|
'';
|
|
|
|
passthru = {
|
|
tests = {
|
|
inherit (nixosTests) immich-public-proxy;
|
|
};
|
|
updateScript = nix-update-script { };
|
|
};
|
|
|
|
meta = {
|
|
changelog = "https://github.com/alangrainger/immich-public-proxy/releases/tag/${src.tag}";
|
|
description = "Share your Immich photos and albums in a safe way without exposing your Immich instance to the public";
|
|
homepage = "https://github.com/alangrainger/immich-public-proxy";
|
|
license = lib.licenses.agpl3Only;
|
|
maintainers = with lib.maintainers; [ jaculabilis ];
|
|
inherit (nodejs.meta) platforms;
|
|
mainProgram = "immich-public-proxy";
|
|
};
|
|
}
|