about summary refs log tree commit diff
path: root/pkgs/tools/security/semgrep/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/security/semgrep/default.nix')
-rw-r--r--pkgs/tools/security/semgrep/default.nix14
1 files changed, 9 insertions, 5 deletions
diff --git a/pkgs/tools/security/semgrep/default.nix b/pkgs/tools/security/semgrep/default.nix
index 35a2a459587c..1df7c515e305 100644
--- a/pkgs/tools/security/semgrep/default.nix
+++ b/pkgs/tools/security/semgrep/default.nix
@@ -4,6 +4,7 @@
 , semgrep-core
 , buildPythonApplication
 , pythonPackages
+, pythonRelaxDepsHook
 
 , pytestCheckHook
 , git
@@ -19,12 +20,15 @@ buildPythonApplication rec {
 
   SEMGREP_CORE_BIN = "${semgrep-core}/bin/semgrep-core";
 
-  postPatch = ''
-    substituteInPlace setup.py \
-      --replace "typing-extensions~=4.2" "typing-extensions" \
-      --replace "jsonschema~=3.2" "jsonschema" \
-      --replace "boltons~=21.0" "boltons"
+  nativeBuildInputs = [ pythonRelaxDepsHook ];
+  pythonRelaxDeps = [
+    "attrs"
+    "boltons"
+    "jsonschema"
+    "typing-extensions"
+  ];
 
+  postPatch = ''
     # remove git submodule placeholders
     rm -r ./src/semgrep/{lang,semgrep_interfaces}
     # link submodule dependencies