Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
53 lines
1.2 KiB
Nix
53 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
buildNpmPackage,
|
|
fetchFromGitHub,
|
|
testers,
|
|
snyk,
|
|
nodejs_20,
|
|
}:
|
|
|
|
let
|
|
version = "1.1299.1";
|
|
in
|
|
buildNpmPackage {
|
|
pname = "snyk";
|
|
inherit version;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "snyk";
|
|
repo = "cli";
|
|
tag = "v${version}";
|
|
hash = "sha256-DANNao3xNcoYWgyi5Dn5UTdeUNPMtkSC5f9VMIShqpQ=";
|
|
};
|
|
|
|
npmDepsHash = "sha256-WKVFg4rtm9UCWRbj1QCrDdQFpk0QZm3KKRUfOQfEJtg=";
|
|
|
|
postPatch = ''
|
|
substituteInPlace package.json \
|
|
--replace-fail '"version": "1.0.0-monorepo"' '"version": "${version}"'
|
|
'';
|
|
|
|
postInstall = ''
|
|
# Remove dangling symlinks created during installation (remove -delete to just see the files, or -print '%l\n' to see the target
|
|
find -L $out -type l -print -delete
|
|
'';
|
|
|
|
nodejs = nodejs_20;
|
|
|
|
npmBuildScript = "build:prod";
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
package = snyk;
|
|
};
|
|
|
|
meta = {
|
|
description = "Scans and monitors projects for security vulnerabilities";
|
|
homepage = "https://snyk.io";
|
|
changelog = "https://github.com/snyk/cli/releases/tag/v${version}";
|
|
license = lib.licenses.asl20;
|
|
maintainers = with lib.maintainers; [ momeemt ];
|
|
mainProgram = "snyk";
|
|
};
|
|
}
|