diff options
author | Ludovic Courtès <ludo@gnu.org> | 2008-09-26 08:57:51 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2008-09-26 08:57:51 +0000 |
commit | 9383cd0a48fdc0cc04cbde2e939edb0294ab4f40 (patch) | |
tree | 0703cf1f3b98efb44879fb10bfe148e2254b791d /pkgs/build-support/fetchbzr | |
parent | 3a9d5063bd49eab12b44a56007680151dbb2f1c0 (diff) | |
download | nixpkgs-9383cd0a48fdc0cc04cbde2e939edb0294ab4f40.tar nixpkgs-9383cd0a48fdc0cc04cbde2e939edb0294ab4f40.tar.gz nixpkgs-9383cd0a48fdc0cc04cbde2e939edb0294ab4f40.tar.bz2 nixpkgs-9383cd0a48fdc0cc04cbde2e939edb0294ab4f40.tar.lz nixpkgs-9383cd0a48fdc0cc04cbde2e939edb0294ab4f40.tar.xz nixpkgs-9383cd0a48fdc0cc04cbde2e939edb0294ab4f40.tar.zst nixpkgs-9383cd0a48fdc0cc04cbde2e939edb0294ab4f40.zip |
Add `fetchbzr', to retrieve remote Bazaar repositories.
svn path=/nixpkgs/trunk/; revision=12924
Diffstat (limited to 'pkgs/build-support/fetchbzr')
-rw-r--r-- | pkgs/build-support/fetchbzr/builder.sh | 9 | ||||
-rw-r--r-- | pkgs/build-support/fetchbzr/default.nix | 15 |
2 files changed, 24 insertions, 0 deletions
diff --git a/pkgs/build-support/fetchbzr/builder.sh b/pkgs/build-support/fetchbzr/builder.sh new file mode 100644 index 00000000000..88aab7891b4 --- /dev/null +++ b/pkgs/build-support/fetchbzr/builder.sh @@ -0,0 +1,9 @@ +source "$stdenv/setup" + +header "exporting \`$url' (revision $revision) into \`$out'" + +# Perform a lightweight checkout so that we don't end up importing +# all the repository's history. +bzr checkout --lightweight "$url" -r "$revision" "$out" + +stopNest diff --git a/pkgs/build-support/fetchbzr/default.nix b/pkgs/build-support/fetchbzr/default.nix new file mode 100644 index 00000000000..721250beeb3 --- /dev/null +++ b/pkgs/build-support/fetchbzr/default.nix @@ -0,0 +1,15 @@ +{ stdenv, bazaar }: +{ url, revision, sha256 }: + +stdenv.mkDerivation { + name = "bzr-export"; + + builder = ./builder.sh; + buildInputs = [ bazaar ]; + + outputHashAlgo = "sha256"; + outputHashMode = "recursive"; + outputHash = sha256; + + inherit url revision; +} |