File tree Expand file tree Collapse file tree 1 file changed +33
-12
lines changed
pkgs/by-name/fi/filebrowser Expand file tree Collapse file tree 1 file changed +33
-12
lines changed Original file line number Diff line number Diff line change 11{
2- buildGo123Module ,
3- buildNpmPackage ,
4- fetchFromGitHub ,
52 lib ,
3+ stdenv ,
4+ fetchFromGitHub ,
5+ buildGo123Module ,
6+
7+ nodejs_22 ,
8+ pnpm_9 ,
69} :
710
811let
9- version = "2.31.0" ;
12+ version = "2.32.0" ;
13+
14+ pnpm = pnpm_9 ;
15+ nodejs = nodejs_22 ;
1016
1117 src = fetchFromGitHub {
1218 owner = "filebrowser" ;
1319 repo = "filebrowser" ;
1420 rev = "v${ version } " ;
15- hash = "sha256-zLM1fLrucIhzGdTTDu81ZnTIipK+iRnPhgfMiT1P+yg =" ;
21+ hash = "sha256-jckwk45pIRrlzZaG3jH8aLq08L5xnrbt4OdwKNS6+nI =" ;
1622 } ;
1723
18- frontend = buildNpmPackage rec {
24+ frontend = stdenv . mkDerivation ( finalAttrs : {
1925 pname = "filebrowser-frontend" ;
2026 inherit version src ;
2127
22- sourceRoot = "${ src . name } /frontend" ;
28+ nativeBuildInputs = [
29+ nodejs
30+ pnpm . configHook
31+ ] ;
2332
24- npmDepsHash = "sha256-5/yEMWkNPAS8/PkaHlPBGFLiJu7xK2GHYo5dYqHAfCE= " ;
33+ pnpmRoot = "frontend " ;
2534
26- NODE_OPTIONS = "--openssl-legacy-provider" ;
35+ pnpmDeps = pnpm . fetchDeps {
36+ inherit ( finalAttrs ) pname version src ;
37+ sourceRoot = "${ src . name } /frontend" ;
38+ hash = "sha256-L3cKAp0vvLW5QPz6vYTtZwzuIN70EObU3SyJOlA0Ehc=" ;
39+ } ;
2740
2841 installPhase = ''
2942 runHook preInstall
3043
44+ pnpm install -C frontend --frozen-lockfile
45+ pnpm run -C frontend build
46+
3147 mkdir $out
32- mv dist $out
48+ mv frontend/ dist $out
3349
3450 runHook postInstall
3551 '' ;
36- } ;
52+ } ) ;
53+
3754in
3855buildGo123Module {
3956 pname = "filebrowser" ;
4057 inherit version src ;
4158
42- vendorHash = "sha256-N5aUs8rgTYXeb0qJhPQBCa6lUDkT6lH1bh+1u4bixos =" ;
59+ vendorHash = "sha256-Jce90mvNzjElCtEMQSSU3IQPz+WLhyEol1ktW4FG7yk =" ;
4360
4461 excludedPackages = [ "tools" ] ;
4562
4663 preBuild = ''
4764 cp -r ${ frontend } /dist frontend/
4865 '' ;
4966
67+ ldflags = [
68+ "-X github.com/filebrowser/filebrowser/v2/version.Version=v${ version } "
69+ ] ;
70+
5071 passthru = {
5172 inherit frontend ;
5273 } ;
You can’t perform that action at this time.
0 commit comments