From a995dabf07574a32c1ae62ad23b96ba7d8e076ee Mon Sep 17 00:00:00 2001 From: stuebinm Date: Fri, 30 Jun 2023 21:44:11 +0200 Subject: 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. --- default.nix | 32 ++++++++++++++------------------ 1 file 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 {}, compiler ? "ghc902", doBenchmark ? false }: +{ nixpkgs ? import {}, 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 -- cgit v1.2.3