nixpkgs-update/setup-nixpkgs.sh
2018-03-21 21:53:50 -07:00

19 lines
367 B
Bash
Executable File

#!/usr/bin/env bash
set -euxo pipefail
NIXPKGS=$HOME/.cache/nixpkgs
if ! [ -d "$NIXPKGS" ]
then
hub clone nixpkgs "$NIXPKGS" # requires that user has forked nixpkgs
cd "$NIXPKGS"
git remote add upstream https://github.com/NixOS/nixpkgs
git fetch upstream
git fetch origin staging
git fetch upstream staging
fi
export NIXPKGS
cd "$NIXPKGS"