diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2024-12-04 23:26:20 -0500 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2024-12-05 21:50:12 -0500 |
commit | e3624e86aeda7eaf4f16560f50602639ea60fffe (patch) | |
tree | e95d58a9cb42c665932d1caec2d037a164f61cc9 /flake.nix | |
parent | ldc2 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.nix | 17 |
1 files changed, 8 insertions, 9 deletions
@@ -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; |