Created
July 7, 2017 09:56
-
-
Save gilligan/7c93640a5d640bc053fc78f4b4ab4ef5 to your computer and use it in GitHub Desktop.
rather primitive (for now) shell script to get a default.nix with some packages
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
read -r -d '' TEMPLATE << EOM | |
with (import <nixpkgs> {}); | |
stdenv.mkDerivation { | |
name = "dev-shell"; | |
src = null; | |
buildInputs = [ __PKGS__ ]; | |
} | |
EOM | |
usage() { | |
echo -e "Usage:\n\t $0 pkg1 pkg2 ... \n" | |
} | |
if [[ $# -ne 1 ]]; then | |
echo -e "Error: No packages given!\n" | |
usage | |
exit 1 | |
fi | |
PKGS="$*" | |
echo -e "$TEMPLATE" | sed -e "s/__PKGS__/${PKGS}/" |
sweet, it does not tie itself to a certain commit (yet), right? Which means it always depends on the local system, did I understand that correct?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can be used as follows: