artiq: better version numbers
This commit is contained in:
parent
141cb709de
commit
6114dbb738
|
@ -5,9 +5,10 @@ let
|
|||
src = import ./artiq-src.nix { inherit fetchgit; };
|
||||
buildPhase = ''
|
||||
REV=`${git}/bin/git rev-parse HEAD`
|
||||
COMMITCOUNT=`${git}/bin/git rev-list --count HEAD`
|
||||
'';
|
||||
installPhase = ''
|
||||
echo -n 5e.`cut -c1-8 <<< $REV` > $out
|
||||
echo -n 5.$COMMITCOUNT.`cut -c1-8 <<< $REV`-beta > $out
|
||||
'';
|
||||
};
|
||||
in
|
||||
|
|
3
main.nix
3
main.nix
|
@ -5,6 +5,7 @@ let
|
|||
''
|
||||
cp --no-preserve=mode,ownership -R ${./artiq} $out
|
||||
REV=`git --git-dir ${artiqSrc}/.git rev-parse HEAD`
|
||||
COMMITCOUNT=`git --git-dir ${artiqSrc}/.git rev-list --count HEAD`
|
||||
TIMESTAMP=`git --git-dir ${artiqSrc}/.git log -1 --format=%ct`
|
||||
ARTIQ_SRC_CLEAN=`mktemp -d`
|
||||
cp -a ${artiqSrc}/. $ARTIQ_SRC_CLEAN
|
||||
|
@ -20,7 +21,7 @@ let
|
|||
sha256 = "$HASH";
|
||||
}
|
||||
EOF
|
||||
echo "{ stdenv, git, fetchgit }: \"5e.`cut -c1-8 <<< $REV`\"" > $out/pkgs/artiq-version.nix
|
||||
echo "{ stdenv, git, fetchgit }: \"5.$COMMITCOUNT.`cut -c1-8 <<< $REV`-beta\"" > $out/pkgs/artiq-version.nix
|
||||
echo "{ stdenv, git, fetchgit }: \"$TIMESTAMP\"" > $out/pkgs/artiq-timestamp.nix
|
||||
'';
|
||||
generateTestOkHash = pkgs.runCommand "generate-test-ok-hash" { buildInputs = [ pkgs.nix ]; }
|
||||
|
|
Loading…
Reference in New Issue