depot/third_party/nixpkgs/pkgs/applications/misc/ArchiSteamFarm/web-ui/default.nix
Default email a0cb138ada Project import generated by Copybara.
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
2023-02-02 18:25:31 +00:00

40 lines
1.2 KiB
Nix

{ lib, pkgs, fetchFromGitHub, nodejs, nodePackages, stdenv, ArchiSteamFarm }:
let
nodePackages = import ./node-composition.nix {
inherit pkgs nodejs;
inherit (stdenv.hostPlatform) system;
};
src = fetchFromGitHub {
owner = "JustArchiNET";
repo = "ASF-ui";
# updated by the update script
# this is always the commit that should be used with asf-ui from the latest asf version
rev = "a4617d145756f6dcf1f5729e5a60689aa484403b";
sha256 = "178ip280bqyqd36rka9g2jx7b7wdf3zh56sahg53yxr55zwq5bcp";
};
in
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)
version = ArchiSteamFarm.version;
nativeBuildInputs = [ pkgs.nodePackages.node-gyp-build ];
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; {
description = "The official web interface for ASF";
license = licenses.apsl20;
homepage = "https://github.com/JustArchiNET/ASF-ui";
inherit (ArchiSteamFarm.meta) maintainers platforms;
};
}