diff options
author | legendofmiracles | 2021-11-24 09:54:57 -0600 |
---|---|---|
committer | legendofmiracles | 2022-01-05 14:09:24 -0600 |
commit | 98ccbafb0597848e4cb90688c4f7d679b5242a6a (patch) | |
tree | c946e1a561c69914328eaba97d1c242f61e08993 /pkgs/applications/misc/ArchiSteamFarm/web-ui/default.nix | |
parent | bf30cd48ed498bafa56831f687299cba0a94e0eb (diff) |
ASF-ui: init
Diffstat (limited to 'pkgs/applications/misc/ArchiSteamFarm/web-ui/default.nix')
-rw-r--r-- | pkgs/applications/misc/ArchiSteamFarm/web-ui/default.nix | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/applications/misc/ArchiSteamFarm/web-ui/default.nix b/pkgs/applications/misc/ArchiSteamFarm/web-ui/default.nix new file mode 100644 index 000000000000..5bb8ebf32040 --- /dev/null +++ b/pkgs/applications/misc/ArchiSteamFarm/web-ui/default.nix @@ -0,0 +1,40 @@ +{ lib, pkgs, fetchFromGitHub, nodejs, 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 = "3be40800a37ff0dbf43dd821af0d7498c23a5a52"; + sha256 = "0mvpp6pw5ld23f56g6rmgiq4mwwwqhh55dn6zsjdylfj8sqisdx8"; + }; + +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 + ln -s $out/lib/node_modules/asf-ui/dist $out/lib/dist + ''; + + meta = with lib; { + description = "The official web interface for ASF"; + license = licenses.apsl20; + homepage = "https://github.com/JustArchiNET/ASF-ui"; + platforms = ArchiSteamFarm.meta.platforms; + maintainers = with maintainers; [ lom ]; + }; + } |