From 17b0cd0ec27e8d87c961d564cceb3ba0ccccf148 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 30 Jan 2023 21:57:26 +0100 Subject: [PATCH] packages/hercules-ci-agent: apply cachix jailbreak --- packages/patched-inputs.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/patched-inputs.nix b/packages/patched-inputs.nix index ff62ac6..a9d5e49 100644 --- a/packages/patched-inputs.nix +++ b/packages/patched-inputs.nix @@ -39,9 +39,22 @@ nix = patchedNix; inherit hercules-ci-cnix-store; }); - cachix = pkgs.haskellPackages.cachix.override (lib.const { + cachix = (pkgs.haskellPackages.cachix.override (lib.const { nix = patchedNix; inherit hercules-ci-cnix-store; + })).overrideAttrs (o: { + postPatch = '' + ${o.postPatch or ""} + # jailbreak pkgconfig deps + cp cachix.cabal cachix.cabal.backup + sed -i cachix.cabal -e 's/\(nix-[a-z]*\) *(==[0-9.]* *|| *>[0-9.]*) *&& *<[0-9.]*/\1/g' + sed -i cachix.cabal -e 's/pkgconfig-depends:.*/pkgconfig-depends: nix-main, nix-store/' + echo + echo Applied: + diff -U5 cachix.cabal.backup cachix.cabal ||: + echo + rm cachix.cabal.backup + ''; }); }; in (original.override patchDeps).overrideAttrs forcePatchNix;