Skip to content

Commit

Permalink
build: Start defining the Python package
Browse files Browse the repository at this point in the history
  • Loading branch information
alecandido committed Apr 26, 2024
1 parent f3a351b commit ae11365
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,25 @@
}
);
# TODO: build with maturin
py = null;
py =
(craneLib.buildPackage (commonArgs
// {
pname = "pineappl-py";
inherit cargoArtifacts;
}))
.overrideAttrs (old: {
nativeBuildInputs = old.nativeBuildInputs ++ [pkgs.maturin];
buildPhase =
old.buildPhase
+ ''
maturin build --offline --target-dir ./target
'';
installPhase =
old.installPhase
+ ''
cp target/wheels/pineappl $out/
'';
});
in
{
packages = {
Expand Down

0 comments on commit ae11365

Please sign in to comment.