ArchiSteamFarm.ui: use buildNpmPackage
This commit is contained in:
parent
b6bad25cbb
commit
ea1cef8c00
|
@ -245,7 +245,7 @@ in
|
||||||
|
|
||||||
rm -f www
|
rm -f www
|
||||||
${optionalString cfg.web-ui.enable ''
|
${optionalString cfg.web-ui.enable ''
|
||||||
ln -s ${cfg.web-ui.package}/lib/dist www
|
ln -s ${cfg.web-ui.package}/ www
|
||||||
''}
|
''}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
{ lib, pkgs, fetchFromGitHub, nodejs, nodePackages, stdenv, ArchiSteamFarm }:
|
{ lib, fetchFromGitHub, buildNpmPackage, nodePackages, ArchiSteamFarm }:
|
||||||
|
|
||||||
let
|
buildNpmPackage {
|
||||||
nodePackages = import ./node-composition.nix {
|
pname = "asf-ui";
|
||||||
inherit pkgs nodejs;
|
inherit (ArchiSteamFarm) version;
|
||||||
inherit (stdenv.hostPlatform) system;
|
|
||||||
};
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "JustArchiNET";
|
owner = "JustArchiNET";
|
||||||
|
@ -15,20 +13,15 @@ let
|
||||||
sha256 = "1ajmi2l6xhv3nlnag2kmkblny925irp4gngdc3mniiimw364p826";
|
sha256 = "1ajmi2l6xhv3nlnag2kmkblny925irp4gngdc3mniiimw364p826";
|
||||||
};
|
};
|
||||||
|
|
||||||
in
|
npmDepsHash = "sha256-AY1DFuZkB8tOQd2FzHuNZ31rtLlWujP+3AqsMMB2BhU=";
|
||||||
nodePackages.package.override {
|
|
||||||
inherit src;
|
|
||||||
|
|
||||||
# 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)
|
installPhase = ''
|
||||||
version = ArchiSteamFarm.version;
|
runHook preInstall
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgs.nodePackages.node-gyp-build ];
|
mkdir $out
|
||||||
|
cp -rv dist/* $out/
|
||||||
|
|
||||||
postInstall = ''
|
runHook 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/
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
# This file has been generated by node2nix 1.11.1. Do not edit!
|
|
||||||
|
|
||||||
{pkgs ? import <nixpkgs> {
|
|
||||||
inherit system;
|
|
||||||
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs_14"}:
|
|
||||||
|
|
||||||
let
|
|
||||||
nodeEnv = import ../../../../development/node-packages/node-env.nix {
|
|
||||||
inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript;
|
|
||||||
inherit pkgs nodejs;
|
|
||||||
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
import ./node-packages.nix {
|
|
||||||
inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit;
|
|
||||||
inherit nodeEnv;
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue