summaryrefslogtreecommitdiffhomepage
path: root/flake.nix
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2024-12-04 23:26:20 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2024-12-05 21:50:12 -0500
commite3624e86aeda7eaf4f16560f50602639ea60fffe (patch)
treee95d58a9cb42c665932d1caec2d037a164f61cc9 /flake.nix
parentldc2 overlay default set: ldc2-1.40.0-beta5 (diff)
nix build, dub, take account of nixpkgs build changes
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix17
1 files changed, 8 insertions, 9 deletions
diff --git a/flake.nix b/flake.nix
index 5ad88af..2d9f360 100644
--- a/flake.nix
+++ b/flake.nix
@@ -60,17 +60,16 @@
inherit shell;
inherit devEnv;
buildInputs = [sqlite];
- nativeBuildInputs = [dub ldc gnumake]; # [ dub dmd ]; [ dub ldc ]; [ dub gdc ];
+ nativeBuildInputs = [gnumake dub ldc];
+ preBuild = ''
+ export DCn=ldmd2
+ export DC=$(type -P $DCn || echo "")
+ if [ "$DC" == "" ]; then exit "Error: could not find D compiler"; fi
+ '';
buildPhase = ''
runHook preBuild
- for DC_ in dmd ldmd2 ldc2 gdc gdmd; do
- echo "- check for D compiler $DC_"
- DC=$(type -P $DC_ || echo "")
- if [ ! "$DC" == "" ]; then break; fi
- done
- if [ "$DC" == "" ]; then exit "Error: could not find D compiler"; fi
- echo "$DC_ used as D compiler to build $pname"
- dub build --cache=local --compiler=$DC --build=$DC_ --combined --skip-registry=all
+ echo "$DCn used as D compiler to build $pname"
+ dub build --cache=local --compiler=$DC --build=$DCn --combined --skip-registry=all
runHook postBuild
'';
inherit checkPhase;