From a87e97c17550a0415a961fde0164352f171e7f52 Mon Sep 17 00:00:00 2001 From: Farid Zakaria Date: Sat, 3 Aug 2024 17:58:30 -0700 Subject: [PATCH] Fix pytest in derivation.nix (#26) * Fix pytest in derivation.nix We were overriding checkPhase so the pytest hook would not run. Use postCheck instead which is a hook that is executed. * Pin lief to a specific version --- derivation.nix | 2 +- pyproject.toml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/derivation.nix b/derivation.nix index bfd2b70..2e8fab3 100644 --- a/derivation.nix +++ b/derivation.nix @@ -45,7 +45,7 @@ in [pytestCheckHook flake8 mypy isort black] ++ [pyright]; - checkPhase = '' + postCheck = '' make lint ''; diff --git a/pyproject.toml b/pyproject.toml index 9cad104..8bd5c54 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,9 @@ classifiers = [ ] dependencies = [ "capstone >= 5.0.1", - "lief >=0.14.1", + # lief has proven to change API a lot + # pin it to a specific version + "lief ==0.14.1", "apsw >= 3.43.1.0", "sh >= 2.0.6", ]