-
-
Save Havvy/aaffec9a601b955477e26570eff0415e to your computer and use it in GitHub Desktop.
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
with import <nixpkgs> {}; | |
stdenv.mkDerivation { | |
name = "rustc"; | |
shellHook = '' | |
# Set some variables for the terminal prompt. | |
green=$(tput setaf 2) | |
bold=$(tput bold) | |
reset=$(tput sgr0) # Resets other styles. Broken in some unknown way? | |
# # Everything between \[ and \] are considerd as 0 characters long for word-wrap. | |
# \u is the username. | |
# \w is the path (relative to ~ if possible) | |
export PS1="\n\[$green$bold\][\u@rustc:\w]\$\[$reset\] " | |
# Unset the variables used for the terminal prompt. | |
unset green | |
unset bold | |
unset clear | |
# Go directly to the Rust directory. | |
cd ~/workspace/rust/project | |
''; | |
buildInputs = [ | |
python27 | |
cmake | |
curl | |
file | |
]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment