From de52a00258a1bd98ddba022da9ecb27ab8be50cc Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 28 Nov 2020 13:30:26 -0500 Subject: nix derivation, dub & dub2nix using ldc2 1.24.0 ok - dmd 2.091.1 & dub 1.14.0 broken in nix unstable - dmd 2.094.2 & dub 1.23.0 current dlang - built using modified local nixpkgs dub modified to use ldc (without calls to dmd) - provide overlay for current( dub using ldc ) --- nixDevEnv/dub/mkDub-dmd.nix | 2 +- nixDevEnv/dub/mkDub-ldc.nix | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) (limited to 'nixDevEnv/dub') diff --git a/nixDevEnv/dub/mkDub-dmd.nix b/nixDevEnv/dub/mkDub-dmd.nix index 2600d30..a35f2d5 100644 --- a/nixDevEnv/dub/mkDub-dmd.nix +++ b/nixDevEnv/dub/mkDub-dmd.nix @@ -87,7 +87,7 @@ in { export HOME=$PWD ${lib.concatMapStringsSep "\n" dub-add-local deps} - dub build -b release --combined --skip-registry=all + dub build --build=release --combined --skip-registry=all runHook postBuild ''; diff --git a/nixDevEnv/dub/mkDub-ldc.nix b/nixDevEnv/dub/mkDub-ldc.nix index 8fe20a3..a9cbb82 100644 --- a/nixDevEnv/dub/mkDub-ldc.nix +++ b/nixDevEnv/dub/mkDub-ldc.nix @@ -1,8 +1,5 @@ { pkgs ? import {}, stdenv ? pkgs.stdenv, - rdmd ? pkgs.rdmd, - #dmd ? pkgs.dmd, - #gcc ? pkgs.gcc, ldc ? pkgs.ldc, dub ? pkgs.dub }: @@ -23,7 +20,7 @@ let fromDub = dubDep: mkDerivation rec { name = "${src.name}-${version}"; version = rev-to-version dubDep.fetch.rev; - nativeBuildInputs = [ rdmd ldc dub ]; + nativeBuildInputs = [ ldc dub ]; src = dep2src dubDep; buildPhase = '' @@ -49,7 +46,7 @@ let targetOf = package: "${package.targetPath or "."}/${package.targetName or package.name}"; # Remove reference to build tools and library sources - disallowedReferences = deps: [ ldc rdmd dub ] ++ builtins.map dep2src deps; + disallowedReferences = deps: [ ldc dub ] ++ builtins.map dep2src deps; removeExpr = refs: ''remove-references-to ${lib.concatMapStrings (ref: " -t ${ref}") refs}''; @@ -69,11 +66,11 @@ in { pname = package.name; - nativeBuildInputs = [ rdmd ldc dub pkgs.removeReferencesTo ] ++ nativeBuildInputs; + nativeBuildInputs = [ ldc dub pkgs.removeReferencesTo ] ++ nativeBuildInputs; disallowedReferences = disallowedReferences deps; passthru = passthru // { - inherit dub ldc rdmd pkgs; + inherit dub ldc pkgs; }; src = lib.cleanSourceWith { @@ -91,7 +88,6 @@ in { export HOME=$PWD ${lib.concatMapStringsSep "\n" dub-add-local deps} dub build --compiler=ldc2 --build=release --combined --skip-registry=all - #dub build -b optimize -b inline --combined --skip-registry=all runHook postBuild ''; -- cgit v1.2.3