Skip to content

Commit

Permalink
nix: fix on LLVM 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
copumpkin committed Apr 8, 2017
1 parent 72d9016 commit fbdc461
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions pkgs/tools/package-management/nix/default.nix
Expand Up @@ -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;
Expand Down Expand Up @@ -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<Symbol>, gc_allocator<Value *>' \
'std::less<Symbol>, gc_allocator<std::pair<const Symbol, Value *> >'
'';
};

nixUnstable = lib.lowPrio (common rec {
Expand Down

2 comments on commit fbdc461

@joachifm
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copumpkin
Copy link
Member Author

@copumpkin copumpkin commented on fbdc461 Apr 8, 2017 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.