-
-
Save grahamc/1a248ae5d50feb38676e84481866aeef 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
#!/bin/sh | |
fetchsync() { | |
src=$1 | |
dest=$2 | |
if [ ! -d "$dest" ]; then | |
git clone --bare "$src" "$dest" | |
fi | |
( | |
cd "$dest" | |
git fetch | |
) | |
} | |
mkdir -p sources | |
fetchsync "git@github.com:grahamc/dns.git" "./sources/dns" | |
nix-build ./default.nix |
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
let | |
pkgs = import <nixpkgs> {}; | |
in pkgs.stdenv.mkDerivation { | |
name = "dns-configs"; | |
src = pkgs.fetchgit { | |
url = ./sources/dns; | |
rev = "668f046c23c0ae36fadd5620f6df2560d962c12e"; | |
sha256 = "1xqyxv9q7mj6ww2pcdwpfjnx1x867n7i18m1zid2l597v3d4g7iq"; | |
}; | |
buildPhase = '' | |
./build.sh | |
''; | |
installPhase = '' | |
cp -r ./bind-cfgs $out | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment