From e6ab3878bd4307f86200ddf0bfbe415fbf09fb92 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Wed, 28 Oct 2020 21:53:37 -0400 Subject: rename nixos-pin --- nixpkgs-pin | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 nixpkgs-pin (limited to 'nixpkgs-pin') diff --git a/nixpkgs-pin b/nixpkgs-pin new file mode 100755 index 0000000..bca1dee --- /dev/null +++ b/nixpkgs-pin @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +function usage { + echo "usage: nixpkgs-pin " + echo "where 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) + +cat <