summary refs log tree commit diff
path: root/pkgs/build-support/fetchsvnrevision/default.nix
blob: 288451a225c77219f8c272fb834349a2de98cd69 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
runCommand: subversion: repository:
  import (runCommand "head-revision"
    { buildInputs = [ subversion ];
      dummy = builtins.currentTime;
    }
    ''
      rev=$(echo p | svn ls -v --depth empty  ${repository} |awk '{ print $1 }')
      echo "[ \"$rev\" ]" > $out
      echo Latest revision is $rev
    '')