From 79d6b181c9d75ce6baaccfe2d05a032e1b713bd7 Mon Sep 17 00:00:00 2001 From: Vince Rose Date: Fri, 15 Aug 2025 14:29:22 -0700 Subject: [PATCH] starkiller: init at 3.0.1 Co-authored-by: Farid Zakaria --- pkgs/by-name/st/starkiller/package.nix | 66 ++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 pkgs/by-name/st/starkiller/package.nix diff --git a/pkgs/by-name/st/starkiller/package.nix b/pkgs/by-name/st/starkiller/package.nix new file mode 100644 index 000000000000..9fa96aab6211 --- /dev/null +++ b/pkgs/by-name/st/starkiller/package.nix @@ -0,0 +1,66 @@ +{ + lib, + stdenv, + fetchFromGitHub, + fetchYarnDeps, + yarnConfigHook, + nodejs_24, + nix-update-script, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "starkiller"; + version = "3.0.1"; + + src = fetchFromGitHub { + owner = "bc-security"; + repo = "starkiller"; + rev = "v${finalAttrs.version}"; + hash = "sha256-+q+toH5AvIdFPOY0Q06lWDlPrhIpEnukV+8JlwDZVPE="; + }; + + yarnOfflineCache = fetchYarnDeps { + yarnLock = finalAttrs.src + "/yarn.lock"; + hash = "sha256-fkpYRnBEM/nUtdqnWMb7Trqa5SnCrdX7RUYgd73RGFE="; + }; + + buildPhase = '' + runHook preBuild + + # Copying the workaround from + # https://github.com/NixOS/nixpkgs/pull/386706 + pushd node_modules/vue-demi + yarn run postinstall + popd + + yarn --offline build + + runHook postBuild + ''; + + postInstall = '' + mkdir $out + cp -r dist/** $out + ''; + + nativeBuildInputs = [ + yarnConfigHook + # Needed for executing package.json scripts + nodejs_24 + ]; + + passthru = { + updateScript = nix-update-script { }; + }; + + meta = { + homepage = "https://github.com/BC-SECURITY/Starkiller"; + license = lib.licenses.mit; + platforms = lib.platforms.unix; + description = "Web UI for Empire"; + maintainers = with lib.maintainers; [ + fzakaria + vrose + ]; + }; +})