Advertisement
Guest User

Untitled

a guest
Mar 28th, 2019
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.58 KB | None | 0 0
  1.  
  2. set -e
  3.  
  4. export NIX_REMOTE=daemon
  5.  
  6. GIT_ROOT=$(git rev-parse --show-toplevel)
  7. VERSION=$1
  8.  
  9. if [ "$GIT_ROOT" == "" ]; then
  10.     GIT_ROOT=$(git rev-parse --show-toplevel)
  11. fi
  12.  
  13. case $VERSION in
  14. "19.03" | "unstable")
  15.     nix-prefetch-git --rev "refs/heads/nixos-$1" https://github.com/NixOS/nixpkgs-channels.git | jq '{url: ("https://github.com/NixOS/nixpkgs-channels/archive/" + .rev + ".tar.gz"), rev: .rev, date: .date, sha256: .sha256}' >  "$GIT_ROOT/common/nixpkgs-$1.json"
  16.     ;;
  17. *)
  18.     echo "usage: $0 <branchname>"
  19.     echo "view $0 to see a list of valid branch names"
  20.     exit 1
  21.     ;;
  22. esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement