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 24, 2024
1 parent f26afca commit bd25053
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 bd25053

Please sign in to comment.