2024-01-02 11:29:13 +00:00
|
|
|
{ buildNpmPackage, fetchFromGitHub, lib, stdenv, testers, snyk }:
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
buildNpmPackage rec {
|
|
|
|
pname = "snyk";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "1.1280.1";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "snyk";
|
|
|
|
repo = "cli";
|
|
|
|
rev = "v${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-bwEekB/jifSRktblvq98C3t2xSTTPn4NOftQs/T090U=";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
npmDepsHash = "sha256-TtWc+Zy6yMHbDdsw5rVKK+RiCZ8ZuXyU+SfcPRgToiA=";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace package.json --replace '"version": "1.0.0-monorepo"' '"version": "${version}"'
|
|
|
|
'';
|
|
|
|
|
|
|
|
env.NIX_CFLAGS_COMPILE =
|
|
|
|
# Fix error: no member named 'aligned_alloc' in the global namespace
|
|
|
|
lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) "-D_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION=1";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
npmBuildScript = "build:prod";
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = snyk;
|
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Scans and monitors projects for security vulnerabilities";
|
|
|
|
homepage = "https://snyk.io";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
};
|
|
|
|
}
|