e7ec2969af
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
36 lines
1,020 B
Nix
36 lines
1,020 B
Nix
{ buildNpmPackage, fetchFromGitHub, lib, stdenv, testers, snyk }:
|
|
|
|
buildNpmPackage rec {
|
|
pname = "snyk";
|
|
version = "1.1266.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "snyk";
|
|
repo = "cli";
|
|
rev = "v${version}";
|
|
hash = "sha256-K+62BbiP4GVjxqadIllDBn8pH+cJkbEUVWJTMO7Mn3M=";
|
|
};
|
|
|
|
npmDepsHash = "sha256-9FLXsIFrNzH42v5y537GrS3C1X91LLh3qu4sPoprNK4=";
|
|
|
|
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";
|
|
|
|
npmBuildScript = "build:prod";
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
package = snyk;
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Scans and monitors projects for security vulnerabilities";
|
|
homepage = "https://snyk.io";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ ];
|
|
};
|
|
}
|