2022-01-13 20:06:32 +00:00
|
|
|
{ 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
|
2022-07-14 12:49:19 +00:00
|
|
|
rev = "99278781c3716064dc25e3608a344900ebb05165";
|
|
|
|
sha256 = "0nly16g39cv4lhnm40w5ci6bdwypk0gp8n70l914907hy0nvz4vg";
|
2022-01-13 20:06:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
in
|
2022-07-14 12:49:19 +00:00
|
|
|
nodePackages.package.override {
|
|
|
|
inherit src;
|
2022-01-13 20:06:32 +00:00
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
# 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;
|
2022-01-13 20:06:32 +00:00
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
nativeBuildInputs = [ pkgs.nodePackages.node-gyp-build ];
|
2022-01-13 20:06:32 +00:00
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
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/
|
|
|
|
'';
|
2022-01-13 20:06:32 +00:00
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|