diff options
| author | Ralph Amissah <ralph.amissah@gmail.com> | 2026-08-27 18:06:18 -0400 |
|---|---|---|
| committer | Ralph Amissah <ralph.amissah@gmail.com> | 2026-08-28 10:42:56 -0400 |
| commit | 44f4c3fa1115f34b25af9d1518cde9de0e70c06c (patch) | |
| tree | 77e96cfefe7c11747a5d494ab38090fe0c5c04ed | |
| parent | run test-abstraction-ssp.sh update (diff) | |
dlang related nixpkgs overlay updates
- dmd 2.112.1
- ldc 1.43.0 beta1
- dub 1.41.0
- dtools 2.112.1
| -rw-r--r-- | flake.lock | 6 | ||||
| -rw-r--r-- | nix-overlays/README | 20 | ||||
| -rw-r--r-- | nix-overlays/dmd/binary.nix | 19 | ||||
| -rw-r--r-- | nix-overlays/dmd/generic.nix | 21 | ||||
| -rw-r--r-- | nix-overlays/dmd/package.nix | 6 | ||||
| -rw-r--r-- | nix-overlays/dtools/package.nix | 4 | ||||
| -rw-r--r-- | nix-overlays/dub/package.nix | 17 | ||||
| -rw-r--r-- | nix-overlays/ldc/bootstrap.nix | 25 | ||||
| -rw-r--r-- | nix-overlays/ldc/package.nix | 29 | ||||
| -rw-r--r-- | org/nix-develop-dlang-shared.org | 84 | ||||
| -rw-r--r-- | org/nixpkgs_overlays_d_related.org | 113 |
11 files changed, 259 insertions, 85 deletions
@@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1787631388, - "narHash": "sha256-vMiXptXarfSdJb1Gkc+FYVOAibuBRj7qxGa8z68q1Uw=", + "lastModified": 1787814960, + "narHash": "sha256-PYZq1qzCJXC2zGI0mH07vrZBsw6DRBAOX0jN1pPtqOQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ac6b2166e7a9375683b8e98f860f273222337b16", + "rev": "c27cdad491a991b11ed731760aa2ef8db0cb0410", "type": "github" }, "original": { diff --git a/nix-overlays/README b/nix-overlays/README index 61d2160..e114d37 100644 --- a/nix-overlays/README +++ b/nix-overlays/README @@ -17,10 +17,10 @@ of publishing, in some cases with additional fixes. nix overlays for (updates nixpkgs, more recent versions of): - ldc ( 1.30.0 -> 1.43.0-beta1 ) - - dub ( 1.23.0 -> 1.40.0 ) [for nix versions 1.31.0 ... 1.33.0 broken] - - dtools ( 2.095.1 -> 2.110.0 ) + - dub ( 1.23.0 -> 1.41.0 ) [for nix versions 1.31.0 ... 1.33.0 broken] + - dtools ( 2.095.1 -> 2.112.1 ) - - dmd ( 2.106.1 -> 2.111.0 ) + - dmd ( 2.106.1 -> 2.112.1 ) - gdc [not yet available] dlang-nix-flakes.org --❯ @@ -59,14 +59,14 @@ search nixpkgs here: - version in nixpkgs: - https://search.nixos.org/packages?channel=unstable&show=ldc&from=0&size=100&sort=relevance&type=packages&query=ldc -*** dmd OK ✓ ( 2.100.2 -> 2.111.0 ) +*** dmd OK ✓ ( 2.100.2 -> 2.112.1 ) - https://dlang.org/ - https://wiki.dlang.org/LDC - https://github.com/dlang/dmd - https://github.com/dlang/dmd/tags - nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.111.0.tar.gz + nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.112.1.tar.gz - https://github.com/dlang/dmd/pulls - version in nixpkgs: @@ -88,13 +88,13 @@ not yet provided in nixpkgs with gcc12, no attempt made - https://github.com/D-Programming-GDC/gdc ** build tool -*** dub ( 1.23.0 -> 1.40.0 ) +*** dub ( 1.23.0 -> 1.41.0 ) - https://code.dlang.org/packages/dub - https://github.com/dlang/dub - https://github.com/dlang/dub/releases - nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.40.0.tar.gz + nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.41.0.tar.gz - https://github.com/dlang/dub/issues - version in nixpkgs: @@ -102,19 +102,19 @@ not yet provided in nixpkgs with gcc12, no attempt made - dub nixpkg overlay is updated and runs most dub tests correctly -- dub OK ✓ ( 1.30.0 -> 1.40.0 ) +- dub OK ✓ ( 1.30.0 -> 1.41.0 ) from v1.31.0 requires seeting of pwd in buildPhase else fails to build packages with nix tools that previous version of dub built; ** tools -*** dtools OK ✓ ( 2.095.1 -> 2.110.0 ) +*** dtools OK ✓ ( 2.095.1 -> 2.112.1 ) - https://code.dlang.org/packages/dtools - https://github.com/dlang/tools - https://github.com/dlang/tools/tags - nix-prefetch --unpack https://github.com/dlang/tools/archive/refs/tags/v2.110.0.tar.gz + nix-prefetch --unpack https://github.com/dlang/tools/archive/refs/tags/v2.112.1.tar.gz - https://github.com/dlang/tools/issues - version in nixpkgs diff --git a/nix-overlays/dmd/binary.nix b/nix-overlays/dmd/binary.nix index 3a5d6b7..e53ccb4 100644 --- a/nix-overlays/dmd/binary.nix +++ b/nix-overlays/dmd/binary.nix @@ -1,5 +1,15 @@ -{ lib, stdenv, fetchurl, curl, tzdata, autoPatchelfHook, fixDarwinDylibNames, glibc -, version, hashes }: +{ + lib, + stdenv, + fetchurl, + curl, + tzdata, + autoPatchelfHook, + fixDarwinDylibNames, + glibc, + version, + hashes, +}: let inherit (stdenv) hostPlatform; @@ -72,6 +82,9 @@ stdenv.mkDerivation { license = licenses.boost; maintainers = [ maintainers.lionello ]; homepage = "https://dlang.org/"; - platforms = [ "x86_64-darwin" "i686-linux" "x86_64-linux" ]; + platforms = [ + "i686-linux" + "x86_64-linux" + ]; }; } diff --git a/nix-overlays/dmd/generic.nix b/nix-overlays/dmd/generic.nix index 59a781e..bfe24b4 100644 --- a/nix-overlays/dmd/generic.nix +++ b/nix-overlays/dmd/generic.nix @@ -15,7 +15,6 @@ curl, tzdata, gdb, - # Foundation, callPackage, targetPackages, fetchpatch, @@ -32,14 +31,15 @@ let name = "dmd.conf"; text = (lib.generators.toINI { } { Environment = { - DFLAGS = ''-I@out@/include/dmd -L-L@out@/lib -fPIC ${lib.optionalString (!targetPackages.stdenv.cc.isClang) "-L--export-dynamic"}''; + DFLAGS = ''-I@out@/include/dmd -L-L@out@/lib -fPIC ${ + lib.optionalString (!targetPackages.stdenv.cc.isClang) "-L--export-dynamic" + }''; }; }); }; - bits = builtins.toString stdenv.hostPlatform.parsed.cpu.bits; - osname = if stdenv.hostPlatform.isDarwin then "osx" - else stdenv.hostPlatform.parsed.kernel.name; + bits = toString stdenv.hostPlatform.parsed.cpu.bits; + osname = if stdenv.hostPlatform.isDarwin then "osx" else stdenv.hostPlatform.parsed.kernel.name; pathToDmd = "\${NIX_BUILD_TOP}/dmd/generated/${osname}/release/${bits}/dmd"; in @@ -96,9 +96,6 @@ stdenv.mkDerivation (finalAttrs: { rm dmd/compiler/test/runnable/gdb4149.d rm dmd/compiler/test/runnable/gdb4181.d rm dmd/compiler/test/compilable/ddocYear.d - rm dmd/compiler/test/compilable/sarif_success_test.d - rm dmd/compiler/test/fail_compilation/sarif_test.d - rm dmd/compiler/test/fail_compilation/sarifmultiple_test.d # Disable tests that rely on objdump whitespace until fixed upstream: # https://issues.dlang.org/show_bug.cgi?id=23317 @@ -125,8 +122,6 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ curl tzdata - # ] ++ lib.optionals stdenv.hostPlatform.isDarwin [] - # Foundation ]; nativeCheckInputs = [ @@ -177,6 +172,7 @@ stdenv.mkDerivation (finalAttrs: { NIX_ENFORCE_PURITY= \ make -C phobos unittest -j$checkJobs $checkFlags \ + DISABLED_TESTS=std/datetime/timezone \ DFLAGS="-version=TZDatabaseDir -version=LibcurlPath -J$PWD" runHook postCheck @@ -223,7 +219,10 @@ stdenv.mkDerivation (finalAttrs: { license = licenses.boost; mainProgram = "dmd"; maintainers = with maintainers; [ lionello dukc jtbx ]; - platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ]; + platforms = [ + "x86_64-linux" + "i686-linux" + ]; # ld: section __DATA/__thread_bss has type zero-fill but non-zero file offset file '/private/tmp/nix-build-dmd-2.109.1.drv-0/.rdmd-301/rdmd-build.d-A1CF043A7D87C5E88A58F3C0EF5A0DF7/objs/build.o' for architecture x86_64 # clang-16: error: linker command failed with exit code 1 (use -v to see invocation) broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64; diff --git a/nix-overlays/dmd/package.nix b/nix-overlays/dmd/package.nix index 3aa1183..1813e46 100644 --- a/nix-overlays/dmd/package.nix +++ b/nix-overlays/dmd/package.nix @@ -1,5 +1,5 @@ import ./generic.nix { - version = "2.111.0"; - dmdHash = "sha256-2bjsGa9nTny818dLRV6LKkes+Ycq8W+PFjwhGVrD5TM="; - phobosHash = "sha256-9jySZbODoL8sULhYKj/l4+c/uiG5xY2dO240k9XQtPk="; + version = "2.112.1"; + dmdHash = "sha256-UqNNUGoGmOV0lGNCGaFk8HbOE01qD55WuJ8NyQzqLJs="; + phobosHash = "sha256-CNvDSlerOXh6Qn060MNaSF1IIcbrcZzljyIxkm+TQQ0="; } diff --git a/nix-overlays/dtools/package.nix b/nix-overlays/dtools/package.nix index 2e72b44..12f4086 100644 --- a/nix-overlays/dtools/package.nix +++ b/nix-overlays/dtools/package.nix @@ -8,13 +8,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "dtools"; - version = "2.110.0"; + version = "2.112.1"; src = fetchFromGitHub { owner = "dlang"; repo = "tools"; rev = "v${finalAttrs.version}"; - hash = "sha256-xMEHnrstL5hAkhp8+/z1I2KZWZ7eztWZnUGLTKCfbBI="; + hash = "sha256-WHgV33fu1YhRQCERVatqXKEqmfHlUvZ4IXhga/yOQ3w="; name = "dtools"; }; diff --git a/nix-overlays/dub/package.nix b/nix-overlays/dub/package.nix index 4d63f2d..c10fff5 100644 --- a/nix-overlays/dub/package.nix +++ b/nix-overlays/dub/package.nix @@ -13,7 +13,7 @@ assert dcompiler != null; stdenv.mkDerivation (finalAttrs: { pname = "dub"; - version = "1.40.0"; + version = "1.41.0"; enableParallelBuilding = true; @@ -21,14 +21,18 @@ stdenv.mkDerivation (finalAttrs: { owner = "dlang"; repo = "dub"; rev = "v${finalAttrs.version}"; - hash = "sha256-OirchEKf66gis70gCSTOYcrHLyHhCsyt/rTEGT83Vcc="; + hash = "sha256-86TzaRdu+CFM0Ld2fXxjaUUT9dl37MYPdmsvxE4ZUkE="; }; postPatch = '' patchShebangs test ''; - nativeBuildInputs = [ dcompiler libevent rsync ]; + nativeBuildInputs = [ + dcompiler + libevent + rsync + ]; buildInputs = [ curl ]; preBuild = '' @@ -88,6 +92,11 @@ stdenv.mkDerivation (finalAttrs: { license = licenses.mit; mainProgram = "dub"; maintainers = with maintainers; [ jtbx ]; - platforms = [ "x86_64-linux" "i686-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; + platforms = [ + "x86_64-linux" + "i686-linux" + "aarch64-linux" + "aarch64-darwin" + ]; }; }) diff --git a/nix-overlays/ldc/bootstrap.nix b/nix-overlays/ldc/bootstrap.nix index f166568..03e7ad4 100644 --- a/nix-overlays/ldc/bootstrap.nix +++ b/nix-overlays/ldc/bootstrap.nix @@ -13,13 +13,12 @@ let inherit (stdenv) hostPlatform; OS = if hostPlatform.isDarwin then "osx" else hostPlatform.parsed.kernel.name; ARCH = if hostPlatform.isDarwin && hostPlatform.isAarch64 then "arm64" else hostPlatform.parsed.cpu.name; - version = "1.41.0"; + version = "1.42.0"; hashes = { - # Get these from `nix store prefetch-file https://github.com/ldc-developers/ldc/releases/download/v1.41.0/ldc2-1.41.0-osx-x86_64.tar.xz` etc.. - osx-x86_64 = "sha256-W8/0i2PFakXbqs2wxb3cjqa+htSgx7LHyDGOBH9yEYE="; - linux-x86_64 = "sha256-SkOUV/D+WeadAv1rV1Sfw8h60PVa2fueQlB7b44yfI8="; - linux-aarch64 = "sha256-HEuVChPVM3ntT1ZDZsJ+xW1iYeIWhogNcMdIaz6Me6g="; - osx-arm64 = "sha256-FXJnBC8QsEchBhkxSqcZtPC/iHYB6TscY0qh7LPFRuQ="; + # Get these from `nix store prefetch-file https://github.com/ldc-developers/ldc/releases/download/v1.42.0/ldc2-1.41.0-osx-x86_64.tar.xz` etc.. + linux-x86_64 = "sha256-p7yclWE49VjK35yWI1L1nUHIDfbrOuP4A58lvhSmkwM="; + linux-aarch64 = "sha256-aHcHw+IP+RBSjrLZLyepjLCWAoTeOwJua/IChKwchRE="; + osx-arm64 = "sha256-emjiHFMFdmp09HNsyJGnlC23hCqSJmIyCVBLyFxwE4I="; }; in stdenv.mkDerivation { pname = "ldc-bootstrap"; @@ -52,8 +51,18 @@ in stdenv.mkDerivation { description = "LLVM-based D Compiler"; homepage = "https://github.com/ldc-developers/ldc"; # from https://github.com/ldc-developers/ldc/blob/master/LICENSE - license = with licenses; [ bsd3 boost mit ncsa gpl2Plus ]; + license = with licenses; [ + bsd3 + boost + mit + ncsa + gpl2Plus + ]; maintainers = with maintainers; [ lionello ]; - platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ]; + platforms = [ + "x86_64-linux" + "aarch64-linux" + "aarch64-darwin" + ]; }; } diff --git a/nix-overlays/ldc/package.nix b/nix-overlays/ldc/package.nix index 00b41cd..5439e27 100644 --- a/nix-overlays/ldc/package.nix +++ b/nix-overlays/ldc/package.nix @@ -2,7 +2,6 @@ lib, stdenv, fetchFromGitHub, - fetchpatch, callPackage, makeWrapper, removeReferencesTo, @@ -64,7 +63,14 @@ stdenv.mkDerivation (finalAttrs: { ''; nativeBuildInputs = [ - cmake ldcBootstrap lit lit.python llvm_22.dev makeWrapper ninja unzip + cmake + ldcBootstrap + lit + lit.python + llvm_22.dev + makeWrapper + ninja + unzip ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ # https://github.com/NixOS/nixpkgs/pull/36378#issuecomment-385034818 gdb @@ -138,8 +144,6 @@ stdenv.mkDerivation (finalAttrs: { find $out/bin -type f -exec ${removeReferencesTo}/bin/remove-references-to -t ${ldcBootstrap} '{}' + ''; - # doCheck = false; - disallowedReferences = [ ldcBootstrap ]; meta = with lib; { @@ -147,10 +151,21 @@ stdenv.mkDerivation (finalAttrs: { homepage = "https://github.com/ldc-developers/ldc"; changelog = "https://github.com/ldc-developers/ldc/releases/tag/v${finalAttrs.version}"; # from https://github.com/ldc-developers/ldc/blob/master/LICENSE - license = with licenses; [ bsd3 boost mit ncsa gpl2Plus ]; + license = with licenses; [ + bsd3 + boost + mit + ncsa + gpl2Plus + ]; mainProgram = "ldc2"; maintainers = with maintainers; [ lionello jtbx ]; - platforms = [ "x86_64-linux" "i686-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; + platforms = [ + "x86_64-linux" + "i686-linux" + "aarch64-linux" + "aarch64-darwin" + ]; }; passthru.ldcBootstrap = ldcBootstrap; @@ -182,7 +197,7 @@ stdenv.mkDerivation (finalAttrs: { # references to the compiler binaries. no-references-to-compiler = helloWorld.overrideAttrs { disallowedReferences = [ ldc ]; - dFlags = ["-g"]; + dFlags = [ "-g" ]; }; }; }) diff --git a/org/nix-develop-dlang-shared.org b/org/nix-develop-dlang-shared.org index 53c8803..8b42fbb 100644 --- a/org/nix-develop-dlang-shared.org +++ b/org/nix-develop-dlang-shared.org @@ -5,6 +5,7 @@ #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] #+COPYRIGHT: Copyright (C) 2015 (continuously updated, current 2026) Ralph Amissah +#+LICENSE: Boost Software License 1.0 #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args+ :eval never-export :exports code @@ -331,20 +332,60 @@ sha256-/bs3bwgkLZF5IqaiKnc5gCF/r6MQBG/F1kWUkK8j2s0= #+NAME: dmd-version #+BEGIN_SRC org -<<dmd_version_2_111_0>> +<<dmd_version_2_112_1>> #+END_SRC #+NAME: dmd-hash #+BEGIN_SRC org -<<dmd_hash_2_111_0>> +<<dmd_hash_2_112_1>> #+END_SRC #+NAME: phobos-hash #+BEGIN_SRC org -<<phobos_hash_2_111_0>> +<<phobos_hash_2_112_1>> #+END_SRC *** versions +**** 2.112.1 OK ✓ + +- nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.112.1.tar.gz +- nix-prefetch-url --unpack https://github.com/dlang/phobos/archive/refs/tags/v2.112.1.tar.gz + +#+NAME: dmd_version_2_112_1 +#+BEGIN_SRC nix +2.112.1 +#+END_SRC + +#+NAME: phobos_hash_2_112_1 +#+BEGIN_SRC nix +sha256-CNvDSlerOXh6Qn060MNaSF1IIcbrcZzljyIxkm+TQQ0= +#+END_SRC + +#+NAME: dmd_hash_2_112_1 +#+BEGIN_SRC nix +sha256-UqNNUGoGmOV0lGNCGaFk8HbOE01qD55WuJ8NyQzqLJs= +#+END_SRC + +**** 2.112.0 OK ✓ + +- nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.112.0.tar.gz +- nix-prefetch-url --unpack https://github.com/dlang/phobos/archive/refs/tags/v2.112.0.tar.gz + +#+NAME: dmd_version_2_112_0 +#+BEGIN_SRC nix +2.112.0 +#+END_SRC + +#+NAME: phobos_hash_2_112_0 +#+BEGIN_SRC nix +sha256-rIW4fwSvwEt2rxYfXyaB82m3JWMgZLuYIMIkZ+kr0Sk= +#+END_SRC + +#+NAME: dmd_hash_2_112_0 +#+BEGIN_SRC nix +sha256-7MoLLAimtXs6t94VpWjhWGR1wBOISB4metbPcZYTb2M= +#+END_SRC + **** 2.111.0 OK ✓ - nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.111.0.tar.gz @@ -510,15 +551,30 @@ sha256-yRL9ub3u4mREG9PVxBvgQ/LDXD57RadPTZ2h08qyh/s= #+NAME: dub-version #+HEADER: :noweb yes #+BEGIN_SRC org -<<dub_version_1_40_0>> +<<dub_version_1_41_0>> #+END_SRC #+NAME: dub-hash #+BEGIN_SRC org -<<dub_hash_1_40_0>> +<<dub_hash_1_41_0>> #+END_SRC *** versions +**** 1.41 OK ✓ +***** 1.41.0 + +- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.41.0.tar.gz + +#+NAME: dub_version_1_41_0 +#+BEGIN_SRC nix +1.41.0 +#+END_SRC + +#+NAME: dub_hash_1_41_0 +#+BEGIN_SRC nix +sha256-86TzaRdu+CFM0Ld2fXxjaUUT9dl37MYPdmsvxE4ZUkE= +#+END_SRC + **** 1.40 OK ✓ ***** 1.40.0 @@ -661,15 +717,29 @@ sha256-5pW3Fu3PQ1ZLJnsuh7fPpEBNbVQgGfFyiuMrAVOJKQA= #+NAME: dtools-version #+BEGIN_SRC org -<<dtools_version_2_110_0>> +<<dtools_version_2_112_1>> #+END_SRC #+NAME: dtools-hash #+BEGIN_SRC org -<<dtools_hash_2_110_0>> +<<dtools_hash_2_112_1>> #+END_SRC *** versions +**** 2.112.1 OK ✓ + +- https://github.com/dlang/tools/releases/tag/v2.112.1 + +#+NAME: dtools_version_2_112_1 +#+BEGIN_SRC nix +2.112.1 +#+END_SRC + +#+NAME: dtools_hash_2_112_1 +#+BEGIN_SRC nix +sha256-WHgV33fu1YhRQCERVatqXKEqmfHlUvZ4IXhga/yOQ3w= +#+END_SRC + **** 2.110.0 OK ✓ - https://github.com/dlang/tools/releases/tag/v2.110.0 diff --git a/org/nixpkgs_overlays_d_related.org b/org/nixpkgs_overlays_d_related.org index d166bbf..fc89dd3 100644 --- a/org/nixpkgs_overlays_d_related.org +++ b/org/nixpkgs_overlays_d_related.org @@ -4,7 +4,7 @@ #+FILETAGS: :nixos:nixpkgs:dlang:compiler: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2020 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 (continuously updated, current 2026) Ralph Amissah #+LICENSE: Boost Software License 1.0 #+LANGUAGE: en #+STARTUP: content hideblocks hidestars noindent entitiespretty @@ -519,7 +519,6 @@ import ./package.nix lib, stdenv, fetchFromGitHub, - fetchpatch, callPackage, makeWrapper, removeReferencesTo, @@ -581,7 +580,14 @@ stdenv.mkDerivation (finalAttrs: { ''; nativeBuildInputs = [ - cmake ldcBootstrap lit lit.python <<ldc_llvm_set>>.dev makeWrapper ninja unzip + cmake + ldcBootstrap + lit + lit.python + <<ldc_llvm_set>>.dev + makeWrapper + ninja + unzip ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ # https://github.com/NixOS/nixpkgs/pull/36378#issuecomment-385034818 gdb @@ -655,8 +661,6 @@ stdenv.mkDerivation (finalAttrs: { find $out/bin -type f -exec ${removeReferencesTo}/bin/remove-references-to -t ${ldcBootstrap} '{}' + ''; - # doCheck = false; - disallowedReferences = [ ldcBootstrap ]; meta = with lib; { @@ -664,10 +668,21 @@ stdenv.mkDerivation (finalAttrs: { homepage = "https://github.com/ldc-developers/ldc"; changelog = "https://github.com/ldc-developers/ldc/releases/tag/v${finalAttrs.version}"; # from https://github.com/ldc-developers/ldc/blob/master/LICENSE - license = with licenses; [ bsd3 boost mit ncsa gpl2Plus ]; + license = with licenses; [ + bsd3 + boost + mit + ncsa + gpl2Plus + ]; mainProgram = "ldc2"; maintainers = with maintainers; [ lionello jtbx ]; - platforms = [ "x86_64-linux" "i686-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; + platforms = [ + "x86_64-linux" + "i686-linux" + "aarch64-linux" + "aarch64-darwin" + ]; }; passthru.ldcBootstrap = ldcBootstrap; @@ -699,7 +714,7 @@ stdenv.mkDerivation (finalAttrs: { # references to the compiler binaries. no-references-to-compiler = helloWorld.overrideAttrs { disallowedReferences = [ ldc ]; - dFlags = ["-g"]; + dFlags = [ "-g" ]; }; }; }) @@ -726,7 +741,7 @@ let inherit (stdenv) hostPlatform; OS = if hostPlatform.isDarwin then "osx" else hostPlatform.parsed.kernel.name; ARCH = if hostPlatform.isDarwin && hostPlatform.isAarch64 then "arm64" else hostPlatform.parsed.cpu.name; - <<ldc_bootstrap_1-41-0_hashes>> + <<ldc_bootstrap_1-42-0_hashes>> in stdenv.mkDerivation { pname = "ldc-bootstrap"; inherit version; @@ -758,14 +773,37 @@ in stdenv.mkDerivation { description = "LLVM-based D Compiler"; homepage = "https://github.com/ldc-developers/ldc"; # from https://github.com/ldc-developers/ldc/blob/master/LICENSE - license = with licenses; [ bsd3 boost mit ncsa gpl2Plus ]; + license = with licenses; [ + bsd3 + boost + mit + ncsa + gpl2Plus + ]; maintainers = with maintainers; [ lionello ]; - platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ]; + platforms = [ + "x86_64-linux" + "aarch64-linux" + "aarch64-darwin" + ]; }; } #+END_SRC ***** bootstrap.nix version SELECT +****** bootstrap.nix ldc2-1.42.0 + +#+NAME: ldc_bootstrap_1-42-0_hashes +#+BEGIN_SRC nix +version = "1.42.0"; +hashes = { + # Get these from `nix store prefetch-file https://github.com/ldc-developers/ldc/releases/download/v1.42.0/ldc2-1.41.0-osx-x86_64.tar.xz` etc.. + linux-x86_64 = "sha256-p7yclWE49VjK35yWI1L1nUHIDfbrOuP4A58lvhSmkwM="; + linux-aarch64 = "sha256-aHcHw+IP+RBSjrLZLyepjLCWAoTeOwJua/IChKwchRE="; + osx-arm64 = "sha256-emjiHFMFdmp09HNsyJGnlC23hCqSJmIyCVBLyFxwE4I="; +}; +#+END_SRC + ****** bootstrap.nix ldc2-1.41.0 #+NAME: ldc_bootstrap_1-41-0_hashes @@ -874,7 +912,6 @@ import ./generic.nix { curl, tzdata, gdb, - # Foundation, callPackage, targetPackages, fetchpatch, @@ -891,14 +928,15 @@ let name = "dmd.conf"; text = (lib.generators.toINI { } { Environment = { - DFLAGS = ''-I@out@/include/dmd -L-L@out@/lib -fPIC ${lib.optionalString (!targetPackages.stdenv.cc.isClang) "-L--export-dynamic"}''; + DFLAGS = ''-I@out@/include/dmd -L-L@out@/lib -fPIC ${ + lib.optionalString (!targetPackages.stdenv.cc.isClang) "-L--export-dynamic" + }''; }; }); }; - bits = builtins.toString stdenv.hostPlatform.parsed.cpu.bits; - osname = if stdenv.hostPlatform.isDarwin then "osx" - else stdenv.hostPlatform.parsed.kernel.name; + bits = toString stdenv.hostPlatform.parsed.cpu.bits; + osname = if stdenv.hostPlatform.isDarwin then "osx" else stdenv.hostPlatform.parsed.kernel.name; pathToDmd = "\${NIX_BUILD_TOP}/dmd/generated/${osname}/release/${bits}/dmd"; in @@ -955,9 +993,6 @@ stdenv.mkDerivation (finalAttrs: { rm dmd/compiler/test/runnable/gdb4149.d rm dmd/compiler/test/runnable/gdb4181.d rm dmd/compiler/test/compilable/ddocYear.d - rm dmd/compiler/test/compilable/sarif_success_test.d - rm dmd/compiler/test/fail_compilation/sarif_test.d - rm dmd/compiler/test/fail_compilation/sarifmultiple_test.d # Disable tests that rely on objdump whitespace until fixed upstream: # https://issues.dlang.org/show_bug.cgi?id=23317 @@ -984,8 +1019,6 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ curl tzdata - # ] ++ lib.optionals stdenv.hostPlatform.isDarwin [] - # Foundation ]; nativeCheckInputs = [ @@ -1036,6 +1069,7 @@ stdenv.mkDerivation (finalAttrs: { NIX_ENFORCE_PURITY= \ make -C phobos unittest -j$checkJobs $checkFlags \ + DISABLED_TESTS=std/datetime/timezone \ DFLAGS="-version=TZDatabaseDir -version=LibcurlPath -J$PWD" runHook postCheck @@ -1082,7 +1116,10 @@ stdenv.mkDerivation (finalAttrs: { license = licenses.boost; mainProgram = "dmd"; maintainers = with maintainers; [ lionello dukc jtbx ]; - platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ]; + platforms = [ + "x86_64-linux" + "i686-linux" + ]; # ld: section __DATA/__thread_bss has type zero-fill but non-zero file offset file '/private/tmp/nix-build-dmd-2.109.1.drv-0/.rdmd-301/rdmd-build.d-A1CF043A7D87C5E88A58F3C0EF5A0DF7/objs/build.o' for architecture x86_64 # clang-16: error: linker command failed with exit code 1 (use -v to see invocation) broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64; @@ -1109,8 +1146,18 @@ callPackage ./binary.nix { #+HEADER: :tangle "../nix-overlays/dmd/binary.nix" #+BEGIN_SRC nix -{ lib, stdenv, fetchurl, curl, tzdata, autoPatchelfHook, fixDarwinDylibNames, glibc -, version, hashes }: +{ + lib, + stdenv, + fetchurl, + curl, + tzdata, + autoPatchelfHook, + fixDarwinDylibNames, + glibc, + version, + hashes, +}: let inherit (stdenv) hostPlatform; @@ -1183,7 +1230,10 @@ stdenv.mkDerivation { license = licenses.boost; maintainers = [ maintainers.lionello ]; homepage = "https://dlang.org/"; - platforms = [ "x86_64-darwin" "i686-linux" "x86_64-linux" ]; + platforms = [ + "i686-linux" + "x86_64-linux" + ]; }; } #+END_SRC @@ -1243,7 +1293,11 @@ stdenv.mkDerivation (finalAttrs: { patchShebangs test ''; - nativeBuildInputs = [ dcompiler libevent rsync ]; + nativeBuildInputs = [ + dcompiler + libevent + rsync + ]; buildInputs = [ curl ]; preBuild = '' @@ -1303,7 +1357,12 @@ stdenv.mkDerivation (finalAttrs: { license = licenses.mit; mainProgram = "dub"; maintainers = with maintainers; [ jtbx ]; - platforms = [ "x86_64-linux" "i686-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; + platforms = [ + "x86_64-linux" + "i686-linux" + "aarch64-linux" + "aarch64-darwin" + ]; }; }) #+END_SRC |
