mirror of https://github.com/helix-editor/helix
Merge pull request #28 from tobiaskohlbau/addressNixWarning
commit
9d88ce3a74
14
flake.nix
14
flake.nix
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue