aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2023-07-08 16:02:11 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2023-07-09 20:43:55 -0400
commit5277e7def7b167021ae49a3d101926b40b98e745 (patch)
treeb20fee98c3dc04cbf783959e24e8606ae8a3d774
parentflake.nix (local filesystem) spine overlays (diff)
flake nix build dub, set HOME, dub >= 1.31.0 fix
- fixes dub >= 1.31.0 build failure, attempted to build in /homeless-shelter
-rw-r--r--flake.lock22
-rw-r--r--flake.nix12
-rw-r--r--nix-overlays/README15
-rw-r--r--nix-overlays/dub/default.nix4
-rw-r--r--nix-overlays/ldc/generic.nix4
-rw-r--r--org/config_nix.org12
-rw-r--r--org/nixpkgs_overlays_d_related.org68
7 files changed, 98 insertions, 39 deletions
diff --git a/flake.lock b/flake.lock
index 866fca9..3a1cd44 100644
--- a/flake.lock
+++ b/flake.lock
@@ -8,8 +8,8 @@
]
},
"locked": {
- "lastModified": 1686518136,
- "narHash": "sha256-HWqgvb6sgx9i/IivQLd57JGE+ZKLs2o9BFttTesJd6Y=",
+ "lastModified": 1688832064,
+ "narHash": "sha256-k2XxsBmRBgPFXqmrTjJ59hJGMbbIIDNSw/PRkhmjuFY=",
"type": "git",
"url": "file:///home/ralph/grotto/repo/git.repo/projects/doc-reform/packages/nix-flakes/dlang/dlang-nix-flakes"
},
@@ -23,11 +23,11 @@
"systems": "systems"
},
"locked": {
- "lastModified": 1687171271,
- "narHash": "sha256-BJlq+ozK2B1sJDQXS3tzJM5a+oVZmi1q0FlBK/Xqv7M=",
+ "lastModified": 1687709756,
+ "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=",
"owner": "numtide",
"repo": "flake-utils",
- "rev": "abfb11bd1aec8ced1c9bb9adfe68018230f4fb3c",
+ "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7",
"type": "github"
},
"original": {
@@ -41,11 +41,11 @@
"systems": "systems_2"
},
"locked": {
- "lastModified": 1687171271,
- "narHash": "sha256-BJlq+ozK2B1sJDQXS3tzJM5a+oVZmi1q0FlBK/Xqv7M=",
+ "lastModified": 1687709756,
+ "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=",
"owner": "numtide",
"repo": "flake-utils",
- "rev": "abfb11bd1aec8ced1c9bb9adfe68018230f4fb3c",
+ "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7",
"type": "github"
},
"original": {
@@ -56,11 +56,11 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1687488839,
- "narHash": "sha256-7JDjuyHwUvGJJge9jxfRJkuYyL5G5yipspc4J3HwjGA=",
+ "lastModified": 1688894907,
+ "narHash": "sha256-U7hEDDhzAhLp6T+DEUbfwAsL+BtqFFGn+S1pa/0XrZY=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "f9e94676ce6c7531c44d38da61d2669ebec0f603",
+ "rev": "4ddf98349c793377c76806ebfbdfb2b96dd4ef5d",
"type": "github"
},
"original": {
diff --git a/flake.nix b/flake.nix
index 336fb0e..8a411b3 100644
--- a/flake.nix
+++ b/flake.nix
@@ -61,6 +61,9 @@
inherit devEnv;
buildInputs = [sqlite];
nativeBuildInputs = [dub ldc gnumake];
+ preBuild = ''
+ export HOME=$(pwd)
+ '';
buildPhase = ''
runHook preBuild
for DC_ in dmd ldmd2 ldc2 gdc gdmd; do
@@ -87,6 +90,9 @@
inherit devEnv;
buildInputs = [sqlite];
nativeBuildInputs = [dub dmd gnumake];
+ preBuild = ''
+ export HOME=$(pwd)
+ '';
buildPhase = ''
runHook preBuild
dub build --cache=local --compiler=$(type -P dmd) --build=dmd --combined --skip-registry=all
@@ -106,6 +112,9 @@
inherit devEnv;
buildInputs = [sqlite];
nativeBuildInputs = [dub ldc gnumake];
+ preBuild = ''
+ export HOME=$(pwd)
+ '';
buildPhase = ''
runHook preBuild
dub build --cache=local --compiler=$(type -P ldc2) --build=ldc2 --combined --skip-registry=all
@@ -125,6 +134,9 @@
inherit devEnv;
buildInputs = with pkgs; [sqlite];
nativeBuildInputs = with pkgs; [dub ldc gnumake];
+ preBuild = ''
+ export HOME=$(pwd)
+ '';
buildPhase = ''
runHook preBuild
dub build --cache=local --compiler=$(type -P ldc2) --build=ldc2 --combined --skip-registry=all
diff --git a/nix-overlays/README b/nix-overlays/README
index 722d613..44e1585 100644
--- a/nix-overlays/README
+++ b/nix-overlays/README
@@ -24,7 +24,7 @@ of publishing, in some cases with additional fixes.
nix overlays for (updates nixpkgs, more recent versions of):
- ldc ( 1.30.0 -> 1.32.2 )
- - dub ( 1.23.0 -> 1.30.0 ) [for nix versions 1.31.0 ... 1.33.0 broken]
+ - dub ( 1.23.0 -> 1.33.1 ) [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 ✗
@@ -97,13 +97,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.30.0 )
+*** dub ( 1.23.0 -> 1.33.1 )
- 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.30.0.tar.gz
+ nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.33.1.tar.gz
- https://github.com/dlang/dub/issues
- version in nixpkgs:
@@ -111,9 +111,10 @@ not yet provided in nixpkgs with gcc12, no attempt made
- dub nixpkg overlay is updated and runs most dub tests correctly
-- dub from v1.31.0 FAILS to build packages with nix tools that previous version
- of dub built (from v1.23.0 to v1.30.0 which is currently in nixpkgs); FAILURE
- is from v1.31.0 through v1.32.1 (which is current at the time of this commit)
+- dub OK ✓ ( 1.30.0 -> 1.33.1 )
+
+ 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.103.1 )
@@ -151,3 +152,5 @@ It is possible to compare the changes made by the overlays here directly against
what is currently available in nixpkgs.
- https://search.nixos.org/packages?channel=unstable&size=100&sort=relevance&query=
+
+nix flake update && nix flake check --show-trace && nix flake info && echo "" && nix flake show
diff --git a/nix-overlays/dub/default.nix b/nix-overlays/dub/default.nix
index 0ebc576..3993f8d 100644
--- a/nix-overlays/dub/default.nix
+++ b/nix-overlays/dub/default.nix
@@ -4,7 +4,7 @@ assert dcompiler != null;
stdenv.mkDerivation rec {
pname = "dub";
- version = "1.30.0";
+ version = "1.33.1";
enableParallelBuilding = true;
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
owner = "dlang";
repo = "dub";
rev = "v${version}";
- sha256 = "sha256-iVl7bjblvIxvrUX7Phq6h4AIAmZjNVkGYYFA1hhsE7c=";
+ sha256 = "sha256-QFgUsO04VRXBDjGI5QQs7u9XrexG7/V34TMgJP1D8yA=";
};
#postUnpack = ''
diff --git a/nix-overlays/ldc/generic.nix b/nix-overlays/ldc/generic.nix
index 979d78c..f88f448 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_15, curl, tzdata
+{ lib, stdenv, fetchurl, cmake, ninja, llvm_14, 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_15.dev makeWrapper ninja unzip
+ cmake ldcBootstrap lit lit.python llvm_14.dev makeWrapper ninja unzip
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.Foundation
diff --git a/org/config_nix.org b/org/config_nix.org
index fbec722..fb282b3 100644
--- a/org/config_nix.org
+++ b/org/config_nix.org
@@ -88,6 +88,9 @@
inherit devEnv;
buildInputs = [sqlite];
nativeBuildInputs = [dub ldc gnumake];
+ preBuild = ''
+ export HOME=$(pwd)
+ '';
buildPhase = ''
runHook preBuild
for DC_ in dmd ldmd2 ldc2 gdc gdmd; do
@@ -114,6 +117,9 @@
inherit devEnv;
buildInputs = [sqlite];
nativeBuildInputs = [dub dmd gnumake];
+ preBuild = ''
+ export HOME=$(pwd)
+ '';
buildPhase = ''
runHook preBuild
dub build --cache=local --compiler=$(type -P dmd) --build=dmd --combined --skip-registry=all
@@ -133,6 +139,9 @@
inherit devEnv;
buildInputs = [sqlite];
nativeBuildInputs = [dub ldc gnumake];
+ preBuild = ''
+ export HOME=$(pwd)
+ '';
buildPhase = ''
runHook preBuild
dub build --cache=local --compiler=$(type -P ldc2) --build=ldc2 --combined --skip-registry=all
@@ -152,6 +161,9 @@
inherit devEnv;
buildInputs = with pkgs; [sqlite];
nativeBuildInputs = with pkgs; [dub ldc gnumake];
+ preBuild = ''
+ export HOME=$(pwd)
+ '';
buildPhase = ''
runHook preBuild
dub build --cache=local --compiler=$(type -P ldc2) --build=ldc2 --combined --skip-registry=all
diff --git a/org/nixpkgs_overlays_d_related.org b/org/nixpkgs_overlays_d_related.org
index 9ca42d2..76b93d9 100644
--- a/org/nixpkgs_overlays_d_related.org
+++ b/org/nixpkgs_overlays_d_related.org
@@ -134,9 +134,10 @@ not yet provided in nixpkgs with gcc12, no attempt made
- dub nixpkg overlay is updated and runs most dub tests correctly
-- dub from v1.31.0 FAILS to build packages with nix tools that previous version
- of dub built (from v1.23.0 to v1.30.0 which is currently in nixpkgs); FAILURE
- is from v1.31.0 through v1.32.1 (which is current at the time of this commit)
+- dub OK ✓ ( 1.30.0 -> <<dub_version>> )
+
+ 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 -> <<dtools_version>> )
@@ -175,6 +176,7 @@ what is currently available in nixpkgs.
- https://search.nixos.org/packages?channel=unstable&size=100&sort=relevance&query=
+nix flake update && nix flake check --show-trace && nix flake info && echo "" && nix flake show
#+END_SRC
** .gitignore
@@ -247,10 +249,10 @@ fi
echo '
.envrc-local echo ❯❯
- ❯❯ nix flake update && nix flake check --show-trace && nix flake show && nix develop ".#devShell" -c zsh
+ ❯❯ nix flake update && nix flake check --show-trace && nix flake show && nix develop ".#devShell" -c $SHELL
❯❯ nix develop
- ❯❯ nix develop -c zsh
+ ❯❯ nix develop -c $SHELL
❯❯ nix develop ".#dsh-overlay-ldc" --print-build-logs
❯❯ nix build
@@ -459,7 +461,7 @@ with pkgs;
#echo '
# shell.nix echo ❯❯
- # ❯❯ nix flake update && nix flake check --show-trace && nix flake show && nix develop ".#devShell" -c zsh
+ # ❯❯ nix flake update && nix flake check --show-trace && nix flake show && nix develop ".#devShell" -c $SHELL
#'
'';
}
@@ -471,7 +473,7 @@ will automatically build the default development shell, perhaps unecessary
#+HEADER: :tangle-NO "../nix-overlays/default.nix"
#+HEADER: :tangle-mode (identity #o755)
-#+HEADER: :shebang #!/usr/bin/env -S nix-build
+#+HEADER: :shebang "#!/usr/bin/env -S nix-build"
#+BEGIN_SRC nix
{pkgs ? import <nixpkgs> {}}:
pkgs.callPackage ./shell.nix {}
@@ -510,7 +512,7 @@ import ./generic.nix {
#+HEADER: :tangle "../nix-overlays/ldc/generic.nix"
#+BEGIN_SRC nix
{ version, sha256 }:
-{ lib, stdenv, fetchurl, cmake, ninja, llvm_15, curl, tzdata
+{ lib, stdenv, fetchurl, cmake, ninja, llvm_14, curl, tzdata
, libconfig, lit, gdb, unzip, darwin, bash
, callPackage, makeWrapper, runCommand, targetPackages
, ldcBootstrap ? callPackage ./bootstrap.nix { }
@@ -565,7 +567,7 @@ stdenv.mkDerivation rec {
'';
nativeBuildInputs = [
- cmake ldcBootstrap lit lit.python llvm_15.dev makeWrapper ninja unzip
+ cmake ldcBootstrap lit lit.python llvm_14.dev makeWrapper ninja unzip
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.Foundation
@@ -772,9 +774,23 @@ sha256 = "<<ldc_hash>>";
<<ldc_hash_1_32_2>>
#+END_SRC
+**** 1.33.0-beta2
+
+- nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/archive/refs/tags/v1.33.0-beta2.tar.gz
+
+#+NAME: ldc_version_1_33_0-beta2
+#+BEGIN_SRC nix
+1.33.0-beta2
+#+END_SRC
+
+#+NAME: ldc_hash_1_33_0-beta2
+#+BEGIN_SRC nix
+sha256-ICtIrLItQsvhCHFh3l7Ki1x154xI6ygmAbw+pmlFTlY=
+#+END_SRC
+
**** 1.33.0-beta1
-- nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/archive/refs/tags/v1.32.1.tar.gz
+- nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/archive/refs/tags/v1.33.0-beta1.tar.gz
#+NAME: ldc_version_1_33_0-beta1
#+BEGIN_SRC nix
@@ -861,7 +877,7 @@ sha256-/bs3bwgkLZF5IqaiKnc5gCF/r6MQBG/F1kWUkK8j2s0=
**** links
- https://dlang.org/
- - https://wiki.dlang.org/LDC
+ - https://wiki.dlang.org/DMD
- https://github.com/dlang/dmd
- https://github.com/dlang/dmd/tags
@@ -1291,7 +1307,7 @@ sha256-qXvY1ECN4mPwOGgOE1FWwvxoRvlSww3tGLWgBdhzAKo=
sha256-kTHRaAKG7cAGb4IE/NGHWaZ8t7ZceKj03l6E8wLzJzs=
#+END_SRC
-** dub OK KO ✗ ISSUE (>= 1.31.0)
+** dub OK
*** info
**** links
@@ -1410,15 +1426,29 @@ stdenv.mkDerivation rec {
#+NAME: dub_version
#+BEGIN_SRC nix
-<<dub_version_1_30_0>>
+<<dub_version_1_33_1>>
#+END_SRC
#+NAME: dub_hash
#+BEGIN_SRC nix
-<<dub_hash_1_30_0>>
+<<dub_hash_1_33_1>>
+#+END_SRC
+
+**** 1.33.1 OK ✓
+
+- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.33.1.tar.gz
+
+#+NAME: dub_version_1_33_1
+#+BEGIN_SRC nix
+1.33.1
#+END_SRC
-**** 1.33.0 OK ✓ KO ✗ ISSUE
+#+NAME: dub_hash_1_33_1
+#+BEGIN_SRC nix
+sha256-QFgUsO04VRXBDjGI5QQs7u9XrexG7/V34TMgJP1D8yA=
+#+END_SRC
+
+**** 1.33.0 OK ✓
- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.33.0.tar.gz
@@ -1432,7 +1462,7 @@ stdenv.mkDerivation rec {
sha256-4Mha7WF6cg3DIccfpvOnheuvgfziv/7wo8iFsPXO4yY=
#+END_SRC
-**** 1.32.1 OK ✓ KO ✗ ISSUE
+**** 1.32.1 OK ✓
- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.32.1.tar.gz
@@ -1448,7 +1478,7 @@ sha256-5pW3Fu3PQ1ZLJnsuh7fPpEBNbVQgGfFyiuMrAVOJKQA=
- ISSUES from 1.31.0 continuing
-**** 1.31.1 OK ✓ KO ✗ ISSUE
+**** 1.31.1 OK ✓
- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.31.1.tar.gz
@@ -1464,10 +1494,12 @@ sha256-dp64D51ypowXS1+EYKRXh5hpa3rMmiotvKO2FW+i92w=
- ISSUES from 1.31.0 continuing
-**** 1.31.0 OK ✓ KO ✗ ISSUE
+**** 1.31.0 OK ✓ NOTE
- nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.31.0.tar.gz
+behavior change in dub requiring the setting of pwd in buildPhase
+
#+NAME: dub_version_1_31_0
#+BEGIN_SRC nix
1.31.0