Created
April 22, 2019 17:54
-
-
Save rasendubi/2f5e6fc9f74295d518556c34c2f995b2 to your computer and use it in GitHub Desktop.
Nix env for rustc development
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {} }: | |
let | |
rust-etags = with pkgs; stdenv.mkDerivation { | |
name = "rust-etags"; | |
src = fetchFromGitHub { | |
owner = "nikomatsakis"; | |
repo = "rust-etags"; | |
rev = "master"; | |
sha256 = "0br2ipkcm3xdfnxn031swsvy7n6f3nwl2iklgjvrij55sf578m6j"; | |
}; | |
nativeBuildInputs = [ makeWrapper ]; | |
postPatch = '' | |
sed -e 's:^ ctags: ${ctags}/bin/ctags:' \ | |
-e "s:CTAGS=.*:CTAGS=\"$out/lib/rust-etags/ctags.rust\":" \ | |
-i rust-ctags | |
''; | |
installPhase = '' | |
mkdir -p $out/lib/rust-etags $out/bin | |
cp -r * $out/lib/rust-etags/ | |
ln -s $out/lib/rust-etags/rust-ctags $out/bin/rust-ctags | |
''; | |
}; | |
in pkgs.mkShell { | |
name = "rustc"; | |
buildInputs = [ | |
pkgs.llvm | |
pkgs.cmake | |
pkgs.rustup | |
pkgs.gdb | |
pkgs.graphviz | |
rust-etags | |
]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment