2019-04-24 04:30:41 +08:00
|
|
|
let pkgs = import <nixpkgs> {};
|
|
|
|
in
|
2019-04-24 04:07:43 +08:00
|
|
|
with pkgs;
|
|
|
|
let
|
|
|
|
artiq-timestamp = stdenv.mkDerivation {
|
|
|
|
name = "artiq-timestamp";
|
|
|
|
src = import ./artiq-src.nix { inherit fetchgit; };
|
|
|
|
buildInputs = [ git ];
|
|
|
|
buildPhase = ''
|
|
|
|
TIMESTAMP=`${git}/bin/git log -1 --format=%ct`
|
|
|
|
'';
|
|
|
|
installPhase = ''
|
|
|
|
echo \"$TIMESTAMP\" > $out
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
in
|
|
|
|
builtins.readFile artiq-timestamp
|