build cargo-config with nixpkg's rustPlatform instead of craneLib
This commit is contained in:
parent
cc7bf71440
commit
58f3fbc74b
15
flake.nix
15
flake.nix
|
@ -40,7 +40,10 @@
|
||||||
extensions = ["rust-analyzer" "rust-src"];
|
extensions = ["rust-analyzer" "rust-src"];
|
||||||
targets = ["x86_64-unknown-redox"];
|
targets = ["x86_64-unknown-redox"];
|
||||||
};
|
};
|
||||||
craneLib = (inputs.crane.mkLib pkgs).overrideToolchain rust-bin;
|
rustPlatform = pkgs.makeRustPlatform {
|
||||||
|
cargo = rust-bin;
|
||||||
|
rustc = rust-bin;
|
||||||
|
};
|
||||||
|
|
||||||
# Podman config taken from https://nixos.wiki/wiki/Podman and https://gist.github.com/adisbladis/187204cb772800489ee3dac4acdd9947
|
# Podman config taken from https://nixos.wiki/wiki/Podman and https://gist.github.com/adisbladis/187204cb772800489ee3dac4acdd9947
|
||||||
# Provides a script that copies required files to ~/
|
# Provides a script that copies required files to ~/
|
||||||
|
@ -71,12 +74,9 @@
|
||||||
ln -s ${pkgs.podman}/bin/podman $out/bin/docker
|
ln -s ${pkgs.podman}/bin/podman $out/bin/docker
|
||||||
'';
|
'';
|
||||||
|
|
||||||
cargo-config =
|
cargo-config = rustPlatform.buildRustPackage {
|
||||||
craneLib.buildPackage
|
|
||||||
{
|
|
||||||
pname = "cargo-config";
|
pname = "cargo-config";
|
||||||
version = "0.1.1";
|
version = "0.1.1";
|
||||||
cargoArtifacts = null;
|
|
||||||
|
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "wesleywiser";
|
owner = "wesleywiser";
|
||||||
|
@ -85,6 +85,9 @@
|
||||||
sha256 = "sha256-HrITNTfjBppOH1MhfZHfzHc6N8ymcm7vaiBI94ctUOA=";
|
sha256 = "sha256-HrITNTfjBppOH1MhfZHfzHc6N8ymcm7vaiBI94ctUOA=";
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# useFetchCargoVendor = true; # this is recommended, but fails in some python code?
|
||||||
|
cargoHash = "sha256-yQpIKclZ8KLE5JGkB/tjKZA8ezaD9SbUthDsuBXYZjQ=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
|
@ -162,7 +165,7 @@
|
||||||
in {
|
in {
|
||||||
devShells.default = with pkgs;
|
devShells.default = with pkgs;
|
||||||
mkShell {
|
mkShell {
|
||||||
inherit buildInputs;
|
packages = buildInputs;
|
||||||
|
|
||||||
LD_LIBRARY_PATH = lib.makeLibraryPath buildInputs;
|
LD_LIBRARY_PATH = lib.makeLibraryPath buildInputs;
|
||||||
NIX_SHELL_BUILD = "1";
|
NIX_SHELL_BUILD = "1";
|
||||||
|
|
Loading…
Reference in a new issue