diff --git a/pkgs/by-name/sn/snyk/package.nix b/pkgs/by-name/sn/snyk/package.nix index 35312af8fff33..b60357ea0718a 100644 --- a/pkgs/by-name/sn/snyk/package.nix +++ b/pkgs/by-name/sn/snyk/package.nix @@ -2,29 +2,37 @@ lib, buildNpmPackage, fetchFromGitHub, + nodejs_24, + npm-lockfile-fix, testers, snyk, }: -let - version = "1.1301.2"; -in -buildNpmPackage { +buildNpmPackage (finalAttrs: { pname = "snyk"; - inherit version; + version = "1.1305.1"; src = fetchFromGitHub { owner = "snyk"; repo = "cli"; - tag = "v${version}"; - hash = "sha256-dyP9KywtwXYHkKDrCeNwJbZbhhIQdwYzk2GAY2+CEWM="; + tag = "v${finalAttrs.version}"; + hash = "sha256-xOB2ZY4R5BE9a9bZ4+16h4K2O5OmGz6W0YwbPU/ZBWY="; + + # TODO: Remove once https://github.com/snyk/cli/pull/6924 is released. + postFetch = '' + ${lib.getExe npm-lockfile-fix} $out/package-lock.json + ''; }; - npmDepsHash = "sha256-HBMOqFi3lvvVdPA+sx54Vj3cUQCV802SiWWR3+cq9Qo="; + npmDepsFetcherVersion = 3; + + npmDepsHash = "sha256-pSnkANyHygjUqexCkxh/zsrB1143onYexeOUFQHN6sU="; + + nodejs = nodejs_24; postPatch = '' substituteInPlace package.json \ - --replace-fail '"version": "1.0.0-monorepo"' '"version": "${version}"' + --replace-fail '"version": "1.0.0-monorepo"' '"version": "${finalAttrs.version}"' ''; postInstall = '' @@ -41,9 +49,9 @@ buildNpmPackage { meta = { description = "Scans and monitors projects for security vulnerabilities"; homepage = "https://snyk.io"; - changelog = "https://github.com/snyk/cli/releases/tag/v${version}"; + changelog = "https://github.com/snyk/cli/releases/tag/v${finalAttrs.version}"; license = lib.licenses.asl20; - maintainers = [ ]; + maintainers = with lib.maintainers; [ iamanaws ]; mainProgram = "snyk"; }; -} +})