rustPlatform.maturinBuildHook: init

This build hook can be used to build Python packages using maturin.
This commit is contained in:
Daniël de Kok
2021-02-12 08:40:43 +01:00
parent 7876d1c252
commit 160cf87086
3 changed files with 51 additions and 1 deletions
+11
View File
@@ -4,6 +4,7 @@
, diffutils
, lib
, makeSetupHook
, maturin
, rust
, stdenv
, target ? rust.toRustTargetSpec stdenv.hostPlatform
@@ -62,4 +63,14 @@ in {
'';
};
} ./cargo-setup-hook.sh) {};
maturinBuildHook = callPackage ({ }:
makeSetupHook {
name = "maturin-build-hook.sh";
deps = [ cargo maturin ];
substitutions = {
inherit ccForBuild ccForHost cxxForBuild cxxForHost
rustBuildPlatform rustTargetPlatform rustTargetPlatformSpec;
};
} ./maturin-build-hook.sh) {};
}