Skip to content

Commit d6b2439

Browse files
committed
1 parent 6bb577e commit d6b2439

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

pyperscan.nix

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
inputs:
22

33
{ lib
4+
, callPackage
45
, stdenv
56
, makeRustPlatform
67
, rustPlatform
@@ -14,6 +15,7 @@ inputs:
1415
, hyperscan
1516
, vectorscan
1617
, python3
18+
, util-linux
1719
, ruff
1820
, vendorHyperscan ? false
1921
, vendorVectorscan ? false
@@ -98,12 +100,15 @@ let
98100
(optionals vendorHyperscan [ "-F hyperscan" ])
99101
++ (optionals (vendorVectorscan) [ "-F vectorscan" ]);
100102

101-
nativeBuildInputs = with rustPlatform; [
102-
bindgenHook
103-
cargoSetupHook
104-
(maturinBuildHook.override { pkgsHostTarget = { inherit maturin cargo rustc; }; })
105-
] ++ optional (vendor && stdenv.isLinux) util-linux
106-
++ optional coverage cargo-llvm-cov;
103+
nativeBuildInputs =
104+
let
105+
rustHooks = callPackage "${inputs.nixpkgs}/pkgs/build-support/rust/hooks" { };
106+
in
107+
[
108+
rustPlatform.cargoSetupHook
109+
(rustHooks.maturinBuildHook.override { pkgsHostTarget = { inherit maturin cargo rustc; }; })
110+
] ++ optional (vendor && stdenv.isLinux) util-linux
111+
++ optional coverage cargo-llvm-cov;
107112

108113
preConfigure = optionalString coverage ''
109114
source <(cargo llvm-cov show-env --export-prefix)

0 commit comments

Comments
 (0)