diff options
author | lom | 2023-05-07 14:28:23 -0400 |
---|---|---|
committer | lom | 2023-05-08 20:34:21 -0400 |
commit | ea1cef8c0015eeda3f64e7c06ea719e8ee762b1e (patch) | |
tree | 05ca1e048c8348759a9a84a3be98e9e53ab83979 /pkgs/applications/misc/ArchiSteamFarm/web-ui/default.nix | |
parent | b6bad25cbb2e3a279b80a9793e90e2cf6396e11a (diff) |
ArchiSteamFarm.ui: use buildNpmPackage
Diffstat (limited to 'pkgs/applications/misc/ArchiSteamFarm/web-ui/default.nix')
-rw-r--r-- | pkgs/applications/misc/ArchiSteamFarm/web-ui/default.nix | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/pkgs/applications/misc/ArchiSteamFarm/web-ui/default.nix b/pkgs/applications/misc/ArchiSteamFarm/web-ui/default.nix index babb2ba64c3c..d158f60f4539 100644 --- a/pkgs/applications/misc/ArchiSteamFarm/web-ui/default.nix +++ b/pkgs/applications/misc/ArchiSteamFarm/web-ui/default.nix @@ -1,10 +1,8 @@ -{ lib, pkgs, fetchFromGitHub, nodejs, nodePackages, stdenv, ArchiSteamFarm }: +{ lib, fetchFromGitHub, buildNpmPackage, nodePackages, ArchiSteamFarm }: -let - nodePackages = import ./node-composition.nix { - inherit pkgs nodejs; - inherit (stdenv.hostPlatform) system; - }; +buildNpmPackage { + pname = "asf-ui"; + inherit (ArchiSteamFarm) version; src = fetchFromGitHub { owner = "JustArchiNET"; @@ -15,20 +13,15 @@ let sha256 = "1ajmi2l6xhv3nlnag2kmkblny925irp4gngdc3mniiimw364p826"; }; -in -nodePackages.package.override { - inherit src; + npmDepsHash = "sha256-AY1DFuZkB8tOQd2FzHuNZ31rtLlWujP+3AqsMMB2BhU="; - # upstream isn't tagged, but we are using the latest official commit for that specific asf version (assuming both get updated at the same time) - version = ArchiSteamFarm.version; + installPhase = '' + runHook preInstall - nativeBuildInputs = [ pkgs.nodePackages.node-gyp-build ]; + mkdir $out + cp -rv dist/* $out/ - postInstall = '' - patchShebangs node_modules/ - npm run build - cp -r $out/lib/node_modules/asf-ui/dist $out/lib/dist - rm -rf $out/lib/node_modules/ + runHook postInstall ''; meta = with lib; { |