Skip to content

Commit ae11365

Browse files
committed
build: Start defining the Python package
1 parent f3a351b commit ae11365

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

flake.nix

+19-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,25 @@
7474
}
7575
);
7676
# TODO: build with maturin
77-
py = null;
77+
py =
78+
(craneLib.buildPackage (commonArgs
79+
// {
80+
pname = "pineappl-py";
81+
inherit cargoArtifacts;
82+
}))
83+
.overrideAttrs (old: {
84+
nativeBuildInputs = old.nativeBuildInputs ++ [pkgs.maturin];
85+
buildPhase =
86+
old.buildPhase
87+
+ ''
88+
maturin build --offline --target-dir ./target
89+
'';
90+
installPhase =
91+
old.installPhase
92+
+ ''
93+
cp target/wheels/pineappl $out/
94+
'';
95+
});
7896
in
7997
{
8098
packages = {

0 commit comments

Comments
 (0)