diff --git a/flake.nix b/flake.nix index 6c13f447..f26ec96e 100644 --- a/flake.nix +++ b/flake.nix @@ -52,7 +52,7 @@ versionInfo = { commitHash = if (self ? rev) then self.rev else self.dirtyRev; - commitDate = lib.readFile "${prev.runCommand "timestamp" { env.when = self.lastModified; } "echo -n `date -d @$when --iso-8601=s` > $out"}"; + commitDate = self.lastModified; }; }; }); @@ -85,7 +85,7 @@ inherit pkgs lib; versionInfo = { commitHash = if (self ? rev) then self.rev else self.dirtyRev; - commitDate = lib.readFile "${pkgs.runCommand "timestamp" { env.when = self.lastModified; } "echo -n `date -d @$when --iso-8601=s` > $out"}"; + commitDate = self.lastModified; }; }); }; diff --git a/nix/pkgs/frontend.nix b/nix/pkgs/frontend.nix index e90f2aec..756f52f8 100644 --- a/nix/pkgs/frontend.nix +++ b/nix/pkgs/frontend.nix @@ -44,7 +44,7 @@ pkgs.buildNpmPackage (lib.fix (self: { versionExports = ([ ] ++ (lib.optional (versionInfo ? commitHash) ''export COMMIT_HASH="${versionInfo.commitHash}"'') ++ (lib.optional (versionInfo ? commitDate) - ''export COMMIT_DATE="${versionInfo.commitDate}"'')); + ''export COMMIT_DATE="$(date -d @${versionInfo.commitDate} --iso-8601=s"'')); in '' ${lib.concatStringsSep "\n" versionExports} '';