aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--default.nix32
1 files changed, 14 insertions, 18 deletions
diff --git a/default.nix b/default.nix
index a929aed..06ff967 100644
--- a/default.nix
+++ b/default.nix
@@ -1,4 +1,4 @@
-{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc902", doBenchmark ? false }:
+{ nixpkgs ? import <nixpkgs> {}, compiler ? "default", doBenchmark ? false }:
let
@@ -50,6 +50,7 @@ let
postInstall = ''
cp -r $src/assets $out/assets
'';
+ jailbreak = true;
};
haskellPackages = if compiler == "default"
@@ -61,25 +62,20 @@ let
# we can override haskell packages in nix here; but attempt to minimise that
# since builds get pretty expensive when we do.
hpkgs = haskellPackages.override {
- overrides = self: super: with pkgs.haskell.lib; {
- # hoauth2 = doDistribute super.hoauth2_2_6_0;
- # cryptonite = doDistribute super.cryptonite_0_30;
- # memory = doDistribute super.memory_0_18_0;
+ overrides = self: super: with pkgs.haskell.lib.compose; {
+ conferer-warp = markUnbroken super.conferer-warp;
+ protocol-buffers = markUnbroken (overrideSrc {
+ src = pkgs.fetchFromGitHub {
+ owner = "k-bx";
+ repo = "protocol-buffers";
+ sha256 = "sha256-Olp02L6ztDkG9sUOQf+kOcaQEMbdhIJyPRkpvxU9v7I=";
+ rev = "ae8084f115fbdb699da2b2a163776b1a1167bf0f";
+ };
+ } super.protocol-buffers);
};
};
drv = variant (hpkgs.callPackage f {});
- # this removes the /lib directory from the built derivation, which depends on ghc.
- # this dramatically reduces closure size
- stripLib = drv: pkgs.stdenv.mkDerivation {
- name = drv.name + "-without-lib";
- src = drv.outPath;
- buildPhase = ''
- mkdir -p $out
- cp -r $src/bin $out
- cp -r $src/assets $out/assets
- '';
- phases = [ "buildPhase" ];
- };
-in stripLib drv
+in with pkgs.haskell.lib;
+ justStaticExecutables drv