diff options
author | stuebinm | 2023-06-30 21:44:11 +0200 |
---|---|---|
committer | stuebinm | 2023-06-30 21:44:11 +0200 |
commit | a995dabf07574a32c1ae62ad23b96ba7d8e076ee (patch) | |
tree | eec3db1dccab4fb46878598d4d9a1a8168b8eb59 | |
parent | c0128f357b5268cd31969b8ff630db3ccb3681de (diff) |
update nix overrides
protocol-buffers's last release has been some while ago, and since then
a deprecated function it used to use has been removed from the
bytestring package.
so here's some fun overrides to ignore that.
-rw-r--r-- | default.nix | 32 |
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 |