Skip to content

Commit

Permalink
Static build on GHC 8.8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Remo committed Apr 25, 2020
1 parent 027ea0e commit d9a1aa4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
5 changes: 2 additions & 3 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ let

pinnedPkgs =
builtins.fetchTarball {
url = "https://github.com/nixos/nixpkgs/archive/${nixpkgsVersion.rev}.tar.gz";
url = "https://github.com/monacoremo/nixpkgs/archive/${nixpkgsVersion.rev}.tar.gz";
sha256 = nixpkgsVersion.tarballHash;
};

Expand Down Expand Up @@ -48,8 +48,7 @@ let
drvStatic =
import nix/static {
inherit pkgs name src;
# Currently only works with GHC 8.6.5.
compiler = "ghc865";
compiler = "ghc883";
};

lib =
Expand Down
8 changes: 4 additions & 4 deletions nix/nixpkgs-version.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Pinned version of Nixpkgs, generated with nixpkgs-upgrade.
# Nixpkgs-unstable + https://github.com/monacoremo/nixpkgs/commit/93cc144b215654ca9cb0d2bcb58bb8922895ccab
{
date = "2020-04-23";
rev = "10100a97c8964e82b30f180fda41ade8e6f69e41";
tarballHash = "011f36kr3c1ria7rag7px26bh73d1b0xpqadd149bysf4hg17rln";
date = "2020-04-25";
rev = "93cc144b215654ca9cb0d2bcb58bb8922895ccab";
tarballHash = "1b2p07vx8bjvw697wg8awdb1f9j0a6zq213inyqkcdj68qxx896b";
}
15 changes: 11 additions & 4 deletions nix/static/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,14 @@ let
# Add our source package.
"${name}" = prev.callCabal2nix name src {};

# cabal2nix depends on Cabal 3.0.*, while our pinned version of Nixpkgs
# cabal2nix depends on Cabal 3.0.*, while our pinned version of Nixpkgs
# only provides 2.4 or 3.2. So we pinned 3.0.0.0 in ./Cabal.nix
cabal2nix =
prev.cabal2nix.overrideScope
(self: super: { Cabal = self.callPackage ./Cabal.nix {}; });
prev.cabal2nix.overrideScope
(self: super: { Cabal = self.callPackage ./Cabal.nix {}; });

protolude =
prev.callPackage ../overlays/haskell-packages/protolude.nix {};

# The tests for the packages below took a long time on static
# builds, so we disable them for now - to be investigated.
Expand All @@ -57,11 +60,15 @@ let
normalPkgs =
pkgs.appendOverlays [ overlay ];

defaultCabalPackageVersionComingWithGhc =
"Cabal_3_2_0_0";

# Let the static-haskell-nix project do the hard work of deriving a set of
# fully static Haskell executables, including one for the our source package
# that we added through the overlay.
survey =
import "${static-haskell-nix}/survey" { inherit normalPkgs compiler; };
import "${static-haskell-nix}/survey"
{ inherit normalPkgs compiler defaultCabalPackageVersionComingWithGhc; };
in
# Return the fully static derivation of our source package.
survey.haskellPackages."${name}"

0 comments on commit d9a1aa4

Please sign in to comment.