mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 15:27:20 +03:00
ArchiSteamFarm.ui: use buildNpmPackage
This commit is contained in:
parent
b6bad25cbb
commit
ea1cef8c00
@ -245,7 +245,7 @@ in
|
||||
|
||||
rm -f www
|
||||
${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
|
||||
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; {
|
||||
|
@ -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 New Issue
Block a user