filebrowser: use nodejs-slim for frontend, refactor (#528537)
This commit is contained in:
@@ -2,10 +2,11 @@
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
buildGoModule,
|
||||
buildNpmPackage,
|
||||
stdenvNoCC,
|
||||
fetchPnpmDeps,
|
||||
pnpmConfigHook,
|
||||
nodejs_24,
|
||||
pnpmBuildHook,
|
||||
nodejs-slim,
|
||||
pnpm_10,
|
||||
nix-update-script,
|
||||
nixosTests,
|
||||
@@ -17,23 +18,25 @@ let
|
||||
src = fetchFromGitHub {
|
||||
owner = "filebrowser";
|
||||
repo = "filebrowser";
|
||||
rev = "v${version}";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-/X/TztbZDC1hkRL97jkm6Ak8QmKFDMycekLl6NVPS0k=";
|
||||
};
|
||||
|
||||
frontend = buildNpmPackage rec {
|
||||
frontend = stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "filebrowser-frontend";
|
||||
inherit version src;
|
||||
|
||||
sourceRoot = "${src.name}/frontend";
|
||||
|
||||
nativeBuildInputs = [ pnpm_10 ];
|
||||
npmConfigHook = pnpmConfigHook;
|
||||
npmDeps = pnpmDeps;
|
||||
nodejs = nodejs_24;
|
||||
nativeBuildInputs = [
|
||||
nodejs-slim
|
||||
pnpmConfigHook
|
||||
pnpmBuildHook
|
||||
pnpm_10
|
||||
];
|
||||
|
||||
pnpmDeps = fetchPnpmDeps {
|
||||
inherit
|
||||
inherit (finalAttrs)
|
||||
pname
|
||||
version
|
||||
src
|
||||
@@ -52,7 +55,7 @@ let
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
});
|
||||
|
||||
in
|
||||
buildGoModule {
|
||||
@@ -87,6 +90,7 @@ buildGoModule {
|
||||
meta = {
|
||||
description = "Web application for managing files and directories";
|
||||
homepage = "https://filebrowser.org";
|
||||
changelog = "https://github.com/filebrowser/filebrowser/releases/${src.tag}";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ oakenshield ];
|
||||
mainProgram = "filebrowser";
|
||||
|
||||
Reference in New Issue
Block a user