Skip to content

Commit 9482161

Browse files
committed
add startTime and stopTime to BuildResult
1 parent 68f5a5d commit 9482161

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

hnix-store-core/hnix-store-core.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ library
4343
, regex-base
4444
, regex-tdfa-text
4545
, text
46+
, time
4647
, unix
4748
, unordered-containers
4849
, vector

hnix-store-core/src/System/Nix/Build.hs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ module System.Nix.Build (
1010
, buildSuccess
1111
) where
1212

13+
import Data.Time (UTCTime)
1314
import Data.Text (Text)
1415
import Data.HashSet (HashSet)
1516
import System.Nix.Path (Path)
@@ -39,12 +40,15 @@ data BuildResult = BuildResult
3940
{ -- | build status, MiscFailure should be default
4041
status :: !BuildStatus
4142
, -- | possible build error message
42-
error :: !(Maybe Text)
43+
errorMessage :: !(Maybe Text)
4344
, -- | How many times this build was performed
4445
timesBuilt :: !Integer
4546
, -- | If timesBuilt > 1, whether some builds did not produce the same result
4647
isNonDeterministic :: !Bool
47-
-- XXX: | startTime stopTime time_t
48+
, -- Start time of this build
49+
startTime :: !UTCTime
50+
, -- Stop time of this build
51+
stopTime :: !UTCTime
4852
} deriving (Eq, Ord, Show)
4953

5054
buildSuccess BuildResult{..} = status == Built || status == Substituted || status == AlreadyValid

0 commit comments

Comments
 (0)