aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--flake.lock6
-rw-r--r--nix-overlays/README8
-rw-r--r--nix-overlays/dmd/binary.nix7
-rw-r--r--nix-overlays/dmd/default.nix7
-rw-r--r--nix-overlays/dmd/generic.nix79
-rw-r--r--nix-overlays/dub/default.nix2
-rw-r--r--nix-overlays/ldc/binary.nix2
-rw-r--r--nix-overlays/ldc/generic.nix7
-rw-r--r--org/nixpkgs_overlays_d_related.org134
9 files changed, 144 insertions, 108 deletions
diff --git a/flake.lock b/flake.lock
index 0a801e9..020648b 100644
--- a/flake.lock
+++ b/flake.lock
@@ -20,11 +20,11 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1709386671,
- "narHash": "sha256-VPqfBnIJ+cfa78pd4Y5Cr6sOWVW8GYHRVucxJGmRf8Q=",
+ "lastModified": 1709968316,
+ "narHash": "sha256-4rZEtEDT6jcgRaqxsatBeds7x1PoEiEjb6QNGb4mNrk=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "fa9a51752f1b5de583ad5213eb621be071806663",
+ "rev": "0e7f98a5f30166cbed344569426850b21e4091d4",
"type": "github"
},
"original": {
diff --git a/nix-overlays/README b/nix-overlays/README
index 0c55f1b..421074f 100644
--- a/nix-overlays/README
+++ b/nix-overlays/README
@@ -20,11 +20,9 @@ nix overlays for (updates nixpkgs, more recent versions of):
- dub ( 1.23.0 -> 1.36.0 ) [for nix versions 1.31.0 ... 1.33.0 broken]
- dtools ( 2.095.1 -> 2.103.1 )
- - dmd ( 2.100.2 -> 2.104.0 ) KO ✗
+ - dmd ( 2.106.1 -> 2.106.1 )
- gdc [not yet available]
-(updates nixpkgs circa 2023-05-12)
-
dlang-nix-flakes.org --❯
.
└── nix-overlays
@@ -61,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 KO ✗ ( 2.100.2 -> 2.104.0 )
+*** dmd KO ✗ ( 2.100.2 -> 2.104.0); OK ✓ ( 2.106.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.104.0.tar.gz
+ nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.106.1.tar.gz
- https://github.com/dlang/dmd/pulls
- version in nixpkgs:
diff --git a/nix-overlays/dmd/binary.nix b/nix-overlays/dmd/binary.nix
index 6a99d42..3a5d6b7 100644
--- a/nix-overlays/dmd/binary.nix
+++ b/nix-overlays/dmd/binary.nix
@@ -5,7 +5,12 @@ let
inherit (stdenv) hostPlatform;
OS = if hostPlatform.isDarwin then "osx" else hostPlatform.parsed.kernel.name;
MODEL = toString hostPlatform.parsed.cpu.bits;
-in stdenv.mkDerivation {
+in
+
+# On linux pargets like `pkgsLLVM.dmd` `cc` does not expose `libgcc`
+# and can't build `dmd`.
+assert hostPlatform.isLinux -> (stdenv.cc.cc ? libgcc);
+stdenv.mkDerivation {
pname = "dmd-bootstrap";
inherit version;
diff --git a/nix-overlays/dmd/default.nix b/nix-overlays/dmd/default.nix
index 7beb9e5..bdc9faf 100644
--- a/nix-overlays/dmd/default.nix
+++ b/nix-overlays/dmd/default.nix
@@ -1,6 +1,5 @@
import ./generic.nix {
- version = "2.104.0";
- dmdSha256 = "sha256-yv+uW6cYAId2HK/YSPxsR9Xt0o3LWa97z8KyzjFik6s=";
- #druntimeSha256 = "";
- phobosSha256 = "sha256-cWp36Gd/lh3gy21bf9z0/RqzlJmf6ypmx72aMeakcec=";
+ version = "2.106.1";
+ dmdSha256 = "sha256-vjYa/Pxrz7J2htXT+fa+xaeen/Vxne++lELbHTSXBK8=";
+ phobosSha256 = "sha256-yRL9ub3u4mREG9PVxBvgQ/LDXD57RadPTZ2h08qyh/s=";
}
diff --git a/nix-overlays/dmd/generic.nix b/nix-overlays/dmd/generic.nix
index e500385..a2a1b8a 100644
--- a/nix-overlays/dmd/generic.nix
+++ b/nix-overlays/dmd/generic.nix
@@ -6,12 +6,14 @@
{ stdenv
, lib
, fetchFromGitHub
+, removeReferencesTo
, makeWrapper
, which
, writeTextFile
, curl
, tzdata
, gdb
+#, Foundation
, callPackage
, targetPackages
, fetchpatch
@@ -19,7 +21,8 @@
, installShellFiles
, git
, unzip
-, HOST_DMD ? "${callPackage ./bootstrap.nix { }}/bin/dmd"
+, dmdBootstrap ? callPackage ./bootstrap.nix { }
+, dmd_bin ? "${dmdBootstrap}/bin"
}:
let
@@ -70,46 +73,38 @@ stdenv.mkDerivation rec {
# https://issues.dlang.org/show_bug.cgi?id=19553
hardeningDisable = [ "fortify" ];
- #patches = lib.optionals (lib.versionOlder version "2.088.0") [
- # # Migrates D1-style operator overloads in DMD source, to allow building with
- # # a newer DMD
- # (fetchpatch {
- # url = "https://github.com/dlang/dmd/commit/c4d33e5eb46c123761ac501e8c52f33850483a8a.patch";
- # stripLen = 1;
- # extraPrefix = "dmd/";
- # sha256 = "sha256-N21mAPfaTo+zGCip4njejasraV5IsWVqlGR5eOdFZZE=";
- # })
- #] ++ lib.optionals (lib.versionOlder version "2.092.2") [
- # # Fixes C++ tests that compiled on older C++ but not on the current one
- # (fetchpatch {
- # url = "https://github.com/dlang/druntime/commit/438990def7e377ca1f87b6d28246673bb38022ab.patch";
- # stripLen = 1;
- # extraPrefix = "druntime/";
- # sha256 = "sha256-/pPKK7ZK9E/mBrxm2MZyBNhYExE8p9jz8JqBdZSE6uY=";
- # })
- #];
+ patches = lib.optionals (lib.versionOlder version "2.088.0") [
+ # Migrates D1-style operator overloads in DMD source, to allow building with
+ # a newer DMD
+ (fetchpatch {
+ url = "https://github.com/dlang/dmd/commit/c4d33e5eb46c123761ac501e8c52f33850483a8a.patch";
+ stripLen = 1;
+ extraPrefix = "dmd/";
+ sha256 = "sha256-N21mAPfaTo+zGCip4njejasraV5IsWVqlGR5eOdFZZE=";
+ })
+ ];
postPatch = ''
patchShebangs dmd/compiler/test/{runnable,fail_compilation,compilable,tools}{,/extra-files}/*.sh
- rm dmd/compiler/test/runnable_cxx/cppa.d
-
- # Grep'd string changed with gdb 12
- # https://issues.dlang.org/show_bug.cgi?id=23198
- substituteInPlace dmd/druntime/test/exceptions/Makefile \
- --replace 'in D main (' 'in _Dmain ('
+ rm dmd/compiler/test/runnable/gdb1.d
+ rm dmd/compiler/test/runnable/gdb10311.d
+ rm dmd/compiler/test/runnable/gdb14225.d
+ rm dmd/compiler/test/runnable/gdb14276.d
+ rm dmd/compiler/test/runnable/gdb14313.d
+ rm dmd/compiler/test/runnable/gdb14330.d
+ rm dmd/compiler/test/runnable/gdb15729.sh
+ rm dmd/compiler/test/runnable/gdb4149.d
+ rm dmd/compiler/test/runnable/gdb4181.d
+ rm dmd/compiler/test/compilable/ddocYear.d
- # We're using gnused on all platforms
- substituteInPlace dmd/druntime/test/coverage/Makefile \
- --replace 'freebsd osx' 'none'
+ # Disable tests that rely on objdump whitespace until fixed upstream:
+ # https://issues.dlang.org/show_bug.cgi?id=23317
+ rm dmd/compiler/test/runnable/cdvecfill.sh
+ rm dmd/compiler/test/compilable/cdcmp.d
''
- + lib.optionalString (lib.versionOlder version "2.091.0") ''
- # This one has tested against a hardcoded year, then against a current year on
- # and off again. It just isn't worth it to patch all the historical versions
- # of it, so just remove it until the most recent change.
- rm dmd/compiler/test/compilable/ddocYear.d
- '' + lib.optionalString (lib.versionAtLeast version "2.089.0" && lib.versionOlder version "2.092.2") ''
+ + lib.optionalString (lib.versionAtLeast version "2.089.0" && lib.versionOlder version "2.092.2") ''
rm dmd/compiler/test/dshell/test6952.d
'' + lib.optionalString (lib.versionAtLeast version "2.092.2") ''
substituteInPlace dmd/compiler/test/dshell/test6952.d --replace "/usr/bin/env bash" "${bash}/bin/bash"
@@ -132,6 +127,8 @@ stdenv.mkDerivation rec {
buildInputs = [
curl
tzdata
+ # ] ++ lib.optionals stdenv.isDarwin [
+ # Foundation
];
nativeCheckInputs = [
@@ -155,7 +152,8 @@ stdenv.mkDerivation rec {
buildJobs=1
fi
- make -C dmd -f posix.mak $buildFlags -j$buildJobs HOST_DMD=${HOST_DMD}
+ ${dmd_bin}/rdmd dmd/compiler/src/build.d -j$buildJobs HOST_DMD=${dmd_bin}/dmd $buildFlags
+ make -C dmd/druntime -f posix.mak DMD=${pathToDmd} $buildFlags -j$buildJobs
echo ${tzdata}/share/zoneinfo/ > TZDatabaseDirFile
echo ${lib.getLib curl}/lib/libcurl${stdenv.hostPlatform.extensions.sharedLibrary} > LibcurlPathFile
make -C phobos -f posix.mak $buildFlags -j$buildJobs DMD=${pathToDmd} DFLAGS="-version=TZDatabaseDir -version=LibcurlPath -J$PWD"
@@ -195,6 +193,9 @@ stdenv.mkDerivation rec {
installManPage dmd/docs/man/man*/*
+ mkdir -p $out/include/dmd
+ cp -r {dmd/druntime/import/*,phobos/{std,etc}} $out/include/dmd/
+
mkdir $out/lib
cp phobos/generated/${osname}/release/${bits}/libphobos2.* $out/lib/
@@ -207,13 +208,19 @@ stdenv.mkDerivation rec {
runHook postInstall
'';
+ preFixup = ''
+ find $out/bin -type f -exec ${removeReferencesTo}/bin/remove-references-to -t ${dmd_bin}/dmd '{}' +
+ '';
+
+ disallowedReferences = [ dmdBootstrap ];
+
meta = with lib; {
description = "Official reference compiler for the D language";
homepage = "https://dlang.org/";
# Everything is now Boost licensed, even the backend.
# https://github.com/dlang/dmd/pull/6680
license = licenses.boost;
- maintainers = with maintainers; [ ThomasMader lionello dukc ];
+ maintainers = with maintainers; [ lionello dukc jtbx ];
platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ];
};
}
diff --git a/nix-overlays/dub/default.nix b/nix-overlays/dub/default.nix
index 47e6bf6..819a5e5 100644
--- a/nix-overlays/dub/default.nix
+++ b/nix-overlays/dub/default.nix
@@ -80,7 +80,7 @@ stdenv.mkDerivation rec {
description = "Package and build manager for D applications and libraries";
homepage = "https://code.dlang.org/";
license = licenses.mit;
- maintainers = with maintainers; [ ThomasMader ];
+ maintainers = with maintainers; [ jtbx ];
platforms = [ "x86_64-linux" "i686-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
};
}
diff --git a/nix-overlays/ldc/binary.nix b/nix-overlays/ldc/binary.nix
index dd4d51c..ca7fb4f 100644
--- a/nix-overlays/ldc/binary.nix
+++ b/nix-overlays/ldc/binary.nix
@@ -37,7 +37,7 @@ in stdenv.mkDerivation {
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 ];
- maintainers = with maintainers; [ ThomasMader lionello ];
+ maintainers = with maintainers; [ lionello ];
platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
};
}
diff --git a/nix-overlays/ldc/generic.nix b/nix-overlays/ldc/generic.nix
index 78a9a0c..2fd779a 100644
--- a/nix-overlays/ldc/generic.nix
+++ b/nix-overlays/ldc/generic.nix
@@ -1,5 +1,5 @@
{ version, sha256 }:
-{ lib, stdenv, fetchurl, cmake, ninja, llvm_14, curl, tzdata
+{ lib, stdenv, fetchurl, cmake, ninja, llvm_17, curl, tzdata
, libconfig, lit, gdb, unzip, darwin, bash
, callPackage, makeWrapper, runCommand, targetPackages
, ldcBootstrap ? callPackage ./bootstrap.nix { }
@@ -54,7 +54,7 @@ stdenv.mkDerivation rec {
'';
nativeBuildInputs = [
- cmake ldcBootstrap lit lit.python llvm_14.dev makeWrapper ninja unzip
+ cmake ldcBootstrap lit lit.python llvm_17.dev makeWrapper ninja unzip
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.Foundation
@@ -68,7 +68,6 @@ stdenv.mkDerivation rec {
cmakeFlags = [
"-DD_FLAGS=-d-version=TZDatabaseDir;-d-version=LibcurlPath;-J${pathConfig}"
- "-DCMAKE_BUILD_TYPE=Release"
];
postConfigure = ''
@@ -131,7 +130,7 @@ stdenv.mkDerivation rec {
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 ];
- maintainers = with maintainers; [ ThomasMader lionello ];
+ maintainers = with maintainers; [ lionello jtbx ];
platforms = [ "x86_64-linux" "i686-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
};
}
diff --git a/org/nixpkgs_overlays_d_related.org b/org/nixpkgs_overlays_d_related.org
index 4937517..c2e8008 100644
--- a/org/nixpkgs_overlays_d_related.org
+++ b/org/nixpkgs_overlays_d_related.org
@@ -43,11 +43,9 @@ nix overlays for (updates nixpkgs, more recent versions of):
- dub ( 1.23.0 -> <<dub_version>> ) [for nix versions 1.31.0 ... 1.33.0 broken]
- dtools ( 2.095.1 -> <<dtools_version>> )
- - dmd ( 2.100.2 -> <<dmd_version>> ) KO ✗
+ - dmd ( 2.106.1 -> <<dmd_version>> )
- gdc [not yet available]
-(updates nixpkgs circa 2023-05-12)
-
dlang-nix-flakes.org --❯
.
└── nix-overlays
@@ -84,7 +82,7 @@ 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 KO ✗ ( 2.100.2 -> <<dmd_version>> )
+,*** dmd KO ✗ ( 2.100.2 -> 2.104.0); OK ✓ ( <<dmd_version>> )
- https://dlang.org/
- https://wiki.dlang.org/LDC
@@ -501,7 +499,7 @@ import ./generic.nix {
#+HEADER: :tangle "../nix-overlays/ldc/generic.nix"
#+BEGIN_SRC nix
{ version, sha256 }:
-{ lib, stdenv, fetchurl, cmake, ninja, llvm_14, curl, tzdata
+{ lib, stdenv, fetchurl, cmake, ninja, llvm_17, curl, tzdata
, libconfig, lit, gdb, unzip, darwin, bash
, callPackage, makeWrapper, runCommand, targetPackages
, ldcBootstrap ? callPackage ./bootstrap.nix { }
@@ -556,7 +554,7 @@ stdenv.mkDerivation rec {
'';
nativeBuildInputs = [
- cmake ldcBootstrap lit lit.python llvm_14.dev makeWrapper ninja unzip
+ cmake ldcBootstrap lit lit.python llvm_17.dev makeWrapper ninja unzip
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.Foundation
@@ -570,7 +568,6 @@ stdenv.mkDerivation rec {
cmakeFlags = [
"-DD_FLAGS=-d-version=TZDatabaseDir;-d-version=LibcurlPath;-J${pathConfig}"
- "-DCMAKE_BUILD_TYPE=Release"
];
postConfigure = ''
@@ -633,7 +630,7 @@ stdenv.mkDerivation rec {
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 ];
- maintainers = with maintainers; [ ThomasMader lionello ];
+ maintainers = with maintainers; [ lionello jtbx ];
platforms = [ "x86_64-linux" "i686-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
};
}
@@ -735,7 +732,7 @@ in stdenv.mkDerivation {
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 ];
- maintainers = with maintainers; [ ThomasMader lionello ];
+ maintainers = with maintainers; [ lionello ];
platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
};
}
@@ -911,7 +908,7 @@ sha256-8cjs6eHjWAbDRBvyT75mbN3Y7vN1WSwZzY/uRwHNVFg=
sha256-/bs3bwgkLZF5IqaiKnc5gCF/r6MQBG/F1kWUkK8j2s0=
#+END_SRC
-** dmd OK KO ✗ ISSUES
+** dmd OK ✓
*** info
**** links
@@ -939,7 +936,6 @@ sha256-/bs3bwgkLZF5IqaiKnc5gCF/r6MQBG/F1kWUkK8j2s0=
import ./generic.nix {
version = "<<dmd_version>>";
dmdSha256 = "<<dmd_hash>>";
- #druntimeSha256 = "<<druntime_hash>>";
phobosSha256 = "<<phobos_hash>>";
}
#+END_SRC
@@ -956,12 +952,14 @@ import ./generic.nix {
{ stdenv
, lib
, fetchFromGitHub
+, removeReferencesTo
, makeWrapper
, which
, writeTextFile
, curl
, tzdata
, gdb
+#, Foundation
, callPackage
, targetPackages
, fetchpatch
@@ -969,7 +967,8 @@ import ./generic.nix {
, installShellFiles
, git
, unzip
-, HOST_DMD ? "${callPackage ./bootstrap.nix { }}/bin/dmd"
+, dmdBootstrap ? callPackage ./bootstrap.nix { }
+, dmd_bin ? "${dmdBootstrap}/bin"
}:
let
@@ -1020,46 +1019,38 @@ stdenv.mkDerivation rec {
# https://issues.dlang.org/show_bug.cgi?id=19553
hardeningDisable = [ "fortify" ];
- #patches = lib.optionals (lib.versionOlder version "2.088.0") [
- # # Migrates D1-style operator overloads in DMD source, to allow building with
- # # a newer DMD
- # (fetchpatch {
- # url = "https://github.com/dlang/dmd/commit/c4d33e5eb46c123761ac501e8c52f33850483a8a.patch";
- # stripLen = 1;
- # extraPrefix = "dmd/";
- # sha256 = "sha256-N21mAPfaTo+zGCip4njejasraV5IsWVqlGR5eOdFZZE=";
- # })
- #] ++ lib.optionals (lib.versionOlder version "2.092.2") [
- # # Fixes C++ tests that compiled on older C++ but not on the current one
- # (fetchpatch {
- # url = "https://github.com/dlang/druntime/commit/438990def7e377ca1f87b6d28246673bb38022ab.patch";
- # stripLen = 1;
- # extraPrefix = "druntime/";
- # sha256 = "sha256-/pPKK7ZK9E/mBrxm2MZyBNhYExE8p9jz8JqBdZSE6uY=";
- # })
- #];
+ patches = lib.optionals (lib.versionOlder version "2.088.0") [
+ # Migrates D1-style operator overloads in DMD source, to allow building with
+ # a newer DMD
+ (fetchpatch {
+ url = "https://github.com/dlang/dmd/commit/c4d33e5eb46c123761ac501e8c52f33850483a8a.patch";
+ stripLen = 1;
+ extraPrefix = "dmd/";
+ sha256 = "sha256-N21mAPfaTo+zGCip4njejasraV5IsWVqlGR5eOdFZZE=";
+ })
+ ];
postPatch = ''
patchShebangs dmd/compiler/test/{runnable,fail_compilation,compilable,tools}{,/extra-files}/*.sh
- rm dmd/compiler/test/runnable_cxx/cppa.d
-
- # Grep'd string changed with gdb 12
- # https://issues.dlang.org/show_bug.cgi?id=23198
- substituteInPlace dmd/druntime/test/exceptions/Makefile \
- --replace 'in D main (' 'in _Dmain ('
+ rm dmd/compiler/test/runnable/gdb1.d
+ rm dmd/compiler/test/runnable/gdb10311.d
+ rm dmd/compiler/test/runnable/gdb14225.d
+ rm dmd/compiler/test/runnable/gdb14276.d
+ rm dmd/compiler/test/runnable/gdb14313.d
+ rm dmd/compiler/test/runnable/gdb14330.d
+ rm dmd/compiler/test/runnable/gdb15729.sh
+ rm dmd/compiler/test/runnable/gdb4149.d
+ rm dmd/compiler/test/runnable/gdb4181.d
+ rm dmd/compiler/test/compilable/ddocYear.d
- # We're using gnused on all platforms
- substituteInPlace dmd/druntime/test/coverage/Makefile \
- --replace 'freebsd osx' 'none'
+ # Disable tests that rely on objdump whitespace until fixed upstream:
+ # https://issues.dlang.org/show_bug.cgi?id=23317
+ rm dmd/compiler/test/runnable/cdvecfill.sh
+ rm dmd/compiler/test/compilable/cdcmp.d
''
- + lib.optionalString (lib.versionOlder version "2.091.0") ''
- # This one has tested against a hardcoded year, then against a current year on
- # and off again. It just isn't worth it to patch all the historical versions
- # of it, so just remove it until the most recent change.
- rm dmd/compiler/test/compilable/ddocYear.d
- '' + lib.optionalString (lib.versionAtLeast version "2.089.0" && lib.versionOlder version "2.092.2") ''
+ + lib.optionalString (lib.versionAtLeast version "2.089.0" && lib.versionOlder version "2.092.2") ''
rm dmd/compiler/test/dshell/test6952.d
'' + lib.optionalString (lib.versionAtLeast version "2.092.2") ''
substituteInPlace dmd/compiler/test/dshell/test6952.d --replace "/usr/bin/env bash" "${bash}/bin/bash"
@@ -1082,6 +1073,8 @@ stdenv.mkDerivation rec {
buildInputs = [
curl
tzdata
+ # ] ++ lib.optionals stdenv.isDarwin [
+ # Foundation
];
nativeCheckInputs = [
@@ -1105,7 +1098,8 @@ stdenv.mkDerivation rec {
buildJobs=1
fi
- make -C dmd -f posix.mak $buildFlags -j$buildJobs HOST_DMD=${HOST_DMD}
+ ${dmd_bin}/rdmd dmd/compiler/src/build.d -j$buildJobs HOST_DMD=${dmd_bin}/dmd $buildFlags
+ make -C dmd/druntime -f posix.mak DMD=${pathToDmd} $buildFlags -j$buildJobs
echo ${tzdata}/share/zoneinfo/ > TZDatabaseDirFile
echo ${lib.getLib curl}/lib/libcurl${stdenv.hostPlatform.extensions.sharedLibrary} > LibcurlPathFile
make -C phobos -f posix.mak $buildFlags -j$buildJobs DMD=${pathToDmd} DFLAGS="-version=TZDatabaseDir -version=LibcurlPath -J$PWD"
@@ -1145,6 +1139,9 @@ stdenv.mkDerivation rec {
installManPage dmd/docs/man/man*/*
+ mkdir -p $out/include/dmd
+ cp -r {dmd/druntime/import/*,phobos/{std,etc}} $out/include/dmd/
+
mkdir $out/lib
cp phobos/generated/${osname}/release/${bits}/libphobos2.* $out/lib/
@@ -1157,13 +1154,19 @@ stdenv.mkDerivation rec {
runHook postInstall
'';
+ preFixup = ''
+ find $out/bin -type f -exec ${removeReferencesTo}/bin/remove-references-to -t ${dmd_bin}/dmd '{}' +
+ '';
+
+ disallowedReferences = [ dmdBootstrap ];
+
meta = with lib; {
description = "Official reference compiler for the D language";
homepage = "https://dlang.org/";
# Everything is now Boost licensed, even the backend.
# https://github.com/dlang/dmd/pull/6680
license = licenses.boost;
- maintainers = with maintainers; [ ThomasMader lionello dukc ];
+ maintainers = with maintainers; [ lionello dukc jtbx ];
platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ];
};
}
@@ -1195,7 +1198,12 @@ let
inherit (stdenv) hostPlatform;
OS = if hostPlatform.isDarwin then "osx" else hostPlatform.parsed.kernel.name;
MODEL = toString hostPlatform.parsed.cpu.bits;
-in stdenv.mkDerivation {
+in
+
+# On linux pargets like `pkgsLLVM.dmd` `cc` does not expose `libgcc`
+# and can't build `dmd`.
+assert hostPlatform.isLinux -> (stdenv.cc.cc ? libgcc);
+stdenv.mkDerivation {
pname = "dmd-bootstrap";
inherit version;
@@ -1263,21 +1271,41 @@ in stdenv.mkDerivation {
#+END_SRC
*** versions SET
-**** selected version SET KO ✗
+**** selected version SET OK ✓
#+NAME: dmd_version
#+BEGIN_SRC nix
-<<dmd_version_2_104_0>>
+<<dmd_version_2_106_1>>
#+END_SRC
#+NAME: dmd_hash
#+BEGIN_SRC nix
-<<dmd_hash_2_104_0>>
+<<dmd_hash_2_106_1>>
#+END_SRC
#+NAME: phobos_hash
#+BEGIN_SRC nix
-<<phobos_hash_2_104_0>>
+<<phobos_hash_2_106_1>>
+#+END_SRC
+
+**** 2.106.1 OK ✓
+
+- nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.106.1.tar.gz
+- nix-prefetch-url --unpack https://github.com/dlang/phobos/archive/refs/tags/v2.106.1.tar.gz
+
+#+NAME: dmd_version_2_106_1
+#+BEGIN_SRC nix
+2.106.1
+#+END_SRC
+
+#+NAME: dmd_hash_2_106_1
+#+BEGIN_SRC nix
+sha256-vjYa/Pxrz7J2htXT+fa+xaeen/Vxne++lELbHTSXBK8=
+#+END_SRC
+
+#+NAME: phobos_hash_2_106_1
+#+BEGIN_SRC nix
+sha256-yRL9ub3u4mREG9PVxBvgQ/LDXD57RadPTZ2h08qyh/s=
#+END_SRC
**** 2.104.0 KO ✗
@@ -1457,7 +1485,7 @@ stdenv.mkDerivation rec {
description = "Package and build manager for D applications and libraries";
homepage = "https://code.dlang.org/";
license = licenses.mit;
- maintainers = with maintainers; [ ThomasMader ];
+ maintainers = with maintainers; [ jtbx ];
platforms = [ "x86_64-linux" "i686-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
};
}