*: fs restructure
This commit is contained in:
parent
08d0f5453a
commit
43c92a7340
15 changed files with 0 additions and 0 deletions
32
environments/dev/rust.nix
Normal file
32
environments/dev/rust.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{ gitpkgs ? import /home/steveej/src/github/NixOS/nixpkgs {}
|
||||
, pkgs ? gitpkgs
|
||||
, name ? "generic"
|
||||
, version ? "Stable"
|
||||
, extraBuildInputs ? []
|
||||
}:
|
||||
let
|
||||
rustPackages = builtins.getAttr "rust${version}" pkgs;
|
||||
rustc = rustPackages.rustc;
|
||||
rustShellHook = { rustc, name }: ''
|
||||
rustname=rust_${rustc.version}_${name}
|
||||
setPS1 $rustname
|
||||
unset name
|
||||
'';
|
||||
commonVimRC = ''
|
||||
'';
|
||||
in pkgs.stdenv.mkDerivation {
|
||||
inherit name;
|
||||
buildInputs = with rustPackages;[
|
||||
( import ./vim-rust.nix { pkgs=gitpkgs; commonRC=commonVimRC;
|
||||
inherit rustc;
|
||||
racerd=pkgs.rustracerd;
|
||||
})
|
||||
rustc cargo
|
||||
] ++ [
|
||||
pkgs.rustfmt
|
||||
] ++ extraBuildInputs;
|
||||
shellHook = (rustShellHook){
|
||||
inherit name;
|
||||
inherit rustc;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue