summary refs log tree commit diff
path: root/pkgs/development/compilers/ghc/8.10.1.nix
diff options
context:
space:
mode:
authorCheng Shao <cheng.shao@tweag.io>2021-01-25 09:41:25 +0000
committerPeter Simons <simons@cryp.to>2021-02-05 22:54:09 +0100
commit643169bbb48126a3b6ec3c4a32bbbe7a815d11c8 (patch)
treeb56136a4500eaef97f81c7636d2f661d31017c74 /pkgs/development/compilers/ghc/8.10.1.nix
parent2a0677fd9aa6c7e4aeccc5dd197fb2385b0fca8e (diff)
downloadnixpkgs-643169bbb48126a3b6ec3c4a32bbbe7a815d11c8.tar
nixpkgs-643169bbb48126a3b6ec3c4a32bbbe7a815d11c8.tar.gz
nixpkgs-643169bbb48126a3b6ec3c4a32bbbe7a815d11c8.tar.bz2
nixpkgs-643169bbb48126a3b6ec3c4a32bbbe7a815d11c8.tar.lz
nixpkgs-643169bbb48126a3b6ec3c4a32bbbe7a815d11c8.tar.xz
nixpkgs-643169bbb48126a3b6ec3c4a32bbbe7a815d11c8.tar.zst
nixpkgs-643169bbb48126a3b6ec3c4a32bbbe7a815d11c8.zip
Fix ar command path in GHC.
Previously, the "ar command" in the global config of GHC in nixpkgs is
simply "ar" instead of a proper absolute path in the nix store. This
will result in an "ar: command not found" error when using GHC and cabal
in a pure nix shell. This commit adds the patch and applies to all
pre-9.0 versions.

See output of ghc --info for "ar command" value.
Diffstat (limited to 'pkgs/development/compilers/ghc/8.10.1.nix')
-rw-r--r--pkgs/development/compilers/ghc/8.10.1.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/development/compilers/ghc/8.10.1.nix b/pkgs/development/compilers/ghc/8.10.1.nix
index 661dd5cb002..83604630545 100644
--- a/pkgs/development/compilers/ghc/8.10.1.nix
+++ b/pkgs/development/compilers/ghc/8.10.1.nix
@@ -116,6 +116,16 @@ stdenv.mkDerivation (rec {
 
   outputs = [ "out" "doc" ];
 
+  patches = [
+    # See upstream patch at
+    # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4885. Since we build
+    # from source distributions, the auto-generated configure script needs to be
+    # patched as well, therefore we use an in-tree patch instead of pulling the
+    # upstream patch. Don't forget to check backport status of the upstream patch
+    # when adding new GHC releases in nixpkgs.
+    ./respect-ar-path.patch
+  ];
+
   postPatch = "patchShebangs .";
 
   # GHC is a bit confused on its cross terminology.