about summary refs log tree commit diff
path: root/pkgs/tools/security/semgrep
diff options
context:
space:
mode:
author06kellyjac <dev@j-k.io>2023-07-31 10:47:18 +0100
committer06kellyjac <dev@j-k.io>2023-07-31 10:47:18 +0100
commite513d4f71f7d2b06c60e54e9a3f31561eea1d636 (patch)
treebc17edbb9143a7afe5b6fbdb88a31c20de8fc970 /pkgs/tools/security/semgrep
parentbf287a02caa56ce0c71e01723315894af2f062d0 (diff)
semgrep{,-core}: 1.27.0 -> 1.34.1
Account for new semgrep-core wheel name
Fix semgrep/pysemgrep not being executable...
Diffstat (limited to 'pkgs/tools/security/semgrep')
-rw-r--r--pkgs/tools/security/semgrep/common.nix14
-rw-r--r--pkgs/tools/security/semgrep/default.nix4
-rw-r--r--pkgs/tools/security/semgrep/semgrep-core.nix2
-rwxr-xr-xpkgs/tools/security/semgrep/update.sh5
4 files changed, 13 insertions, 12 deletions
diff --git a/pkgs/tools/security/semgrep/common.nix b/pkgs/tools/security/semgrep/common.nix
index 0ad680b0ddeed..9a7efb9b0dc67 100644
--- a/pkgs/tools/security/semgrep/common.nix
+++ b/pkgs/tools/security/semgrep/common.nix
@@ -1,9 +1,9 @@
 { lib }:
 
 rec {
-  version = "1.27.0";
+  version = "1.34.1";
 
-  srcHash = "sha256-F6n3LQY4a5sO6c8SMQF9YjjgOS+v2SH+UQPwhg2EX7Q=";
+  srcHash = "sha256-jbwG3Xyb/rEyz7aR51/pfc+bU/KY9k6BsByZg6KDY5s=";
 
   # submodule dependencies
   # these are fetched so we:
@@ -13,8 +13,8 @@ rec {
     "cli/src/semgrep/semgrep_interfaces" = {
       owner = "returntocorp";
       repo = "semgrep-interfaces";
-      rev = "213f67abea73546ca6111e1bbf0ef96aa917c940";
-      hash = "sha256-HeNHJkTje9j16+dwsfyMhoqQn/J18q/7XvQPRwgTw/Y=";
+      rev = "f7fed064dadb859f0b802b11fb60f7f77008c4d7";
+      hash = "sha256-EXYRc6p94QxkOBMPOdr608JqLY6kN1AanlRfOFXxPm8=";
     };
   };
 
@@ -25,15 +25,15 @@ rec {
   core = {
     x86_64-linux = {
       platform = "any";
-      hash = "sha256-cRj81dXpAE6S0EXajsRikOIAPzlUf42FhiDCWjv+wZQ=";
+      hash = "sha256-XogITZZtuNmWBrCfL5qpHJNm6jFxzraZMXWhUotXA4c=";
     };
     x86_64-darwin = {
       platform = "macosx_10_14_x86_64";
-      hash = "sha256-jqfGVZGF/DFgXkr7kQg6QyqEELSr8AKE3Ga8kTftnIY=";
+      hash = "sha256-YjV915SZ2L8t6huToErTHRd82m4I+evPyeuwpVzi26o=";
     };
     aarch64-darwin = {
       platform = "macosx_11_0_arm64";
-      hash = "sha256-e/uCSRMdbVD0lvc0hukbiUzheqRNIIh1LgMq6Ae7JYI=";
+      hash = "sha256-BAnYYeUWosAorcHpqUMpRXJFl4NQDPbWTsykDN3w5UQ=";
     };
   };
 
diff --git a/pkgs/tools/security/semgrep/default.nix b/pkgs/tools/security/semgrep/default.nix
index 23749643a4431..ff41daacac30d 100644
--- a/pkgs/tools/security/semgrep/default.nix
+++ b/pkgs/tools/security/semgrep/default.nix
@@ -102,6 +102,10 @@ buildPythonApplication rec {
     makeWrapperArgs+=(--prefix PATH : ${lib.makeBinPath [ semgrep-core ]})
   '';
 
+  postInstall = ''
+    chmod +x $out/bin/{,py}semgrep
+  '';
+
   passthru = {
     inherit common;
     submodulesSubset = lib.mapAttrs (k: args: fetchFromGitHub args) common.submodules;
diff --git a/pkgs/tools/security/semgrep/semgrep-core.nix b/pkgs/tools/security/semgrep/semgrep-core.nix
index c4846c6d91d5f..b924dd16579f9 100644
--- a/pkgs/tools/security/semgrep/semgrep-core.nix
+++ b/pkgs/tools/security/semgrep/semgrep-core.nix
@@ -20,7 +20,7 @@ stdenvNoCC.mkDerivation rec {
       inherit version;
       format = "wheel";
       dist = python;
-      python = "cp37.cp38.cp39.py37.py38.py39";
+      python = "cp37.cp38.cp39.cp310.cp311.py37.py38.py39.py310.py311";
       inherit (data) platform hash;
     };
 
diff --git a/pkgs/tools/security/semgrep/update.sh b/pkgs/tools/security/semgrep/update.sh
index 090d607a6928f..c66180cf8f2ba 100755
--- a/pkgs/tools/security/semgrep/update.sh
+++ b/pkgs/tools/security/semgrep/update.sh
@@ -15,7 +15,6 @@ fi
 
 ROOT="$(dirname "$(readlink -f "$0")")"
 NIXPKGS_ROOT="$ROOT/../../../.."
-NIX_DRV="$ROOT/default.nix"
 
 COMMON_FILE="$ROOT/common.nix"
 
@@ -59,7 +58,7 @@ fetchPypi rec {
   version = \"$VERSION\";
   format = \"wheel\";
   dist = python;
-  python = \"cp37.cp38.cp39.py37.py38.py39\";
+  python = \"cp37.cp38.cp39.cp310.cp311.py37.py38.py39.py310.py311\";
   platform = \"$PLATFORM\";
 }
 "
@@ -131,8 +130,6 @@ nix-instantiate -E "with import $NIXPKGS_ROOT {}; builtins.attrNames semgrep.pas
       continue
     fi
 
-    NEW_URL=$(instantiateClean semgrep.passthru.submodulesSubset."$SUBMODULE".url | sed "s@$OLD_REV@$NEW_REV@g")
-
     TMP_HASH="sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
     replace "$OLD_REV" "$NEW_REV" "$COMMON_FILE"
     replace "$OLD_HASH" "$TMP_HASH" "$COMMON_FILE"