Skip to content

Commit cd07d35

Browse files
committed
Update static Nix build
This is a revamp of our use of [fully static Haskell executables](NixOS/nixpkgs#43795). The main changes are: * We can now use a newer revision of Nixpkgs The current revision we're using corresponds to Nixpkgs 20.03 * We can now more easily update Nixpkgs The logic in this repository more closely tracks how `static-haskell-nix` works, so whenever that repository updates Nixpkgs we can pick up the change here, too. Note that we cannot currently use Nixpkgs `master` due to [this issue](NixOS/nixpkgs#85924), but once that is fixed when we can track Nixpkgs `master` more freely. * We no longer need to keep track of separate Nixpkgs revisions for static vs. non-static builds The two builds can also share dependencies, too. Only the top-level derivations differ now. The reason that this doesn't use `static-haskell-nix` directly is because of [`cabal2nix` evaluation failures](nh2/static-haskell-nix#73), so this change works by lifting just the minimum logic that we need from the `static-haskell-nix` repository until we can finally use that repository (or Nixpkgs directly when it's upstreamed).
1 parent 753e459 commit cd07d35

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+128
-1681
lines changed

dhall/benchmark/deep-nested-large-record/Main.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{-# LANGUAGE OverloadedStrings #-}
22
module Main (main) where
33

4+
import Data.Void (Void)
45
import Gauge (defaultMain)
56

67
import qualified Data.Sequence as Seq
@@ -21,7 +22,7 @@ dhallPreludeImport = Core.Import
2122
}
2223
}
2324

24-
issue412 :: Core.Expr s TypeCheck.X -> Gauge.Benchmarkable
25+
issue412 :: Core.Expr s Void -> Gauge.Benchmarkable
2526
issue412 prelude = Gauge.whnf TypeCheck.typeOf expr
2627
where
2728
expr
@@ -30,7 +31,7 @@ issue412 prelude = Gauge.whnf TypeCheck.typeOf expr
3031
$ Seq.replicate 5
3132
$ Core.Var (Core.V "prelude" 0) `Core.Field` "types" `Core.Field` "Little" `Core.Field` "Foo"
3233

33-
unionPerformance :: Core.Expr s TypeCheck.X -> Gauge.Benchmarkable
34+
unionPerformance :: Core.Expr s Void -> Gauge.Benchmarkable
3435
unionPerformance prelude = Gauge.whnf TypeCheck.typeOf expr
3536
where
3637
expr =

dhall/benchmark/parser/Main.hs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ import Control.Exception (throw)
66
import Control.Monad (forM)
77
import Data.Map (Map, foldrWithKey, singleton, unions)
88
import Data.Void (Void)
9-
import Gauge (bench, bgroup, defaultMain, env, nf, nfIO, whnf)
9+
import Gauge (bench, bgroup, defaultMain, env, nf, whnf)
1010

1111
import System.Directory
1212

13-
import qualified Codec.Serialise
1413
import qualified Data.ByteString.Lazy
1514
import qualified Data.Text as T
1615
import qualified Data.Text.IO as TIO
@@ -50,7 +49,7 @@ benchExprFromText name expr =
5049

5150
benchExprFromBytes
5251
:: String -> Data.ByteString.Lazy.ByteString -> Gauge.Benchmark
53-
benchExprFromBytes name bytes = bench name (nf f bytes)
52+
benchExprFromBytes name bs = bench name (nf f bs)
5453
where
5554
f bytes =
5655
case Dhall.Binary.decodeExpression bytes of

dhall/dhall.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -702,12 +702,11 @@ Benchmark dhall-parser
702702
dhall ,
703703
directory ,
704704
gauge >= 0.2.3 && < 0.3,
705-
serialise ,
706705
text >= 0.11.1.0 && < 1.3
707706
Default-Language: Haskell2010
708707
Other-Extensions:
709708
TypeApplications
710-
ghc-options: -rtsopts
709+
ghc-options: -rtsopts -Wall
711710

712711
Benchmark deep-nested-large-record
713712
Type: exitcode-stdio-1.0
@@ -719,3 +718,4 @@ Benchmark deep-nested-large-record
719718
dhall ,
720719
gauge >= 0.2.3 && < 0.3
721720
Default-Language: Haskell2010
721+
ghc-options: -Wall

nix/packages/HaXml.nix

Lines changed: 0 additions & 19 deletions
This file was deleted.

nix/packages/HsYAML-aeson.nix

Lines changed: 0 additions & 14 deletions
This file was deleted.

nix/packages/HsYAML.nix

Lines changed: 0 additions & 20 deletions
This file was deleted.

nix/packages/ListLike.nix

Lines changed: 0 additions & 20 deletions
This file was deleted.

nix/packages/QuickCheck.nix

Lines changed: 0 additions & 18 deletions
This file was deleted.

nix/packages/StateVar.nix

Lines changed: 0 additions & 10 deletions
This file was deleted.

nix/packages/aeson.nix

Lines changed: 0 additions & 31 deletions
This file was deleted.

nix/packages/assoc.nix

Lines changed: 0 additions & 9 deletions
This file was deleted.

nix/packages/atomic-write.nix

Lines changed: 0 additions & 17 deletions
This file was deleted.

nix/packages/base-compat.nix

Lines changed: 0 additions & 9 deletions
This file was deleted.

nix/packages/base-orphans.nix

Lines changed: 0 additions & 14 deletions
This file was deleted.

nix/packages/bifunctors.nix

Lines changed: 0 additions & 21 deletions
This file was deleted.

nix/packages/cabal-doctest.nix

Lines changed: 0 additions & 12 deletions
This file was deleted.

nix/packages/cborg-json.nix

Lines changed: 0 additions & 20 deletions
This file was deleted.

nix/packages/cborg.nix

Lines changed: 0 additions & 21 deletions
This file was deleted.

nix/packages/charset.nix

Lines changed: 0 additions & 16 deletions
This file was deleted.

nix/packages/contravariant.nix

Lines changed: 0 additions & 10 deletions
This file was deleted.

nix/packages/deriving-compat.nix

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)