mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-11-05 17:56:46 +01:00
871b59c636
svn path=/nixpkgs/trunk/; revision=25354
11 lines
328 B
Nix
11 lines
328 B
Nix
runCommand: git: repository: branch:
|
|
import (runCommand "head-revision"
|
|
{ buildInputs = [ git ];
|
|
dummy = builtins.currentTime;
|
|
}
|
|
''
|
|
rev=$(git ls-remote ${repository} | grep "refs/${branch}$" | awk '{ print $1 }')
|
|
echo "[ \"$rev\" ]" > $out
|
|
echo Latest revision in ${branch} is $rev
|
|
'')
|