Skip to content

Commit e448b41

Browse files
committed
build: Finally fix CLI package
1 parent d5adca7 commit e448b41

File tree

1 file changed

+20
-11
lines changed

1 file changed

+20
-11
lines changed

flake.nix

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,24 @@
2626
craneLib = crane.lib.${system};
2727

2828
src = craneLib.cleanCargoSource (craneLib.path ./.);
29-
# Common arguments can be set here to avoid repeating them later
3029
commonArgs = {
3130
inherit src;
32-
strictDeps = true;
31+
strictDeps = false;
32+
buildInputs = with pkgs; [lhapdf];
33+
nativeBuildInputs = with pkgs; [pkg-config];
3334
};
3435

35-
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
3636
individualCrateArgs =
3737
commonArgs
3838
// {
39-
inherit cargoArtifacts;
4039
inherit
4140
((builtins.fromTOML (builtins.readFile (src
4241
+ "/Cargo.toml")))
4342
.workspace
4443
.package)
4544
version
4645
;
46+
doCheck = false;
4747
};
4848

4949
fileSetForCrate = crate:
@@ -53,21 +53,30 @@
5353
./Cargo.toml
5454
./Cargo.lock
5555
crate
56+
# TODO: avoid passing all the folders
57+
# (if strictly needed, at least avoid doing it explicitly)
58+
./pineappl
59+
./pineappl_applgrid
60+
./pineappl_capi
61+
./pineappl_fastnlo
62+
./pineappl_py
63+
./xtask
5664
];
5765
};
5866

59-
pineappl = craneLib.buildPackage (individualCrateArgs
60-
// {
61-
pname = "pineappl";
62-
cargoExtraArgs = "-p pineappl";
63-
src = fileSetForCrate ./pineappl;
64-
});
67+
pineappl =
68+
craneLib.buildPackage
69+
(individualCrateArgs
70+
// {
71+
pname = "pineappl";
72+
cargoExtraArgs = "-p pineappl";
73+
src = fileSetForCrate ./pineappl;
74+
});
6575
cli = craneLib.buildPackage (individualCrateArgs
6676
// {
6777
pname = "pineappl_cli";
6878
cargoExtraArgs = "-p pineappl_cli";
6979
src = fileSetForCrate ./pineappl_cli;
70-
buildInputs = with pkgs; [pkg-config lhapdf];
7180
});
7281
# TODO: build with maturin
7382
py = null;

0 commit comments

Comments
 (0)