initial Commit
This commit is contained in:
commit
2763345291
4 changed files with 116 additions and 0 deletions
36
rust.nix
Normal file
36
rust.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{pkgs ? import <nixpkgs> {}}:
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
pname = "esp-rust";
|
||||
version = "1.81.0";
|
||||
srcs = [
|
||||
(builtins.fetchurl
|
||||
{
|
||||
url = "https://github.com/esp-rs/rust-build/releases/download/v${version}.0/rust-${version}.0-x86_64-unknown-linux-gnu.tar.xz";
|
||||
sha256 = "1pilzw6lqygysdrklzs64vb07a3ni0pw24qklkwc5gjqwgzc4ka4";
|
||||
})
|
||||
(builtins.fetchurl
|
||||
{
|
||||
url = "https://github.com/esp-rs/rust-build/releases/download/v${version}.0/rust-src-${version}.0.tar.xz";
|
||||
sha256 = "0w7fy0biml8ddvwpmrn9js4x6vkqjhm118gxy2431fnxl97v947f";
|
||||
})
|
||||
];
|
||||
sourceRoot = ".";
|
||||
|
||||
preferLocalBuild = true;
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
autoPatchelfHook
|
||||
];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
stdenv.cc.cc.lib
|
||||
libz
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p "$out"
|
||||
cp -R ./*/*/{bin,share,lib} "$out"
|
||||
runHook postInstall
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue