···11{ lib, stdenv
22, fetchurl, perl, gcc
33-, ncurses6, gmp, glibc, libiconv, numactl
33+, ncurses5
44+, ncurses6, gmp, libiconv, numactl
45, llvmPackages
5667 # minimal = true; will remove files that aren't strictly necessary for
···1415assert stdenv.targetPlatform == stdenv.hostPlatform;
15161617let
1818+ downloadsUrl = "https://downloads.haskell.org/ghc";
1919+2020+ version = "8.10.2";
2121+2222+ # Information about available bindists that we use in the build.
2323+ #
2424+ # # Bindist library checking
2525+ #
2626+ # The field `archSpecificLibraries` also provides a way for us get notified
2727+ # early when the upstream bindist changes its dependencies (e.g. because a
2828+ # newer Debian version is used that uses a new `ncurses` version).
2929+ #
3030+ # Usage:
3131+ #
3232+ # * You can find the `fileToCheckFor` of libraries by running `readelf -d`
3333+ # on the compiler binary (`exePathForLibraryCheck`).
3434+ # * To skip library checking for an architecture,
3535+ # set `exePathForLibraryCheck = null`.
3636+ # * To skip file checking for a specific arch specfic library,
3737+ # set `fileToCheckFor = null`.
3838+ ghcBinDists = {
3939+ # Binary distributions for the default libc (e.g. glibc, or libSystem on Darwin)
4040+ # nixpkgs uses for the respective system.
4141+ defaultLibc = {
4242+ i686-linux = {
4343+ src = {
4444+ url = "${downloadsUrl}/${version}/ghc-${version}-i386-deb9-linux.tar.xz";
4545+ sha256 = "0bvwisl4w0z5z8z0da10m9sv0mhm9na2qm43qxr8zl23mn32mblx";
4646+ };
4747+ exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2";
4848+ archSpecificLibraries = [
4949+ # The i686-linux bindist provided by GHC HQ is currently built on Debian 9,
5050+ # which link it against `libtinfo.so.5` (ncurses 5).
5151+ # Other bindists are linked `libtinfo.so.6` (ncurses 6).
5252+ { nixPackage = ncurses5; fileToCheckFor = "libtinfo.so.5"; }
5353+ ];
5454+ };
5555+ x86_64-linux = {
5656+ src = {
5757+ url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-deb10-linux.tar.xz";
5858+ sha256 = "0chnzy9j23b2wa8clx5arwz8wnjfxyjmz9qkj548z14cqf13slcl";
5959+ };
6060+ exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2";
6161+ archSpecificLibraries = [
6262+ { nixPackage = ncurses6; fileToCheckFor = "libtinfo.so.6"; }
6363+ ];
6464+ };
6565+ armv7l-linux = {
6666+ src = {
6767+ url = "${downloadsUrl}/${version}/ghc-${version}-armv7-deb10-linux.tar.xz";
6868+ sha256 = "1j41cq5d3rmlgz7hzw8f908fs79gc5mn3q5wz277lk8zdf19g75v";
6969+ };
7070+ exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2";
7171+ archSpecificLibraries = [
7272+ { nixPackage = ncurses6; fileToCheckFor = "libtinfo.so.6"; }
7373+ ];
7474+ };
7575+ aarch64-linux = {
7676+ src = {
7777+ url = "${downloadsUrl}/${version}/ghc-${version}-aarch64-deb10-linux.tar.xz";
7878+ sha256 = "14smwl3741ixnbgi0l51a7kh7xjkiannfqx15b72svky0y4l3wjw";
7979+ };
8080+ exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2";
8181+ archSpecificLibraries = [
8282+ { nixPackage = ncurses6; fileToCheckFor = "libtinfo.so.6"; }
8383+ { nixPackage = numactl; fileToCheckFor = null; }
8484+ ];
8585+ };
8686+ x86_64-darwin = {
8787+ src = {
8888+ url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-apple-darwin.tar.xz";
8989+ sha256 = "1hngyq14l4f950hzhh2d204ca2gfc98pc9xdasxihzqd1jq75dzd";
9090+ };
9191+ exePathForLibraryCheck = null; # we don't have a library check for darwin yet
9292+ archSpecificLibraries = [
9393+ { nixPackage = ncurses6; fileToCheckFor = null; }
9494+ { nixPackage = libiconv; fileToCheckFor = null; }
9595+ ];
9696+ };
9797+ };
9898+ # Binary distributions for the musl libc for the respective system.
9999+ musl = {
100100+ x86_64-linux = {
101101+ src = {
102102+ url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-alpine3.10-linux-integer-simple.tar.xz";
103103+ sha256 = "0xpcbyaxqyhbl6f0i3s4rp2jm67nqpkfh2qlbj3i2fiaix89ml0l";
104104+ };
105105+ exePathForLibraryCheck = "bin/ghc";
106106+ archSpecificLibraries = [
107107+ # In contrast to glibc builds, the musl-bindist uses `libncursesw.so.*`
108108+ # instead of `libtinfo.so.*.`
109109+ { nixPackage = ncurses6; fileToCheckFor = "libncursesw.so.6"; }
110110+ ];
111111+ };
112112+ };
113113+ };
114114+115115+ distSetName = if stdenv.hostPlatform.isMusl then "musl" else "defaultLibc";
116116+117117+ binDistUsed = ghcBinDists.${distSetName}.${stdenv.hostPlatform.system}
118118+ or (throw "cannot bootstrap GHC on this platform ('${stdenv.hostPlatform.system}' with libc '${distSetName}')");
119119+17120 useLLVM = !stdenv.targetPlatform.isx86;
181211919- libPath = lib.makeLibraryPath ([
2020- ncurses6 gmp
2121- ] ++ lib.optional (stdenv.hostPlatform.isDarwin) libiconv
2222- ++ lib.optional (stdenv.hostPlatform.isAarch64) numactl);
122122+ libPath =
123123+ lib.makeLibraryPath (
124124+ [
125125+ gmp
126126+ ]
127127+ # Add arch-specific libraries.
128128+ ++ map ({ nixPackage, ... }: nixPackage) binDistUsed.archSpecificLibraries
129129+ );
2313024131 libEnvVar = lib.optionalString stdenv.hostPlatform.isDarwin "DY"
25132 + "LD_LIBRARY_PATH";
261332727- glibcDynLinker = assert stdenv.isLinux;
2828- if stdenv.hostPlatform.libc == "glibc" then
2929- # Could be stdenv.cc.bintools.dynamicLinker, keeping as-is to avoid rebuild.
3030- ''"$(cat $NIX_CC/nix-support/dynamic-linker)"''
3131- else
3232- "${lib.getLib glibc}/lib/ld-linux*";
3333-3434- downloadsUrl = "https://downloads.haskell.org/ghc";
3535-36134in
3713538136stdenv.mkDerivation rec {
3939- version = "8.10.2";
137137+ inherit version;
4013841139 name = "ghc-${version}-binary";
421404343- # https://downloads.haskell.org/~ghc/8.10.2/
4444- src = fetchurl ({
4545- i686-linux = {
4646- url = "${downloadsUrl}/${version}/ghc-${version}-i386-deb9-linux.tar.xz";
4747- sha256 = "0bvwisl4w0z5z8z0da10m9sv0mhm9na2qm43qxr8zl23mn32mblx";
4848- };
4949- x86_64-linux = {
5050- url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-deb10-linux.tar.xz";
5151- sha256 = "0chnzy9j23b2wa8clx5arwz8wnjfxyjmz9qkj548z14cqf13slcl";
5252- };
5353- armv7l-linux = {
5454- url = "${downloadsUrl}/${version}/ghc-${version}-armv7-deb10-linux.tar.xz";
5555- sha256 = "1j41cq5d3rmlgz7hzw8f908fs79gc5mn3q5wz277lk8zdf19g75v";
5656- };
5757- aarch64-linux = {
5858- url = "${downloadsUrl}/${version}/ghc-${version}-aarch64-deb10-linux.tar.xz";
5959- sha256 = "14smwl3741ixnbgi0l51a7kh7xjkiannfqx15b72svky0y4l3wjw";
6060- };
6161- x86_64-darwin = {
6262- url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-apple-darwin.tar.xz";
6363- sha256 = "1hngyq14l4f950hzhh2d204ca2gfc98pc9xdasxihzqd1jq75dzd";
6464- };
6565- }.${stdenv.hostPlatform.system}
6666- or (throw "cannot bootstrap GHC on this platform"));
141141+ src = fetchurl binDistUsed.src;
6714268143 nativeBuildInputs = [ perl ];
6969- propagatedBuildInputs = lib.optionals useLLVM [ llvmPackages.llvm ];
144144+ propagatedBuildInputs =
145145+ lib.optionals useLLVM [ llvmPackages.llvm ]
146146+ # Because musl bindists currently provide no way to tell where
147147+ # libgmp is (see not [musl bindists have no .buildinfo]), we need
148148+ # to propagate `gmp`, otherwise programs built by this ghc will
149149+ # fail linking with `cannot find -lgmp` errors.
150150+ # Also, as of writing, the release pages of musl bindists claim
151151+ # that they use `integer-simple` and do not require `gmp`; however
152152+ # that is incorrect, so `gmp` is required until a release has been
153153+ # made that includes https://gitlab.haskell.org/ghc/ghc/-/issues/20059.
154154+ # (Note that for packaging the `-binary` compiler, nixpkgs does not care
155155+ # about whether or not `gmp` is used; this comment is just here to explain
156156+ # why the `gmp` dependency exists despite what the release page says.)
157157+ ++ lib.optionals stdenv.hostPlatform.isMusl [ gmp ]; # musl bindist needs this
70158159159+ # Set LD_LIBRARY_PATH or equivalent so that the programs running as part
160160+ # of the bindist installer can find the libraries they expect.
71161 # Cannot patchelf beforehand due to relative RPATHs that anticipate
7272- # the final install location/
162162+ # the final install location.
73163 ${libEnvVar} = libPath;
7416475165 postUnpack =
166166+ # Verify our assumptions of which `libtinfo.so` (ncurses) version is used,
167167+ # so that we know when ghc bindists upgrade that and we need to update the
168168+ # version used in `libPath`.
169169+ lib.optionalString
170170+ (binDistUsed.exePathForLibraryCheck != null)
171171+ # Note the `*` glob because some GHCs have a suffix when unpacked, e.g.
172172+ # the musl bindist has dir `ghc-VERSION-x86_64-unknown-linux/`.
173173+ # As a result, don't shell-quote this glob when splicing the string.
174174+ (let buildExeGlob = ''ghc-${version}*/"${binDistUsed.exePathForLibraryCheck}"''; in
175175+ lib.concatStringsSep "\n" [
176176+ (''
177177+ echo "Checking that ghc binary exists in bindist at ${buildExeGlob}"
178178+ if ! test -e ${buildExeGlob}; then
179179+ echo >&2 "GHC binary ${binDistUsed.exePathForLibraryCheck} could not be found in the bindist build directory (at ${buildExeGlob}) for arch ${stdenv.hostPlatform.system}, please check that ghcBinDists correctly reflect the bindist dependencies!"; exit 1;
180180+ fi
181181+ '')
182182+ (lib.concatMapStringsSep
183183+ "\n"
184184+ ({ fileToCheckFor, nixPackage }:
185185+ lib.optionalString (fileToCheckFor != null) ''
186186+ echo "Checking bindist for ${fileToCheckFor} to ensure that is still used"
187187+ if ! readelf -d ${buildExeGlob} | grep "${fileToCheckFor}"; then
188188+ echo >&2 "File ${fileToCheckFor} could not be found in ${binDistUsed.exePathForLibraryCheck} for arch ${stdenv.hostPlatform.system}, please check that ghcBinDists correctly reflect the bindist dependencies!"; exit 1;
189189+ fi
190190+191191+ echo "Checking that the nix package ${nixPackage} contains ${fileToCheckFor}"
192192+ if ! test -e "${lib.getLib nixPackage}/lib/${fileToCheckFor}"; then
193193+ echo >&2 "Nix package ${nixPackage} did not contain ${fileToCheckFor} for arch ${stdenv.hostPlatform.system}, please check that ghcBinDists correctly reflect the bindist dependencies!"; exit 1;
194194+ fi
195195+ ''
196196+ )
197197+ binDistUsed.archSpecificLibraries
198198+ )
199199+ ])
76200 # GHC has dtrace probes, which causes ld to try to open /usr/lib/libdtrace.dylib
77201 # during linking
7878- lib.optionalString stdenv.isDarwin ''
202202+ + lib.optionalString stdenv.isDarwin ''
79203 export NIX_LDFLAGS+=" -no_dtrace_dof"
80204 # not enough room in the object files for the full path to libiconv :(
81205 for exe in $(find . -type f -executable); do
···91215 patchShebangs ghc-${version}/configure
92216 '' +
93217 # We have to patch the GMP paths for the integer-gmp package.
218218+ # Note [musl bindists have no .buildinfo]
219219+ # Note that musl bindists do not contain them; unclear if that's intended;
220220+ # see: https://gitlab.haskell.org/ghc/ghc/-/issues/20073#note_363231
94221 ''
95222 find . -name integer-gmp.buildinfo \
96223 -exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${gmp.out}/lib@" {} \;
···106233 '' +
107234 # Rename needed libraries and binaries, fix interpreter
108235 lib.optionalString stdenv.isLinux ''
109109- find . -type f -perm -0100 -exec patchelf \
110110- --replace-needed libncurses${lib.optionalString stdenv.is64bit "w"}.so.6 libncurses.so \
111111- --interpreter ${glibcDynLinker} {} \;
112112-113113- sed -i "s|/usr/bin/perl|perl\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
114114- sed -i "s|/usr/bin/gcc|gcc\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
115115- '' +
116116- # We're kludging a glibc bindist into working with non-glibc...
117117- # Here we patch up the use of `__strdup` (part of glibc binary ABI)
118118- # to instead use `strdup` since musl doesn't provide __strdup
119119- # (`__strdup` is defined to be an alias of `strdup` anyway[1]).
120120- # [1] http://refspecs.linuxbase.org/LSB_4.0.0/LSB-Core-generic/LSB-Core-generic/baselib---strdup-1.html
121121- # Use objcopy magic to make the change:
122122- lib.optionalString stdenv.hostPlatform.isMusl ''
123123- find ./ghc-${version}/rts -name "libHSrts*.a" -exec ''${OBJCOPY:-objcopy} --redefine-sym __strdup=strdup {} \;
236236+ find . -type f -executable -exec patchelf \
237237+ --interpreter ${stdenv.cc.bintools.dynamicLinker} {} \;
124238 '';
125239126240 # fix for `configure: error: Your linker is affected by binutils #16177`
···130244131245 configurePlatforms = [ ];
132246 configureFlags = [
133133- "--with-gmp-libraries=${lib.getLib gmp}/lib"
134247 "--with-gmp-includes=${lib.getDev gmp}/include"
248248+ # Note `--with-gmp-libraries` does nothing for GHC bindists:
249249+ # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6124
135250 ] ++ lib.optional stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}"
251251+ # From: https://github.com/NixOS/nixpkgs/pull/43369/commits
136252 ++ lib.optional stdenv.hostPlatform.isMusl "--disable-ld-override";
137253138254 # No building is necessary, but calling make without flags ironically
139255 # calls install-strip ...
140256 dontBuild = true;
141257258258+ # Apparently necessary for the ghc Alpine (musl) bindist:
259259+ # When we strip, and then run the
260260+ # patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $p)" $p
261261+ # below, running ghc (e.g. during `installCheckPhase)` gives some apparently
262262+ # corrupted rpath or whatever makes the loader work on nonsensical strings:
263263+ # running install tests
264264+ # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: : symbol not found
265265+ # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: ir6zf6c9f86pfx8sr30n2vjy-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/../lib/x86_64-linux-ghc-8.10.5/libHSexceptions-0.10.4-ghc8.10.5.so: symbol not found
266266+ # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: y/lib/ghc-8.10.5/bin/../lib/x86_64-linux-ghc-8.10.5/libHStemplate-haskell-2.16.0.0-ghc8.10.5.so: symbol not found
267267+ # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: 8.10.5/libHStemplate-haskell-2.16.0.0-ghc8.10.5.so: symbol not found
268268+ # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: �: symbol not found
269269+ # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: �?: symbol not found
270270+ # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: 64-linux-ghc-8.10.5/libHSexceptions-0.10.4-ghc8.10.5.so: symbol not found
271271+ # This is extremely bogus and should be investigated.
272272+ dontStrip = if stdenv.hostPlatform.isMusl then true else false; # `if` for explicitness
273273+142274 # On Linux, use patchelf to modify the executables so that they can
143275 # find editline/gmp.
144276 postFixup = lib.optionalString stdenv.isLinux
···186318 find $out -type f -name '*.p_o' -delete
187319 find $out -type f -name '*.p_hi' -delete
188320 find $out -type f -name '*_p.a' -delete
189189- rm $out/lib/ghc-*/bin/ghc-iserv-prof
321321+ # `-f` because e.g. musl bindist does not have this file.
322322+ rm -f $out/lib/ghc-*/bin/ghc-iserv-prof
190323 # Hydra will redistribute this derivation, so we have to keep the docs for
191324 # legal reasons (retaining the legal notices etc)
192325 # As a last resort we could unpack the docs separately and symlink them in.
193326 # They're in $out/share/{doc,man}.
194327 '';
195328329329+ # In nixpkgs, musl based builds currently enable `pie` hardening by default
330330+ # (see `defaultHardeningFlags` in `make-derivation.nix`).
331331+ # But GHC cannot currently produce outputs that are ready for `-pie` linking.
332332+ # Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear.
333333+ # See:
334334+ # * https://github.com/NixOS/nixpkgs/issues/129247
335335+ # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580
336336+ hardeningDisable = lib.optional stdenv.targetPlatform.isMusl "pie";
337337+196338 doInstallCheck = true;
197339 installCheckPhase = ''
198340 unset ${libEnvVar}
···221363 homepage = "http://haskell.org/ghc";
222364 description = "The Glasgow Haskell Compiler";
223365 license = lib.licenses.bsd3;
224224- platforms = ["x86_64-linux" "armv7l-linux" "aarch64-linux" "i686-linux" "x86_64-darwin"];
366366+ # HACK: since we can't encode the libc / abi in platforms, we need
367367+ # to make the platform list dependent on the evaluation platform
368368+ # in order to avoid eval errors with musl which supports less
369369+ # platforms than the default libcs (i. e. glibc / libSystem).
370370+ # This is done for the benefit of Hydra, so `packagePlatforms`
371371+ # won't return any platforms that would cause an evaluation
372372+ # failure for `pkgsMusl.haskell.compiler.ghc8102Binary`, as
373373+ # long as the evaluator runs on a platform that supports
374374+ # `pkgsMusl`.
375375+ platforms = builtins.attrNames ghcBinDists.${distSetName};
225376 hydraPlatforms = builtins.filter (p: minimal || p != "aarch64-linux") platforms;
226377 maintainers = with lib.maintainers; [ lostnet ];
227378 };
+46-5
pkgs/development/compilers/ghc/8.10.4.nix
···3838 ghcFlavour ? lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
3939 (if useLLVM then "perf-cross" else "perf-cross-ncg")
40404141+, # Whether to build sphinx documentation.
4242+ enableDocs ? (
4343+ # Docs disabled for musl and cross because it's a large task to keep
4444+ # all `sphinx` dependencies building in those environments.
4545+ # `sphinx` pulls in among others:
4646+ # Ruby, Python, Perl, Rust, OpenGL, Xorg, gtk, LLVM.
4747+ (stdenv.targetPlatform == stdenv.hostPlatform)
4848+ && !stdenv.hostPlatform.isMusl
4949+ )
5050+5151+, enableHaddockProgram ?
5252+ # Disabled for cross; see note [HADDOCK_DOCS].
5353+ (stdenv.targetPlatform == stdenv.hostPlatform)
5454+4155, # Whether to disable the large address space allocator
4256 # necessary fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
4357 disableLargeAddressSpace ? stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64
4458}:
45594660assert !enableIntegerSimple -> gmp != null;
6161+6262+# Cross cannot currently build the `haddock` program for silly reasons,
6363+# see note [HADDOCK_DOCS].
6464+assert (stdenv.targetPlatform != stdenv.hostPlatform) -> !enableHaddockProgram;
47654866let
4967 inherit (stdenv) buildPlatform hostPlatform targetPlatform;
···6078 ifneq \"\$(BuildFlavour)\" \"\"
6179 include mk/flavours/\$(BuildFlavour).mk
6280 endif
8181+ BUILD_SPHINX_HTML = ${if enableDocs then "YES" else "NO"}
8282+ BUILD_SPHINX_PDF = NO
8383+ '' +
8484+ # Note [HADDOCK_DOCS]:
8585+ # Unfortunately currently `HADDOCK_DOCS` controls both whether the `haddock`
8686+ # program is built (which we generally always want to have a complete GHC install)
8787+ # and whether it is run on the GHC sources to generate hyperlinked source code
8888+ # (which is impossible for cross-compilation); see:
8989+ # https://gitlab.haskell.org/ghc/ghc/-/issues/20077
9090+ # This implies that currently a cross-compiled GHC will never have a `haddock`
9191+ # program, so it can never generate haddocks for any packages.
9292+ # If this is solved in the future, we'd like to unconditionally
9393+ # build the haddock program (removing the `enableHaddockProgram` option).
9494+ ''
9595+ HADDOCK_DOCS = ${if enableHaddockProgram then "YES" else "NO"}
6396 DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
6497 INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
6598 '' + lib.optionalString (targetPlatform != hostPlatform) ''
6699 Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
67100 CrossCompilePrefix = ${targetPrefix}
6868- HADDOCK_DOCS = NO
6969- BUILD_SPHINX_HTML = NO
7070- BUILD_SPHINX_PDF = NO
71101 '' + lib.optionalString (!enableProfiledLibs) ''
72102 GhcLibWays = "v dyn"
73103 '' + lib.optionalString enableRelocatedStaticLibs ''
···217247 dontAddExtraLibs = true;
218248219249 nativeBuildInputs = [
220220- perl autoconf automake m4 python3 sphinx
250250+ perl autoconf automake m4 python3
221251 ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
252252+ ] ++ lib.optionals enableDocs [
253253+ sphinx
222254 ];
223255224256 # For building runtime libs
···238270239271 checkTarget = "test";
240272241241- hardeningDisable = [ "format" ] ++ lib.optional stdenv.targetPlatform.isMusl "pie";
273273+ hardeningDisable =
274274+ [ "format" ]
275275+ # In nixpkgs, musl based builds currently enable `pie` hardening by default
276276+ # (see `defaultHardeningFlags` in `make-derivation.nix`).
277277+ # But GHC cannot currently produce outputs that are ready for `-pie` linking.
278278+ # Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear.
279279+ # See:
280280+ # * https://github.com/NixOS/nixpkgs/issues/129247
281281+ # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580
282282+ ++ lib.optional stdenv.targetPlatform.isMusl "pie";
242283243284 postInstall = ''
244285 # Install the bash completion file.
+13-1
pkgs/development/compilers/ghc/8.6.5-binary.nix
···121121122122 configurePlatforms = [ ];
123123 configureFlags = [
124124- "--with-gmp-libraries=${lib.getLib gmp}/lib"
125124 "--with-gmp-includes=${lib.getDev gmp}/include"
125125+ # Note `--with-gmp-libraries` does nothing for GHC bindists:
126126+ # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6124
126127 ] ++ lib.optional stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}"
127128 ++ lib.optional stdenv.hostPlatform.isMusl "--disable-ld-override";
128129···152153 done
153154 '';
154155156156+ # In nixpkgs, musl based builds currently enable `pie` hardening by default
157157+ # (see `defaultHardeningFlags` in `make-derivation.nix`).
158158+ # But GHC cannot currently produce outputs that are ready for `-pie` linking.
159159+ # Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear.
160160+ # See:
161161+ # * https://github.com/NixOS/nixpkgs/issues/129247
162162+ # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580
163163+ hardeningDisable = lib.optional stdenv.targetPlatform.isMusl "pie";
164164+155165 doInstallCheck = true;
156166 installCheckPhase = ''
157167 unset ${libEnvVar}
···180190 license = lib.licenses.bsd3;
181191 platforms = ["x86_64-linux" "aarch64-linux" "i686-linux" "x86_64-darwin"];
182192 hydraPlatforms = builtins.filter (p: p != "aarch64-linux") platforms;
193193+ # build segfaults, use ghc8102Binary which has proper musl support instead
194194+ broken = stdenv.hostPlatform.isMusl;
183195 };
184196}
+53-9
pkgs/development/compilers/ghc/8.8.4.nix
···3838 ghcFlavour ? lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
3939 (if useLLVM then "perf-cross" else "perf-cross-ncg")
40404141+, # Whether to build sphinx documentation.
4242+ enableDocs ? (
4343+ # Docs disabled for musl and cross because it's a large task to keep
4444+ # all `sphinx` dependencies building in those environments.
4545+ # `sphinx` pullls in among others:
4646+ # Ruby, Python, Perl, Rust, OpenGL, Xorg, gtk, LLVM.
4747+ (stdenv.targetPlatform == stdenv.hostPlatform)
4848+ && !stdenv.hostPlatform.isMusl
4949+ )
5050+5151+, enableHaddockProgram ?
5252+ # Disabled for cross; see note [HADDOCK_DOCS].
5353+ (stdenv.targetPlatform == stdenv.hostPlatform)
5454+4155, # Whether to disable the large address space allocator
4256 # necessary fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
4357 disableLargeAddressSpace ? stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64
···45594660assert !enableIntegerSimple -> gmp != null;
47616262+# Cross cannot currently build the `haddock` program for silly reasons,
6363+# see note [HADDOCK_DOCS].
6464+assert (stdenv.targetPlatform != stdenv.hostPlatform) -> !enableHaddockProgram;
6565+4866let
4967 inherit (stdenv) buildPlatform hostPlatform targetPlatform;
5068···6078 ifneq \"\$(BuildFlavour)\" \"\"
6179 include mk/flavours/\$(BuildFlavour).mk
6280 endif
8181+ BUILD_SPHINX_HTML = ${if enableDocs then "YES" else "NO"}
8282+ BUILD_SPHINX_PDF = NO
8383+ '' +
8484+ # Note [HADDOCK_DOCS]:
8585+ # Unfortunately currently `HADDOCK_DOCS` controls both whether the `haddock`
8686+ # program is built (which we generally always want to have a complete GHC install)
8787+ # and whether it is run on the GHC sources to generate hyperlinked source code
8888+ # (which is impossible for cross-compilation); see:
8989+ # https://gitlab.haskell.org/ghc/ghc/-/issues/20077
9090+ # This implies that currently a cross-compiled GHC will never have a `haddock`
9191+ # program, so it can never generate haddocks for any packages.
9292+ # If this is solved in the future, we'd like to unconditionally
9393+ # build the haddock program (removing the `enableHaddockProgram` option).
9494+ ''
9595+ HADDOCK_DOCS = ${if enableHaddockProgram then "YES" else "NO"}
6396 DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
6497 INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
6598 ''
···72105 + lib.optionalString (targetPlatform != hostPlatform) ''
73106 Stage1Only = ${if (targetPlatform.system == hostPlatform.system && !targetPlatform.isiOS) then "NO" else "YES"}
74107 CrossCompilePrefix = ${targetPrefix}
7575- HADDOCK_DOCS = NO
7676- BUILD_SPHINX_HTML = NO
7777- BUILD_SPHINX_PDF = NO
78108 '' + lib.optionalString dontStrip ''
79109 STRIP_CMD = :
80110 '' + lib.optionalString (!enableProfiledLibs) ''
···142172 postPatch = "patchShebangs .";
143173144174 # GHC is a bit confused on its cross terminology.
145145- preConfigure = lib.optionalString stdenv.isAarch64 ''
175175+ preConfigure =
146176 # Aarch64 allow backward bootstrapping since earlier versions are unstable.
147147- find . -name \*\.cabal\* -exec sed -i -e 's/\(base.*\)4.14/\14.16/' {} \; \
148148- -exec sed -i -e 's/\(prim.*\)0.6/\10.8/' {} \;
149149- '' + ''
177177+ # Same for musl, as earlier versions do not provide a musl bindist for bootstrapping.
178178+ lib.optionalString (stdenv.isAarch64 || stdenv.hostPlatform.isMusl) ''
179179+ find . -name \*\.cabal\* -exec sed -i -e 's/\(base.*\)4.14/\14.16/' {} \; \
180180+ -exec sed -i -e 's/\(prim.*\)0.6/\10.8/' {} \;
181181+ ''
182182+ + ''
150183 for env in $(env | grep '^TARGET_' | sed -E 's|\+?=.*||'); do
151184 export "''${env#TARGET_}=''${!env}"
152185 done
···224257 dontAddExtraLibs = true;
225258226259 nativeBuildInputs = [
227227- perl autoconf automake m4 python3 sphinx
260260+ perl autoconf automake m4 python3
228261 ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
262262+ ] ++ lib.optionals enableDocs [
263263+ sphinx
229264 ];
230265231266 # For building runtime libs
···245280246281 checkTarget = "test";
247282248248- hardeningDisable = [ "format" ] ++ lib.optional stdenv.targetPlatform.isMusl "pie";
283283+ hardeningDisable =
284284+ [ "format" ]
285285+ # In nixpkgs, musl based builds currently enable `pie` hardening by default
286286+ # (see `defaultHardeningFlags` in `make-derivation.nix`).
287287+ # But GHC cannot currently produce outputs that are ready for `-pie` linking.
288288+ # Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear.
289289+ # See:
290290+ # * https://github.com/NixOS/nixpkgs/issues/129247
291291+ # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580
292292+ ++ lib.optional stdenv.targetPlatform.isMusl "pie";
249293250294 postInstall = ''
251295 # Install the bash completion file.
+47-6
pkgs/development/compilers/ghc/9.0.1.nix
···3939 ghcFlavour ? lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
4040 (if useLLVM then "perf-cross" else "perf-cross-ncg")
41414242+, # Whether to build sphinx documentation.
4343+ enableDocs ? (
4444+ # Docs disabled for musl and cross because it's a large task to keep
4545+ # all `sphinx` dependencies building in those environments.
4646+ # `sphinx` pullls in among others:
4747+ # Ruby, Python, Perl, Rust, OpenGL, Xorg, gtk, LLVM.
4848+ (stdenv.targetPlatform == stdenv.hostPlatform)
4949+ && !stdenv.hostPlatform.isMusl
5050+ )
5151+5252+, enableHaddockProgram ?
5353+ # Disabled for cross; see note [HADDOCK_DOCS].
5454+ (stdenv.targetPlatform == stdenv.hostPlatform)
5555+4256, # Whether to disable the large address space allocator
4357 # necessary fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
4458 disableLargeAddressSpace ? stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64
···46604761assert !enableIntegerSimple -> gmp != null;
48626363+# Cross cannot currently build the `haddock` program for silly reasons,
6464+# see note [HADDOCK_DOCS].
6565+assert (stdenv.targetPlatform != stdenv.hostPlatform) -> !enableHaddockProgram;
6666+4967let
5068 inherit (stdenv) buildPlatform hostPlatform targetPlatform;
5169···6179 ifneq \"\$(BuildFlavour)\" \"\"
6280 include mk/flavours/\$(BuildFlavour).mk
6381 endif
8282+ BUILD_SPHINX_HTML = ${if enableDocs then "YES" else "NO"}
8383+ BUILD_SPHINX_PDF = NO
8484+ '' +
8585+ # Note [HADDOCK_DOCS]:
8686+ # Unfortunately currently `HADDOCK_DOCS` controls both whether the `haddock`
8787+ # program is built (which we generally always want to have a complete GHC install)
8888+ # and whether it is run on the GHC sources to generate hyperlinked source code
8989+ # (which is impossible for cross-compilation); see:
9090+ # https://gitlab.haskell.org/ghc/ghc/-/issues/20077
9191+ # This implies that currently a cross-compiled GHC will never have a `haddock`
9292+ # program, so it can never generate haddocks for any packages.
9393+ # If this is solved in the future, we'd like to unconditionally
9494+ # build the haddock program (removing the `enableHaddockProgram` option).
9595+ ''
9696+ HADDOCK_DOCS = ${if enableHaddockProgram then "YES" else "NO"}
6497 DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
6598 INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
6699 '' + lib.optionalString (targetPlatform != hostPlatform) ''
67100 Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
68101 CrossCompilePrefix = ${targetPrefix}
6969- HADDOCK_DOCS = NO
7070- BUILD_SPHINX_HTML = NO
7171- BUILD_SPHINX_PDF = NO
72102 '' + lib.optionalString (!enableProfiledLibs) ''
73103 GhcLibWays = "v dyn"
74104 '' + lib.optionalString enableRelocatedStaticLibs ''
···143173144174 echo -n "${buildMK}" > mk/build.mk
145175 sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
146146- '' + lib.optionalString (stdenv.isLinux) ''
176176+ '' + lib.optionalString (stdenv.isLinux && hostPlatform.libc == "glibc") ''
147177 export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive"
148178 '' + lib.optionalString (!stdenv.isDarwin) ''
149179 export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
···204234 dontAddExtraLibs = true;
205235206236 nativeBuildInputs = [
207207- perl autoconf automake m4 python3 sphinx
237237+ perl autoconf automake m4 python3
208238 ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
239239+ ] ++ lib.optionals enableDocs [
240240+ sphinx
209241 ];
210242211243 # For building runtime libs
···225257226258 checkTarget = "test";
227259228228- hardeningDisable = [ "format" ] ++ lib.optional stdenv.targetPlatform.isMusl "pie";
260260+ hardeningDisable =
261261+ [ "format" ]
262262+ # In nixpkgs, musl based builds currently enable `pie` hardening by default
263263+ # (see `defaultHardeningFlags` in `make-derivation.nix`).
264264+ # But GHC cannot currently produce outputs that are ready for `-pie` linking.
265265+ # Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear.
266266+ # See:
267267+ # * https://github.com/NixOS/nixpkgs/issues/129247
268268+ # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580
269269+ ++ lib.optional stdenv.targetPlatform.isMusl "pie";
229270230271 postInstall = ''
231272 # Install the bash completion file.
+46-5
pkgs/development/compilers/ghc/head.nix
···4646 ghcFlavour ? lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
4747 (if useLLVM then "perf-cross" else "perf-cross-ncg")
48484949+, # Whether to build sphinx documentation.
5050+ enableDocs ? (
5151+ # Docs disabled for musl and cross because it's a large task to keep
5252+ # all `sphinx` dependencies building in those environments.
5353+ # `sphinx` pullls in among others:
5454+ # Ruby, Python, Perl, Rust, OpenGL, Xorg, gtk, LLVM.
5555+ (stdenv.targetPlatform == stdenv.hostPlatform)
5656+ && !stdenv.hostPlatform.isMusl
5757+ )
5858+5959+, enableHaddockProgram ?
6060+ # Disabled for cross; see note [HADDOCK_DOCS].
6161+ (stdenv.targetPlatform == stdenv.hostPlatform)
6262+4963, # Whether to disable the large address space allocator
5064 # necessary fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
5165 disableLargeAddressSpace ? stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64
5266}:
53675468assert !enableNativeBignum -> gmp != null;
6969+7070+# Cross cannot currently build the `haddock` program for silly reasons,
7171+# see note [HADDOCK_DOCS].
7272+assert (stdenv.targetPlatform != stdenv.hostPlatform) -> !enableHaddockProgram;
55735674let
5775 inherit (stdenv) buildPlatform hostPlatform targetPlatform;
···6886 ifneq \"\$(BuildFlavour)\" \"\"
6987 include mk/flavours/\$(BuildFlavour).mk
7088 endif
8989+ BUILD_SPHINX_HTML = ${if enableDocs then "YES" else "NO"}
9090+ BUILD_SPHINX_PDF = NO
9191+ '' +
9292+ # Note [HADDOCK_DOCS]:
9393+ # Unfortunately currently `HADDOCK_DOCS` controls both whether the `haddock`
9494+ # program is built (which we generally always want to have a complete GHC install)
9595+ # and whether it is run on the GHC sources to generate hyperlinked source code
9696+ # (which is impossible for cross-compilation); see:
9797+ # https://gitlab.haskell.org/ghc/ghc/-/issues/20077
9898+ # This implies that currently a cross-compiled GHC will never have a `haddock`
9999+ # program, so it can never generate haddocks for any packages.
100100+ # If this is solved in the future, we'd like to unconditionally
101101+ # build the haddock program (removing the `enableHaddockProgram` option).
102102+ ''
103103+ HADDOCK_DOCS = ${if enableHaddockProgram then "YES" else "NO"}
71104 DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
72105 BIGNUM_BACKEND = ${if enableNativeBignum then "native" else "gmp"}
73106 '' + lib.optionalString (targetPlatform != hostPlatform) ''
74107 Stage1Only = ${if (targetPlatform.system == hostPlatform.system && !targetPlatform.isiOS) then "NO" else "YES"}
75108 CrossCompilePrefix = ${targetPrefix}
7676- HADDOCK_DOCS = NO
7777- BUILD_SPHINX_HTML = NO
7878- BUILD_SPHINX_PDF = NO
79109 '' + lib.optionalString dontStrip ''
80110 STRIP_CMD = :
81111 '' + lib.optionalString (!enableProfiledLibs) ''
···221251 dontAddExtraLibs = true;
222252223253 nativeBuildInputs = [
224224- perl autoconf autoreconfHook automake m4 python3 sphinx
254254+ perl autoconf autoreconfHook automake m4 python3
225255 ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
256256+ ] ++ lib.optionals enableDocs [
257257+ sphinx
226258 ];
227259228260 # For building runtime libs
···242274243275 checkTarget = "test";
244276245245- hardeningDisable = [ "format" ] ++ lib.optional stdenv.targetPlatform.isMusl "pie";
277277+ hardeningDisable =
278278+ [ "format" ]
279279+ # In nixpkgs, musl based builds currently enable `pie` hardening by default
280280+ # (see `defaultHardeningFlags` in `make-derivation.nix`).
281281+ # But GHC cannot currently produce outputs that are ready for `-pie` linking.
282282+ # Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear.
283283+ # See:
284284+ # * https://github.com/NixOS/nixpkgs/issues/129247
285285+ # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580
286286+ ++ lib.optional stdenv.targetPlatform.isMusl "pie";
246287247288 postInstall = ''
248289 # Install the bash completion file.
···914914915915 cachix = generateOptparseApplicativeCompletion "cachix" super.cachix;
916916917917+ # Enable extra optimisations which increase build time, but also
918918+ # later compiler performance, so we should do this for user's benefit.
919919+ # Flag added in Agda 2.6.2
920920+ Agda = appendConfigureFlag super.Agda "-foptimise-heavily";
921921+917922}
···34343535 patchFlags = lib.optional stdenv.hostPlatform.isDarwin "-p0";
36363737- preConfigure = lib.optionalString stdenv.hostPlatform.isLinux "export CFLAGS='-fgnu89-inline'";
3737+ # For currently unknown reason, `-fPIC` has to be passed explicitly, otherwise
3838+ # downstream software like `elfutils` will get `recompile errors like:
3939+ # libargp.a(argp-help.o): relocation R_X86_64_PC32 against symbol `program_invocation_short_name' can not be used when making a shared object; recompile with -fPIC
4040+ # It seems that nixpkgs's on-by-default `-fPIC` is not in effect here.
4141+ preConfigure = lib.optionalString stdenv.hostPlatform.isLinux "export CFLAGS='-fgnu89-inline -fPIC'";
38423943 postInstall = ''
4044 mkdir -p $out/lib $out/include
+20-20
pkgs/misc/vscode-extensions/default.nix
···205205 mktplcRef = {
206206 name = "vscode-tailwindcss";
207207 publisher = "bradlc";
208208- version = "0.6.6";
209209- sha256 = "sha256-CRd+caKHFOXBnePr/LqNkzw0kRGYvNSkf4ecNgedpdA=";
208208+ version = "0.6.13";
209209+ sha256 = "098vrm28b7jpzk0c2d0cgxvdw4jsswzf18cx1m9jwsm1j40fp5f4";
210210 };
211211 meta = with lib; {
212212 license = licenses.mpl20;
···270270 mktplcRef = {
271271 name = "bracket-pair-colorizer-2";
272272 publisher = "CoenraadS";
273273- version = "0.2.0";
274274- sha256 = "0nppgfbmw0d089rka9cqs3sbd5260dhhiipmjfga3nar9vp87slh";
273273+ version = "0.2.1";
274274+ sha256 = "0bfvzs4ac537zqhnqaa38jf4lhiy1fmqcv6lq89nnx8k963380z7";
275275 };
276276 meta = with lib; {
277277 license = licenses.mit;
···454454 mktplcRef = {
455455 name = "vscode-great-icons";
456456 publisher = "emmanuelbeziat";
457457- version = "2.1.64";
458458- sha256 = "sha256-qsL1vWiEAYeWkMDNSrr1yzg0QxroEQQeznoDL3Ujy/o=";
457457+ version = "2.1.79";
458458+ sha256 = "1cr1pxgxlfr643sfxbcr2xd53s1dnzcpacjj0ffkgizfda2psy78";
459459 };
460460 meta = with lib; {
461461 license = licenses.mit;
···474474 mktplcRef = {
475475 name = "prettier-vscode";
476476 publisher = "esbenp";
477477- version = "5.8.0";
478478- sha256 = "0h7wc4pffyq1i8vpj4a5az02g2x04y7y1chilmcfmzg2w42xpby7";
477477+ version = "8.0.1";
478478+ sha256 = "017lqpmzjxq5f1zr49akcm9gfki0qq8v7pj7gks6a3szjdx16mnl";
479479 };
480480 };
481481···776776 mktplcRef = {
777777 name = "svg";
778778 publisher = "jock";
779779- version = "1.4.4";
780780- sha256 = "0kn2ic7pgbd4rbvzpsxfwyiwxa1iy92l0h3jsppxc8gk8xbqm2nc";
779779+ version = "1.4.7";
780780+ sha256 = "04ghqg4s7g7yylmvbxzwzpnyy4zin2bwlgvflh18m77w4j0ckpiq";
781781 };
782782 meta = with lib; {
783783 license = licenses.mit;
···824824 mktplcRef = {
825825 name = "magit";
826826 publisher = "kahole";
827827- version = "0.6.15";
828828- sha256 = "sha256-fRXm70FXnHduoywI4YC9ya6/J7wyd6EBzbnrcijBIbA=";
827827+ version = "0.6.18";
828828+ sha256 = "0sqzz5bbqqg60aypvwxcqnxrr72gmwfj9sv0amgkyaf60zg5sf7w";
829829 };
830830 meta = {
831831 license = lib.licenses.mit;
···10961096 mktplcRef = {
10971097 name = "crates";
10981098 publisher = "serayuzgur";
10991099- version = "0.5.3";
11001100- sha256 = "1xk7ayv590hsm3scqpyh6962kvgdlinnpkx0vapr7vs4y08dx72f";
10991099+ version = "0.5.9";
11001100+ sha256 = "0l26pyvw7n3bszf97yx6qps72acq112akg3q4jq5mvlibng1nwk0";
11011101 };
11021102 meta = {
11031103 license = lib.licenses.mit;
···11981198 mktplcRef = {
11991199 name = "svelte-vscode";
12001200 publisher = "svelte";
12011201- version = "105.0.0";
12021202- sha256 = "sha256-my3RzwUW5MnajAbEnqxtrIR701XH+AKYLbnKD7ivASE=";
12011201+ version = "105.3.0";
12021202+ sha256 = "11plqsj3c4dv0xg2d76pxrcn382qr9wbh1lhln2x8mzv840icvwr";
12031203 };
12041204 meta = {
12051205 license = lib.licenses.mit;
···12521252 mktplcRef = {
12531253 name = "shellcheck";
12541254 publisher = "timonwong";
12551255- version = "0.14.1";
12561256- sha256 = "sha256-X3ihMxANcqNLWl9oTZjCgwRt1uBsSN2BmC2D4dPRFLE=";
12551255+ version = "0.14.4";
12561256+ sha256 = "05z314sw9nqym3qlj7dcwm0fz1hb23xppzqn3nr2wcj17hs8zz4m";
12571257 };
12581258 nativeBuildInputs = [ jq ];
12591259 postInstall = ''
···13231323 mktplcRef = {
13241324 name = "vim";
13251325 publisher = "vscodevim";
13261326- version = "1.11.3";
13271327- sha256 = "1smzsgcrkhghbnpy51gp28kh74l7y4s2m8pfxabb4ffb751254j0";
13261326+ version = "1.21.5";
13271327+ sha256 = "1v1xs1wcigisr6xip31i02cfryxrb157sla34y59pwlnhc5x1gny";
13281328 };
13291329 meta = {
13301330 license = lib.licenses.mit;
···11+# Wrap only the haskell-related tests from tests.writers
22+# in their own derivation for Hydra CI in the haskell-updates
33+# jobset. Can presumably removed as soon as tests.writers is
44+# always green on darwin as well:
55+# https://github.com/NixOS/nixpkgs/issues/126182
66+{ runCommand, tests }:
77+88+let
99+ inherit (tests.writers)
1010+ writeTest
1111+ bin
1212+ simple
1313+ path
1414+ ;
1515+in
1616+1717+runCommand "test-haskell-writers" {
1818+ meta = {
1919+ inherit (tests.writers.meta) platforms;
2020+ };
2121+} ''
2222+ ${writeTest "success" "test-haskell-bin-writer" "${bin.haskell}/bin/${bin.haskell.name}"}
2323+ ${writeTest "success" "test-haskell-simple-writer" simple.haskell}
2424+ ${writeTest "success" "test-haskell-path-writer" path.haskell}
2525+ touch $out
2626+''
+4-2
pkgs/top-level/haskell-packages.nix
···57575858 ghc884 = callPackage ../development/compilers/ghc/8.8.4.nix {
5959 # aarch64 ghc865Binary gets SEGVs due to haskell#15449 or similar
6060- bootPkgs = if stdenv.isAarch64 then
6060+ # Musl bindists do not exist for ghc 8.6.5, so we use 8.10.* for them
6161+ bootPkgs = if stdenv.isAarch64 || stdenv.targetPlatform.isMusl then
6162 packages.ghc8102BinaryMinimal
6263 else
6364 packages.ghc865Binary;
···6768 };
6869 ghc8104 = callPackage ../development/compilers/ghc/8.10.4.nix {
6970 # aarch64 ghc865Binary gets SEGVs due to haskell#15449 or similar
7070- bootPkgs = if stdenv.isAarch64 || stdenv.isAarch32 then
7171+ # Musl bindists do not exist for ghc 8.6.5, so we use 8.10.* for them
7272+ bootPkgs = if stdenv.isAarch64 || stdenv.isAarch32 || stdenv.targetPlatform.isMusl then
7173 packages.ghc8102BinaryMinimal
7274 else
7375 packages.ghc865Binary;
+26-10
pkgs/top-level/release-haskell.nix
···8989 haskellPackages = packagePlatforms pkgs.haskellPackages;
9090 haskell.compiler = packagePlatforms pkgs.haskell.compiler;
91919292- tests = let
9393- testPlatforms = packagePlatforms pkgs.tests;
9494- in {
9595- haskell = testPlatforms.haskell;
9696- writers = testPlatforms.writers;
9292+ tests.haskell = packagePlatforms pkgs.tests.haskell;
9393+9494+ pkgsMusl.haskell.compiler = packagePlatforms pkgs.pkgsMusl.haskell.compiler // {
9595+ # remove musl ghc865Binary since it is known to be broken and
9696+ # causes an evaluation error on darwin.
9797+ # TODO: remove ghc865Binary altogether and use ghc8102Binary
9898+ ghc865Binary = {};
9799 };
9810099101 # test some statically linked packages to catch regressions
···247249 };
248250 constituents = accumulateDerivations [
249251 # haskell specific tests
250250- jobs.tests.haskell
251251- # writeHaskell and writeHaskellBin
252252- # TODO: writeHaskell currently fails on darwin
253253- jobs.tests.writers.x86_64-linux
254254- jobs.tests.writers.aarch64-linux
252252+ #
253253+ # TODO: The writers test appears to be failing on darwin for unknown
254254+ # reasons. See https://github.com/NixOS/nixpkgs/pull/129606#issuecomment-881307871.
255255+ (lib.recursiveUpdate jobs.tests.haskell { writers.x86_64-darwin = null; })
255256 # important top-level packages
256257 jobs.cabal-install
257258 jobs.cabal2nix
···307308 jobs.pkgsStatic.haskell.packages.integer-simple.ghc8104.lens.aarch64-linux
308309 jobs.pkgsStatic.haskell.packages.integer-simple.ghc8104.random.x86_64-linux
309310 jobs.pkgsStatic.haskell.packages.integer-simple.ghc8104.random.aarch64-linux
311311+ ];
312312+ };
313313+ muslGHCs = pkgs.releaseTools.aggregate {
314314+ name = "haskell-pkgsMusl-ghcs";
315315+ meta = {
316316+ description = "GHCs built with musl";
317317+ maintainers = with lib.maintainers; [
318318+ nh2
319319+ ];
320320+ };
321321+ constituents = accumulateDerivations [
322322+ jobs.pkgsMusl.haskell.compiler.ghc8102Binary
323323+ jobs.pkgsMusl.haskell.compiler.ghc884
324324+ jobs.pkgsMusl.haskell.compiler.ghc8104
325325+ jobs.pkgsMusl.haskell.compiler.ghc901
310326 ];
311327 };
312328 }