File tree Expand file tree Collapse file tree 7 files changed +29
-5
lines changed
development/python-modules Expand file tree Collapse file tree 7 files changed +29
-5
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 11{ lib
2+ , callPackage
23, fetchFromGitHub
34, semgrep-core
4- , buildPythonApplication
5+ , buildPythonPackage
56, pythonPackages
67
78, pytestCheckHook
1516 common = import ./common.nix { inherit lib ; } ;
1617 semgrepBinPath = lib . makeBinPath [ semgrep-core ] ;
1718in
18- buildPythonApplication rec {
19+ buildPythonPackage rec {
1920 pname = "semgrep" ;
2021 inherit ( common ) version ;
2122 src = fetchFromGitHub {
@@ -130,7 +131,7 @@ buildPythonApplication rec {
130131 '' ;
131132
132133 passthru = {
133- inherit common ;
134+ inherit common semgrep-core ;
134135 submodulesSubset = lib . mapAttrs ( k : args : fetchFromGitHub args ) common . submodules ;
135136 updateScript = ./update.sh ;
136137 } ;
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 1313 pytestCheckHook ,
1414 pythonOlder ,
1515 pyyaml ,
16+ wrapt ,
17+ semgrep ,
1618 setuptools ,
1719} :
1820
@@ -35,6 +37,12 @@ buildPythonPackage rec {
3537 --replace-fail '"pytest-runner"' ""
3638 '' ;
3739
40+ pythonRelaxDeps = [
41+ "lxml"
42+ "pyyaml"
43+ "semgrep"
44+ ] ;
45+
3846 build-system = [ setuptools ] ;
3947
4048 dependencies = [
@@ -46,14 +54,25 @@ buildPythonPackage rec {
4654 luhn
4755 lxml
4856 pyyaml
57+ wrapt
58+ semgrep
4959 ] ;
5060
5161 nativeCheckInputs = [
5262 pytest-mock
5363 pytestCheckHook
5464 ] ;
5565
66+ disabledTestPaths = [
67+ # pinning tests highly sensitive to semgrep version
68+ "tests/unit/plugins/test_semgrep.py"
69+ ] ;
70+
5671 preCheck = ''
72+ # pinning test highly sensitive to semgrep version
73+ substituteInPlace tests/unit/test_main.py \
74+ --replace-fail '("--ast", 421),' ""
75+
5776 # Some tests need the binary available in PATH
5877 export PATH=$out/bin:$PATH
5978 '' ;
Original file line number Diff line number Diff line change @@ -11949,8 +11949,8 @@ with pkgs;
1194911949
1195011950 semantic-release = callPackage ../development/tools/semantic-release { };
1195111951
11952- semgrep = python3.pkgs.callPackage ../tools/security/ semgrep { } ;
11953- semgrep-core = callPackage ../tools/security/ semgrep/semgrep -core.nix { } ;
11952+ semgrep = python3.pkgs.toPythonApplication python3.pkgs. semgrep;
11953+ inherit (semgrep.passthru) semgrep-core;
1195411954
1195511955 setroot = callPackage ../tools/X11/setroot { };
1195611956
Original file line number Diff line number Diff line change @@ -14301,6 +14301,10 @@ self: super: with self; {
1430114301
1430214302 semantic-version = callPackage ../development/python-modules/semantic-version { };
1430314303
14304+ semgrep = callPackage ../development/python-modules/semgrep {
14305+ semgrep-core = callPackage ../development/python-modules/semgrep/semgrep-core.nix { };
14306+ };
14307+
1430414308 semaphore-bot = callPackage ../development/python-modules/semaphore-bot { };
1430514309
1430614310 semver = callPackage ../development/python-modules/semver { };
You can’t perform that action at this time.
0 commit comments