@@ -7,8 +7,8 @@
77
88let
99
10− common = { name, suffix ? "", src, fromGit ? false }: stdenv.mkDerivation rec {
11− inherit name src;
10+ common = { name, suffix ? "", src, patchPhase, fromGit ? false }: stdenv.mkDerivation rec {
11+ inherit name src patchPhase;
1212 version = lib.getVersion name;
1313
1414 VERSION_SUFFIX = lib.optionalString fromGit suffix;
@@ -109,6 +109,14 @@ in rec {
109109 url = "http://nixos.org/releases/nix/${name}/${name}.tar.xz";
110110 sha256 = "69e0f398affec2a14c47b46fec712906429c85312d5483be43e4c34da4f63f67";
111111 };
112+
113+ # 1.11.8 doesn't yet have the patch to work on LLVM 4, so we patch it for now. Take this out once
114+ # we move to a higher version. I'd pull the specific patch from upstream but it doesn't apply cleanly.
115+ patchPhase = ''
116+ substituteInPlace src/libexpr/json-to-value.cc \
117+ --replace 'std::less<Symbol>, gc_allocator<Value *>' \
118+ 'std::less<Symbol>, gc_allocator<std::pair<const Symbol, Value *> >'
119+ '';
112120 };
113121
114122 nixUnstable = lib.lowPrio (common rec {