crane.nix: Remove propagated libiconv from rust-overlay toolchain
This commit is contained in:
parent
e4c22456ef
commit
646507a02c
14
crane.nix
14
crane.nix
|
@ -12,10 +12,14 @@ let
|
||||||
inherit (stdenv.hostPlatform) system;
|
inherit (stdenv.hostPlatform) system;
|
||||||
|
|
||||||
nightlyVersion = "2023-05-01";
|
nightlyVersion = "2023-05-01";
|
||||||
rustNightly = pkgs.rust-bin.nightly.${nightlyVersion}.default.override {
|
rustNightly = (pkgs.rust-bin.nightly.${nightlyVersion}.default.override {
|
||||||
extensions = [ "rust-src" "rust-analyzer-preview" ];
|
extensions = [ "rust-src" "rust-analyzer-preview" ];
|
||||||
targets = cargoTargets;
|
targets = cargoTargets;
|
||||||
};
|
}).overrideAttrs (old: {
|
||||||
|
# Remove the propagated libiconv since we want to add our static version
|
||||||
|
depsTargetTargetPropagated = lib.filter (d: d.pname != "libiconv")
|
||||||
|
(lib.flatten (old.depsTargetTargetPropagated or []));
|
||||||
|
});
|
||||||
|
|
||||||
# For easy cross-compilation in devShells
|
# For easy cross-compilation in devShells
|
||||||
# We are just composing the pkgsCross.*.stdenv.cc together
|
# We are just composing the pkgsCross.*.stdenv.cc together
|
||||||
|
@ -69,12 +73,6 @@ let
|
||||||
buildInputs = with pkgs; []
|
buildInputs = with pkgs; []
|
||||||
++ lib.optionals pkgs.stdenv.isDarwin [
|
++ lib.optionals pkgs.stdenv.isDarwin [
|
||||||
darwin.apple_sdk.frameworks.Security
|
darwin.apple_sdk.frameworks.Security
|
||||||
];
|
|
||||||
|
|
||||||
nativeBuildInputs = with pkgs; []
|
|
||||||
# The Rust toolchain from rust-overlay has a dynamic libiconv in depsTargetTargetPropagated
|
|
||||||
# Our static libiconv needs to take precedence
|
|
||||||
++ lib.optionals pkgs.stdenv.isDarwin [
|
|
||||||
(libiconv.override { enableStatic = true; enableShared = false; })
|
(libiconv.override { enableStatic = true; enableShared = false; })
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue