forked from M-Labs/zynq-rs
switch to nixpkgs cargo-xbuild (with workaround for rust nonsense)
This commit is contained in:
parent
55b36ee37e
commit
301f9236e5
38
flake.nix
38
flake.nix
|
@ -139,26 +139,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
cargo-xbuild = rustPlatform.buildRustPackage rec {
|
|
||||||
pname = "cargo-xbuild";
|
|
||||||
version = "0.6.5";
|
|
||||||
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "rust-osdev";
|
|
||||||
repo = pname;
|
|
||||||
rev = "v${version}";
|
|
||||||
sha256 = "18djvygq9v8rmfchvi2hfj0i6fhn36m716vqndqnj56fiqviwxvf";
|
|
||||||
};
|
|
||||||
cargoSha256 = "13sj9j9kl6js75h9xq0yidxy63vixxm9q3f8jil6ymarml5wkhx8";
|
|
||||||
|
|
||||||
meta = with pkgs.lib; {
|
|
||||||
description = "Automatically cross-compiles the sysroot crates core, compiler_builtins, and alloc";
|
|
||||||
homepage = "https://github.com/rust-osdev/cargo-xbuild";
|
|
||||||
license = with licenses; [ mit asl20 ];
|
|
||||||
maintainers = with maintainers; [ johntitor xrelkd ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
mkbootimage = pkgs.stdenv.mkDerivation {
|
mkbootimage = pkgs.stdenv.mkDerivation {
|
||||||
pname = "mkbootimage";
|
pname = "mkbootimage";
|
||||||
version = "2.3dev";
|
version = "2.3dev";
|
||||||
|
@ -213,6 +193,10 @@
|
||||||
dontFixup = true;
|
dontFixup = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
cargo-xbuild = pkgs.cargo-xbuild.overrideAttrs(oa: {
|
||||||
|
postPatch = "substituteInPlace src/sysroot.rs --replace 2021 2018";
|
||||||
|
});
|
||||||
|
|
||||||
build-crate = name: crate: features: rustPlatform.buildRustPackage rec {
|
build-crate = name: crate: features: rustPlatform.buildRustPackage rec {
|
||||||
name = "${crate}";
|
name = "${crate}";
|
||||||
|
|
||||||
|
@ -269,16 +253,16 @@
|
||||||
|
|
||||||
devShell.x86_64-linux = pkgs.mkShell {
|
devShell.x86_64-linux = pkgs.mkShell {
|
||||||
name = "zynq-rs-dev-shell";
|
name = "zynq-rs-dev-shell";
|
||||||
buildInputs = with pkgs; [
|
buildInputs = [
|
||||||
rust
|
rust
|
||||||
cacert
|
|
||||||
cargo-xbuild
|
cargo-xbuild
|
||||||
|
mkbootimage
|
||||||
|
|
||||||
openocd gdb
|
pkgs.openocd pkgs.gdb
|
||||||
openssh rsync
|
pkgs.openssh pkgs.rsync
|
||||||
llvmPackages_14.clang-unwrapped
|
pkgs.llvmPackages_14.clang-unwrapped
|
||||||
(python3.withPackages(ps: [ ps.pyftdi ]))
|
(pkgs.python3.withPackages(ps: [ ps.pyftdi ]))
|
||||||
mkbootimage ];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue