Skip to content

Commit 6a64387

Browse files
committed
immich-public-proxy: init at 1.5.4
1 parent 6047878 commit 6a64387

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
lib,
3+
buildNpmPackage,
4+
fetchFromGitHub,
5+
nix-update-script,
6+
nodejs,
7+
}:
8+
buildNpmPackage rec {
9+
pname = "immich-public-proxy";
10+
version = "1.5.4";
11+
src = fetchFromGitHub {
12+
owner = "alangrainger";
13+
repo = "immich-public-proxy";
14+
rev = "v${version}";
15+
hash = "sha256-GoAUR8s2tRHpXD/yk42u6DDvkI97XAUlF9Zsq8pb/1M=";
16+
};
17+
18+
sourceRoot = "${src.name}/app";
19+
20+
npmDepsHash = "sha256-BN7g+31ijH8r9rsv5zzjnE8PT7ozAswoyZNJ0XqXGyw=";
21+
22+
# patch in absolute nix store paths so the process doesn't need to cwd in $out
23+
postPatch = ''
24+
substituteInPlace src/index.ts --replace-fail \
25+
"const app = express()" \
26+
"const app = express()
27+
// Set the views path to the nix output
28+
app.set('views', '$out/lib/node_modules/immich-public-proxy/views')" \
29+
--replace-fail \
30+
"static('public'" \
31+
"static('$out/lib/node_modules/immich-public-proxy/public'"
32+
'';
33+
34+
passthru = {
35+
updateScript = nix-update-script { };
36+
};
37+
38+
meta = {
39+
description = "Share your Immich photos and albums in a safe way without exposing your Immich instance to the public";
40+
homepage = "https://github.com/alangrainger/immich-public-proxy";
41+
license = lib.licenses.agpl3Only;
42+
maintainers = with lib.maintainers; [ jaculabilis ];
43+
inherit (nodejs.meta) platforms;
44+
mainProgram = "immich-public-proxy";
45+
};
46+
}

0 commit comments

Comments
 (0)