diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2006-05-02 09:21:59 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2006-05-02 09:21:59 +0000 |
commit | b8fd332dd8da43a82446301b12f325a4bcf49443 (patch) | |
tree | fefb9e9e457ea9741c86ba11927d72619f635e2f /pkgs/build-support/fetchsvn | |
parent | 75ee1e170468929d193153819d571ff7056b48a6 (diff) |
* Do use readlink if available.
svn path=/nixpkgs/trunk/; revision=5252
Diffstat (limited to 'pkgs/build-support/fetchsvn')
-rwxr-xr-x | pkgs/build-support/fetchsvn/nix-prefetch-svn | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/build-support/fetchsvn/nix-prefetch-svn b/pkgs/build-support/fetchsvn/nix-prefetch-svn index ad6316c766c80..722b44bbd38e0 100755 --- a/pkgs/build-support/fetchsvn/nix-prefetch-svn +++ b/pkgs/build-support/fetchsvn/nix-prefetch-svn @@ -53,7 +53,8 @@ if test -z "$hash"; then fi # Create a Nix expression that does a fetchsvn. -nixExpr=$(dirname $0)/../../top-level/all-packages.nix +scriptDir=$(dirname $(readlink -f $0 2> /dev/null || echo $0)) +nixExpr=$scriptDir/../../top-level/all-packages.nix storeExpr=$( \ echo "(import $nixExpr {}).fetchsvn {url=\"$url\"; rev=\"$rev\"; md5=\"$hash\";}" \ | nix-instantiate -) |