Merge pull request #28 from tobiaskohlbau/addressNixWarning

pull/8675/merge^2
Matthew Paras 2025-05-21 22:34:32 -07:00 committed by GitHub
commit 9d88ce3a74
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 6 deletions

View File

@ -78,7 +78,8 @@
buildPhase = '' buildPhase = ''
export HOME=$PWD/build_home # code-gen will write files relative to $HOME export HOME=$PWD/build_home # code-gen will write files relative to $HOME
mkdir -p $HOME mkdir -p $HOME
cargo run --package xtask -- code-gen cargoBuildLog=$(mktemp cargoBuildLogXXXX.json)
cargo run --package xtask -- code-gen >"$cargoBuildLog"
''; '';
installPhase = '' installPhase = ''
@ -124,16 +125,17 @@
wrapper = old: makeOverridableHelix old config; wrapper = old: makeOverridableHelix old config;
}; };
}; };
stdenv = stdenvSelector = p:
if pkgs.stdenv.isLinux if p.stdenv.isLinux
then pkgs.stdenv then p.stdenv
else pkgs.clangStdenv; else p.clangStdenv;
stdenv = stdenvSelector pkgs;
rustFlagsEnv = pkgs.lib.optionalString stdenv.isLinux "-C link-arg=-fuse-ld=lld -C target-cpu=native -Clink-arg=-Wl,--no-rosegment --cfg tokio_unstable"; rustFlagsEnv = pkgs.lib.optionalString stdenv.isLinux "-C link-arg=-fuse-ld=lld -C target-cpu=native -Clink-arg=-Wl,--no-rosegment --cfg tokio_unstable";
rustToolchain = pkgs.pkgsBuildHost.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml; rustToolchain = pkgs.pkgsBuildHost.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
craneLibMSRV = (crane.mkLib pkgs).overrideToolchain rustToolchain; craneLibMSRV = (crane.mkLib pkgs).overrideToolchain rustToolchain;
craneLibStable = (crane.mkLib pkgs).overrideToolchain pkgs.pkgsBuildHost.rust-bin.stable.latest.default; craneLibStable = (crane.mkLib pkgs).overrideToolchain pkgs.pkgsBuildHost.rust-bin.stable.latest.default;
commonArgs = { commonArgs = {
inherit stdenv; stdenv = stdenvSelector;
inherit (craneLibMSRV.crateNameFromCargoToml {cargoToml = ./helix-term/Cargo.toml;}) pname; inherit (craneLibMSRV.crateNameFromCargoToml {cargoToml = ./helix-term/Cargo.toml;}) pname;
inherit (craneLibMSRV.crateNameFromCargoToml {cargoToml = ./Cargo.toml;}) version; inherit (craneLibMSRV.crateNameFromCargoToml {cargoToml = ./Cargo.toml;}) version;
src = filteredSource; src = filteredSource;