summaryrefslogtreecommitdiffhomepage
path: root/org/dlang-nix-flakes.org
diff options
context:
space:
mode:
Diffstat (limited to 'org/dlang-nix-flakes.org')
-rw-r--r--org/dlang-nix-flakes.org114
1 files changed, 55 insertions, 59 deletions
diff --git a/org/dlang-nix-flakes.org b/org/dlang-nix-flakes.org
index 8318729..c6c68a9 100644
--- a/org/dlang-nix-flakes.org
+++ b/org/dlang-nix-flakes.org
@@ -38,7 +38,7 @@
,#+FILETAGS: :dlang:build:tools:
,#+AUTHOR: Ralph Amissah
,#+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]]
-,#+COPYRIGHT: Copyright (C) 2022 - 2024 Ralph Amissah
+,#+COPYRIGHT: Copyright (C) 2022 - 2025 Ralph Amissah
,#+LANGUAGE: en
,#+STARTUP: content hideblocks hidestars noindent entitiespretty
@@ -602,10 +602,6 @@ pkgs.callPackage ./shell.nix {}
- version in nixpkgs:
- https://search.nixos.org/packages?channel=unstable&show=ldc&from=0&size=100&sort=relevance&type=packages&query=ldc
-**** notes
-
-- OK ldc 1.32.2 tested
-
*** overlays OK ✓
**** default.nix
@@ -622,6 +618,13 @@ import ./package.nix
lib,
stdenv,
fetchFromGitHub,
+ fetchpatch,
+ callPackage,
+ makeWrapper,
+ removeReferencesTo,
+ runCommand,
+ writeText,
+ targetPackages,
cmake,
ninja,
<<ldc_llvm_set>>,
@@ -630,12 +633,6 @@ import ./package.nix
lit,
gdb,
unzip,
- darwin,
- callPackage,
- makeWrapper,
- runCommand,
- writeText,
- targetPackages,
ldcBootstrap ? callPackage ./bootstrap.nix { },
}:
@@ -684,8 +681,6 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = [
cmake ldcBootstrap lit lit.python <<ldc_llvm_set>>.dev makeWrapper ninja unzip
- ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
- darwin.apple_sdk.frameworks.Foundation
] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
# https://github.com/NixOS/nixpkgs/pull/36378#issuecomment-385034818
gdb
@@ -755,6 +750,12 @@ stdenv.mkDerivation (finalAttrs: {
--set-default CC ${targetPackages.stdenv.cc}/bin/cc
'';
+ preFixup = ''
+ find $out/bin -type f -exec ${removeReferencesTo}/bin/remove-references-to -t ${ldcBootstrap} '{}' +
+ '';
+
+ disallowedReferences = [ ldcBootstrap ];
+
meta = with lib; {
description = "LLVM-based D compiler";
homepage = "https://github.com/ldc-developers/ldc";
@@ -822,7 +823,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-25-0_hashes>>
+ <<ldc_bootstrap_1-41-0_hashes>>
in stdenv.mkDerivation {
pname = "ldc-bootstrap";
inherit version;
@@ -862,17 +863,17 @@ in stdenv.mkDerivation {
#+END_SRC
***** bootstrap.nix version SELECT
-****** bootstrap.nix ldc2-1.25.0
+****** bootstrap.nix ldc2-1.41.0
-#+NAME: ldc_bootstrap_1-25-0_hashes
+#+NAME: ldc_bootstrap_1-41-0_hashes
#+BEGIN_SRC nix
-version = "1.25.0";
+version = "1.41.0";
hashes = {
- # Get these from `nix store prefetch-file https://github.com/ldc-developers/ldc/releases/download/v1.25.0/ldc2-1.25.0-osx-x86_64.tar.xz` etc..
- osx-x86_64 = "sha256-6iKnbS+oalLKmyS8qYD/wS21b7+O+VgsWG2iT4PrWPU=";
- linux-x86_64 = "sha256-sfg47RdlsIpryc3iZvE17OtLweh3Zw6DeuNJYgpuH+o=";
- linux-aarch64 = "sha256-UDZ43x4flSo+SfsPeE8juZO2Wtk2ZzwySk0ADHnvJBI=";
- osx-arm64 = "sha256-O/x0vy0wwQFaDc4uWSeMhx+chJKqbQb6e5QNYf+7DCw=";
+ # 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=";
};
#+END_SRC
@@ -890,6 +891,20 @@ hashes = {
};
#+END_SRC
+****** bootstrap.nix ldc2-1.25.0
+
+#+NAME: ldc_bootstrap_1-25-0_hashes
+#+BEGIN_SRC nix
+version = "1.25.0";
+hashes = {
+ # Get these from `nix store prefetch-file https://github.com/ldc-developers/ldc/releases/download/v1.25.0/ldc2-1.25.0-osx-x86_64.tar.xz` etc..
+ osx-x86_64 = "sha256-6iKnbS+oalLKmyS8qYD/wS21b7+O+VgsWG2iT4PrWPU=";
+ linux-x86_64 = "sha256-sfg47RdlsIpryc3iZvE17OtLweh3Zw6DeuNJYgpuH+o=";
+ linux-aarch64 = "sha256-UDZ43x4flSo+SfsPeE8juZO2Wtk2ZzwySk0ADHnvJBI=";
+ osx-arm64 = "sha256-O/x0vy0wwQFaDc4uWSeMhx+chJKqbQb6e5QNYf+7DCw=";
+};
+#+END_SRC
+
** dmd OK ✓
*** info
**** links
@@ -904,12 +919,6 @@ hashes = {
- version in nixpkgs:
- https://search.nixos.org/packages?channel=unstable&show=dmd&from=0&size=100&sort=relevance&type=packages&query=dmd
-**** notes KO ✗
-
-- dmd nixpkg modified and appears to build ok
-
-- ISSUES dmd on nixos FAILS to build (my working projects), appears not to find parts of itself
-
*** overlays
**** default.nix
@@ -1043,7 +1052,9 @@ 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/fail_compilation/needspkgmod.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
@@ -1055,9 +1066,9 @@ stdenv.mkDerivation (finalAttrs: {
substituteInPlace dmd/compiler/test/dshell/test6952.d --replace-fail "/usr/bin/env bash" "${bash}/bin/bash"
'' + lib.optionalString stdenv.hostPlatform.isLinux ''
substituteInPlace phobos/std/socket.d --replace-fail "assert(ih.addrList[0] == 0x7F_00_00_01);" ""
- '' + lib.optionalString stdenv.hostPlatform.isDarwin ''
- substituteInPlace phobos/std/socket.d --replace-fail "foreach (name; names)" "names = []; foreach (name; names)"
- '';
+ ''; # + lib.optionalString stdenv.hostPlatform.isDarwin ''
+ # substituteInPlace phobos/std/socket.d --replace-fail "foreach (name; names)" "names = []; foreach (name; names)"
+ #'';
nativeBuildInputs = [
makeWrapper
@@ -1287,19 +1298,6 @@ stdenv.mkDerivation {
- version in nixpkgs:
- https://search.nixos.org/packages?channel=unstable&show=dub&from=0&size=100&sort=relevance&type=packages&query=dub
-**** notes
-
-- OK dub == current OK ✓
-
-- NOTES for dub 1.33.0 >= 1.31.0 KO ✗
- - dub builds test tilix which calls in gtkd
- - ISSUES dub FAILS to build project from local disk that has built without issue
- since dub v1.23.0
- - BROKEN breaks on subproject ends up in nix: Error /homeless-shelter:
- Permission denied
-
-- OK dub == 1.30.0 OK ✓
-
*** overlays
**** default.nix
@@ -1353,7 +1351,6 @@ stdenv.mkDerivation (finalAttrs: {
break
fi
done
- #export DMD=${ldc}/bin/ldmd2
if [ "$DC" == "" ]; then
exit "Error: could not find D compiler"
fi
@@ -1385,6 +1382,7 @@ stdenv.mkDerivation (finalAttrs: {
rm -rf test/pr2642-cache-db # added to build v1.34.0
rm -rf test/pr2644-describe-artifact-path # added to build v1.36.0
rm -rf test/pr2647-build-deep # added to build v1.36.0
+ rm -rf test/issue2698-cimportpaths-broken-with-dmd-ldc # added to build v1.40.0
./test/run-unittest.sh
runHook postCheck
@@ -1407,7 +1405,7 @@ stdenv.mkDerivation (finalAttrs: {
})
#+END_SRC
-*** dcompiler SET
+*** dcompiler
#+NAME: dcompiler
#+BEGIN_SRC nix
@@ -1620,9 +1618,9 @@ Adapted from https://github.com/dlang/tools/commit/6c6a042d1b08e3ec1790bd07a7f69
$(ROOT)/catdoc$(DOTEXE) \
#+END_SRC
-** versions SET
+** versions GET
*** direnv
-***** select version SET OK ✓
+***** select version
#+NAME: direnv_version
#+HEADER: :noweb yes
@@ -1643,7 +1641,7 @@ Adapted from https://github.com/dlang/tools/commit/6c6a042d1b08e3ec1790bd07a7f69
<<./nix-develop-dlang-shared.org:ldc-version-info()>>
#+END_SRC
-***** select version SET OK ✓
+***** selected version
#+NAME: ldc_version
#+HEADER: :noweb yes
@@ -1662,6 +1660,7 @@ Adapted from https://github.com/dlang/tools/commit/6c6a042d1b08e3ec1790bd07a7f69
#+END_SRC
*** dmd
+**** selected version
#+NAME: dmd_version
#+HEADER: :noweb yes
@@ -1680,6 +1679,7 @@ Adapted from https://github.com/dlang/tools/commit/6c6a042d1b08e3ec1790bd07a7f69
#+END_SRC
*** dub
+**** selected version
#+NAME: dub_version
#+HEADER: :noweb yes
@@ -1693,6 +1693,7 @@ Adapted from https://github.com/dlang/tools/commit/6c6a042d1b08e3ec1790bd07a7f69
#+END_SRC
*** dtools
+**** selected version
#+NAME: dtools_version
#+HEADER: :noweb yes
@@ -1708,18 +1709,13 @@ Adapted from https://github.com/dlang/tools/commit/6c6a042d1b08e3ec1790bd07a7f69
** sha256 blank_hash
#+NAME: sha256-blank
-#+BEGIN_SRC nix
-sha256-0000000000000000000000000000000000000000000=
+#+BEGIN_SRC emacs-lisp
+<<./nix-develop-dlang-shared.org:sha256-blank()>>
#+END_SRC
#+NAME: blank_hash
-#+BEGIN_SRC nix
-sha256-0000000000000000000000000000000000000000000=
-#+END_SRC
-
-#+NAME: assumed_hash
-#+BEGIN_SRC nix
-sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
+#+BEGIN_SRC emacs-lisp
+<<./nix-develop-dlang-shared.org:sha256-blank()>>
#+END_SRC
* __END__