From fbdc4616ab2bf11d92411f2b59671699268e458a Mon Sep 17 00:00:00 2001 From: Dan Peebles Date: Sat, 8 Apr 2017 16:54:16 -0400 Subject: [PATCH] nix: fix on LLVM 4.0 --- pkgs/tools/package-management/nix/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index dbd6a3521329..11edda06f135 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -7,8 +7,8 @@ let - common = { name, suffix ? "", src, fromGit ? false }: stdenv.mkDerivation rec { - inherit name src; + common = { name, suffix ? "", src, patchPhase, fromGit ? false }: stdenv.mkDerivation rec { + inherit name src patchPhase; version = lib.getVersion name; VERSION_SUFFIX = lib.optionalString fromGit suffix; @@ -109,6 +109,14 @@ in rec { url = "http://nixos.org/releases/nix/${name}/${name}.tar.xz"; sha256 = "69e0f398affec2a14c47b46fec712906429c85312d5483be43e4c34da4f63f67"; }; + + # 1.11.8 doesn't yet have the patch to work on LLVM 4, so we patch it for now. Take this out once + # we move to a higher version. I'd pull the specific patch from upstream but it doesn't apply cleanly. + patchPhase = '' + substituteInPlace src/libexpr/json-to-value.cc \ + --replace 'std::less, gc_allocator' \ + 'std::less, gc_allocator >' + ''; }; nixUnstable = lib.lowPrio (common rec {