forked from M-Labs/nix-scripts
17 lines
390 B
Nix
17 lines
390 B
Nix
|
{ pkgs ? import <nixpkgs> {} }:
|
||
|
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
|