diff options
Diffstat (limited to 'nixos-pin')
-rwxr-xr-x | nixos-pin | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1,6 +1,12 @@ #!/usr/bin/env bash -[[ -z $1 ]] && echo "usage: nix-pin <hash>" && exit 1 +function usage { + echo "usage: nixos-pin <hash>" + echo "where <hash> is a git sha from the nixpkgs repo" + exit 1 +} + +[[ -z $1 ]] && usage url="https://github.com/NixOS/nixpkgs/archive/$1.tar.gz" hash=$(nix-prefetch-url --unpack $url) |