about summary refs log tree commit diff
path: root/pkgs/development/haskell-modules
diff options
context:
space:
mode:
authorIan-Woo Kim <ianwookim@gmail.com>2023-05-05 11:20:46 -0700
committerIan-Woo Kim <ianwookim@gmail.com>2023-06-14 10:14:57 -0700
commit77504c6a1e05a5434e7c831bae405e89acae4edf (patch)
treefbbcc3546a05b48fa35d14ad76539a7c2978c1f9 /pkgs/development/haskell-modules
parentb1600b56721473fb1f779ff49311afa7a8d498e2 (diff)
downloadnixlib-77504c6a1e05a5434e7c831bae405e89acae4edf.tar
nixlib-77504c6a1e05a5434e7c831bae405e89acae4edf.tar.gz
nixlib-77504c6a1e05a5434e7c831bae405e89acae4edf.tar.bz2
nixlib-77504c6a1e05a5434e7c831bae405e89acae4edf.tar.lz
nixlib-77504c6a1e05a5434e7c831bae405e89acae4edf.tar.xz
nixlib-77504c6a1e05a5434e7c831bae405e89acae4edf.tar.zst
nixlib-77504c6a1e05a5434e7c831bae405e89acae4edf.zip
ghcWithPackages: Fix a sed bug in patching package conf file
When making ghcWithPackages, haskell package db configuration
is modified by sed, but newlines are not handled properly, so
resulting in
```
dynamic-library-dirs: ${pkgroot}/../lib/aarch64-osx-ghc-9.6.1
data-dir:
    ${pkgroot}/../share/aarch64-osx-ghc-9.6.1/filepath-1.4.100.1
```
is replaced like (data-dir: is swallowed)
```
dynamic-library-dirs:
    /nix/store/zxmwvns8zg4ff47vw9hqgazjkiqa26kv-ghc-9.6.1-with-packages/lib/links
    ${pkgroot}/../share/aarch64-osx-ghc-9.6.1/filepath-1.4.100.1
```
This fixes the bug.
Diffstat (limited to 'pkgs/development/haskell-modules')
-rw-r--r--pkgs/development/haskell-modules/with-packages-wrapper.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/development/haskell-modules/with-packages-wrapper.nix b/pkgs/development/haskell-modules/with-packages-wrapper.nix
index 78e0bb91232e..03f59302a0d3 100644
--- a/pkgs/development/haskell-modules/with-packages-wrapper.nix
+++ b/pkgs/development/haskell-modules/with-packages-wrapper.nix
@@ -158,7 +158,7 @@ symlinkJoin {
       # $dynamicLinksDir
       cp $f $f-tmp
       rm $f
-      sed "N;s,dynamic-library-dirs:\s*.*,dynamic-library-dirs: $dynamicLinksDir," $f-tmp > $f
+      sed "N;s,dynamic-library-dirs:\s*.*\n,dynamic-library-dirs: $dynamicLinksDir\n," $f-tmp > $f
       rm $f-tmp
     done
   '') + ''