add dev helper and docs

This commit is contained in:
Erik Arvstedt 2023-01-15 20:27:51 +01:00
parent b35d08d3f2
commit b4d7e1aa8f
No known key found for this signature in database
GPG key ID: 33312B944DD97846
12 changed files with 746 additions and 1 deletions

16
dev/dev-env/dev-shell.nix Normal file
View file

@ -0,0 +1,16 @@
pkgs:
pkgs.mkShell {
shellHook = ''
# A known rev from the master branch to test whether `nix develop`
# is called inside the nix-bitcoin repo
rev=5cafafd02777919c10e559b5686237fdefe920c2
if git cat-file -e $rev &>/dev/null; then
root=$(git rev-parse --show-toplevel)
export PATH=$root/test:$root/helper:$PATH
else
echo 'Error: `nix develop` must be called inside the nix-bitcoin repo.'
exit 1
fi
'';
}