Created
May 10, 2021 00:00
-
-
Save peterromfeldhk/f3a11b8fd051d523ad4932cef3089e76 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
#!/usr/bin/env nix-shell | |
#! nix-shell -i bash -p curl bash nix | |
set -euxo pipefail | |
commit_sha=$1 | |
digest=$(nix-prefetch-url --unpack "https://github.com/NixOS/nixpkgs/archive/${commit_sha}.tar.gz") | |
echo "{\"rev\": \"${commit_sha}\", \"sha256\": \"${digest}\"}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment