Created
July 31, 2018 05:36
-
-
Save sveitser/13daf978708ba740a18071ae8c7192fb to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/env bash | |
set -e | |
url=$(curl https://nixos.org/channels/nixpkgs-unstable/nixexprs.tar.xz -s -L -I -o /dev/null -w '%{url_effective}') | |
echo Got tarball URL "$url" | |
sha=$(nix-prefetch-url --unpack "$url") | |
echo With SHA $sha | |
cat > shell.nix <<EOF | |
with import ( | |
builtins.fetchTarball { | |
url = "$url"; | |
sha256 = "$sha"; | |
} | |
) { }; | |
mkShell rec { | |
buildInputs = [ | |
yarn | |
]; | |
} | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment