From 003ce6c40d0456138e0915f3d735529bc2960759 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 25 Nov 2003 17:38:48 +0000 Subject: [PATCH] * A function to fetch sources from a Subversion repository. svn path=/nixpkgs/trunk/; revision=544 --- pkgs/build-support/fetchsvn/builder.sh | 10 ++++++++++ pkgs/build-support/fetchsvn/default.nix | 9 +++++++++ 2 files changed, 19 insertions(+) create mode 100755 pkgs/build-support/fetchsvn/builder.sh create mode 100644 pkgs/build-support/fetchsvn/default.nix diff --git a/pkgs/build-support/fetchsvn/builder.sh b/pkgs/build-support/fetchsvn/builder.sh new file mode 100755 index 000000000000..2208b2c69820 --- /dev/null +++ b/pkgs/build-support/fetchsvn/builder.sh @@ -0,0 +1,10 @@ +#! /bin/sh + +buildinputs="$subversion" +. $stdenv/setup + +echo "exporting $url (r$rev) into $out..." + +svn export -r $rev "$url" $out || exit 1 + +echo $rev > $out/svn-revision || exit 1 diff --git a/pkgs/build-support/fetchsvn/default.nix b/pkgs/build-support/fetchsvn/default.nix new file mode 100644 index 000000000000..9a9891239284 --- /dev/null +++ b/pkgs/build-support/fetchsvn/default.nix @@ -0,0 +1,9 @@ +{stdenv, subversion}: {url, rev}: derivation { + name = "svn-checkout"; + system = stdenv.system; + builder = ./builder.sh; + stdenv = stdenv; + subversion = subversion; + url = url; + rev = rev; +}