[Nix-dev] Problem compiling GHC 8.0.1 on Debian

Jeff Johnson jefdaj at gmail.com
Tue Sep 20 21:52:42 CEST 2016


I have NixOS, but am trying to install my existing packages in the home
folder of a Debian machine too for work. I'm stuck compiling GHC 8.0.1...
the current nixpkgs-unstable version gives a hash mismatch, which I "fixed"
like so:

diff --git a/pkgs/development/compilers/ghc/8.0.1.nix
b/pkgs/development/compilers/ghc/8.0.1.nix
index e607ef7..2fb6afe 100644
--- a/pkgs/development/compilers/ghc/8.0.1.nix
+++ b/pkgs/development/compilers/ghc/8.0.1.nix
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
     ./relocation.patch

     # Fix https://ghc.haskell.org/trac/ghc/ticket/12130
-    (fetchFilteredPatch { url =
https://git.haskell.org/ghc.git/patch/4d71cc89b4e9648f3fbb29c8fcd25d725616e265;
sha256 = "0syaxb4y4s2dc440qmrggb4vagvqqhb55m6mx12rip4i9qhxl8k0"; })
+    (fetchFilteredPatch { url =
https://git.haskell.org/ghc.git/patch/4d71cc89b4e9648f3fbb29c8fcd25d725616e265;
sha256 = "1z30999wgv1qnsd5kypj4lw33nj0yn0k0bax0yciqxnl1py0s87s"; })
     (fetchFilteredPatch { url =
https://git.haskell.org/ghc.git/patch/2f8cd14fe909a377b3e084a4f2ded83a0e6d44dd;
sha256 = "06zvlgcf50ab58bw6yw3krn45dsmhg4cmlz4nqff8k4z1f1bj01v"; })
   ] ++ stdenv.lib.optional stdenv.isLinux ./ghc-no-madv-free.patch;

But I think that might have been a mistake, because now patch fails to
apply:

building path(s)
‘/home/user/nix/store/7alsswffmxxv86cjjw1v13jl3a7q4dfy-ghc-8.0.1’,
‘/home/user/nix/store/y45l8rlzkahbv8rgx15vv8axbaisvfid-ghc-8.0.1-doc’
unpacking sources
unpacking source archive
/home/user/nix/store/8ppp85yckr3ksksg1jxlj8r9rkfm5pzx-ghc-8.0.1-src.tar.xz
source root is ghc-8.0.1
setting SOURCE_DATE_EPOCH to timestamp 1463503024 of file
ghc-8.0.1/utils/genprimopcode/Parser.hs
patching sources
applying patch
/home/user/nix/store/d14agb1vzr6m0hqzkrcjf3mdbxhclwg9-ghc-8.x-dont-pass-linker-flags-via-response-files.patch
patching file compiler/main/SysTools.hs
Hunk #1 succeeded at 422 (offset 8 lines).
Hunk #2 succeeded at 944 (offset 8 lines).
applying patch
/home/user/nix/store/a7m73963gnbxzxjpr46sn9mrjlb9mjp2-relocation.patch
patching file rts/Linker.c
Hunk #1 succeeded at 5855 (offset 174 lines).
applying patch
/home/user/nix/store/0ic419xjc11055bg7cgad4ki9zmfsmz2-4d71cc89b4e9648f3fbb29c8fcd25d725616e265
patching file compiler/rename/RnPat.hs
Hunk #1 succeeded at 636 (offset 1 line).
Hunk #2 succeeded at 648 (offset 1 line).
patching file testsuite/tests/th/T12130.hs
patching file testsuite/tests/th/T12130a.hs
can't find file to patch at input line 97
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T
|index 75364dc..bd59c4e 100644
|--- a/testsuite/tests/th/all.T
|+++ b/testsuite/tests/th/all.T
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
1 out of 1 hunk ignored
builder for
‘/home/user/nix/store/aqmsxln2avyla8p7m5504ilqnxibq3wh-ghc-8.0.1.drv’
failed with exit code 1

Is GHC broken for anyone else? And if not, what makes my setup special? Am
I being redirected to the wrong patch url somehow?
Jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160920/7d03a78e/attachment.html>


More information about the nix-dev mailing list