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"];
|
||||
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
|
||||
# Provides a script that copies required files to ~/
|
||||
|
@ -71,12 +74,9 @@
|
|||
ln -s ${pkgs.podman}/bin/podman $out/bin/docker
|
||||
'';
|
||||
|
||||
cargo-config =
|
||||
craneLib.buildPackage
|
||||
{
|
||||
cargo-config = rustPlatform.buildRustPackage {
|
||||
pname = "cargo-config";
|
||||
version = "0.1.1";
|
||||
cargoArtifacts = null;
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "wesleywiser";
|
||||
|
@ -85,6 +85,9 @@
|
|||
sha256 = "sha256-HrITNTfjBppOH1MhfZHfzHc6N8ymcm7vaiBI94ctUOA=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
# useFetchCargoVendor = true; # this is recommended, but fails in some python code?
|
||||
cargoHash = "sha256-yQpIKclZ8KLE5JGkB/tjKZA8ezaD9SbUthDsuBXYZjQ=";
|
||||
};
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
|
@ -162,7 +165,7 @@
|
|||
in {
|
||||
devShells.default = with pkgs;
|
||||
mkShell {
|
||||
inherit buildInputs;
|
||||
packages = buildInputs;
|
||||
|
||||
LD_LIBRARY_PATH = lib.makeLibraryPath buildInputs;
|
||||
NIX_SHELL_BUILD = "1";
|
||||
|
|
Loading…
Reference in a new issue