core/pkgs/build-support/fetchsvnrevision/default.nix
2024-05-13 11:34:52 -04:00

11 lines
315 B
Nix

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
'')