core/pkgs/build-support/fetchsvnrevision/default.nix

11 lines
315 B
Nix
Raw Normal View History

2024-05-02 00:46:19 +00:00
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
'')