5 , buildPythonApplication
14 common = callPackage ./common.nix { };
16 buildPythonApplication rec {
18 inherit (common) version;
19 src = "${common.src}/cli";
21 SEMGREP_CORE_BIN = "${semgrep-core}/bin/semgrep-core";
23 nativeBuildInputs = [ pythonRelaxDepsHook ];
32 # remove git submodule placeholders
33 rm -r ./src/semgrep/{lang,semgrep_interfaces}
34 # link submodule dependencies
35 ln -s ${common.langsSrc}/ ./src/semgrep/lang
36 ln -s ${common.interfacesSrc}/ ./src/semgrep/semgrep_interfaces
40 checkInputs = [ git pytestCheckHook ] ++ (with pythonPackages; [
48 "tests/unit/test_metric_manager.py"
51 # tests need a home directory
52 export HOME="$(mktemp -d)"
54 # disabledTestPaths doesn't manage to avoid the e2e tests
55 # remove them from pyproject.toml
56 # and remove need for pytest-split
57 substituteInPlace pyproject.toml \
58 --replace '"tests/e2e",' "" \
59 --replace 'addopts = "--splitting-algorithm=least_duration"' ""
62 propagatedBuildInputs = with pythonPackages; [
82 meta = common.meta // {
83 description = common.meta.description + " - cli";