File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed
pkgs/by-name/im/immich-public-proxy Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments