diff --git a/flake.nix b/flake.nix index 99577f5..b873076 100644 --- a/flake.nix +++ b/flake.nix @@ -33,12 +33,17 @@ rustPlatform = final.makeRustPlatform { inherit stdenv; inherit (final) rustc cargo; }; in { - pyperscan = final.callPackage (import ./pyperscan.nix inputs) { inherit stdenv rustPlatform; }; + pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [ + (python-final: python-prev: { + pyperscan = final.callPackage (import ./pyperscan.nix inputs) { inherit stdenv rustPlatform; python3 = python-final.python; }; + }) + ]; vectorscan = prev.vectorscan.override { inherit stdenv; }; }; checks = forAllSystems (system: let - inherit (nixpkgsFor.${system}) pyperscan rustPlatform; + inherit (nixpkgsFor.${system}) rustPlatform; + inherit (nixpkgsFor.${system}.python3Packages) pyperscan; nativeBuildInputs = with rustPlatform; [ bindgenHook ]; @@ -79,8 +84,7 @@ packages = forAllSystems (system: let - - inherit (nixpkgsFor.${system}) pyperscan; + inherit (nixpkgsFor.${system}.python3Packages) pyperscan; in { inherit pyperscan; @@ -93,7 +97,7 @@ in { default = with pkgs; mkShell { - inputsFrom = [ pyperscan.libpyperscan ]; + inputsFrom = [ python3Packages.pyperscan.libpyperscan ]; buildInputs = [ just maturin diff --git a/pyperscan.nix b/pyperscan.nix index ababd9f..c2a1f03 100644 --- a/pyperscan.nix +++ b/pyperscan.nix @@ -18,7 +18,6 @@ inputs: , vendorHyperscan ? false , vendorVectorscan ? false , coverage ? false -, pyperscan }: assert vendorHyperscan -> !vendorVectorscan; @@ -117,7 +116,7 @@ let vectorscan = drv.override { vendorVectorscan = true; }; tests = import ./tests.nix { - inherit lib stdenv system makeRustPlatform rustPlatform pyFilter testFilter cargo-llvm-cov python3 ruff pyperscan; + inherit lib stdenv system makeRustPlatform rustPlatform pyFilter testFilter cargo-llvm-cov python3 ruff; inherit (inputs) fenix; }; }; diff --git a/tests.nix b/tests.nix index 49bb961..079fefa 100644 --- a/tests.nix +++ b/tests.nix @@ -8,10 +8,12 @@ , testFilter , cargo-llvm-cov , python3 -, pyperscan , ruff }: +let + inherit (python3.pkgs) pyperscan; +in { checks = with python3.pkgs; buildPythonPackage { inherit (pyperscan) version;