diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2025-03-22 14:03:51 -0400 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2025-03-22 14:04:01 -0400 |
commit | 775413f4d18bb1f0150011ce8870e1a387702fd6 (patch) | |
tree | 1ca006cd4dde488b5be19b98f22c61b6bdb48287 /nix-overlays/ldc/package.nix | |
parent | nix dlang overlay dmd-2.110.0 (diff) |
- following nixpkgs pretty much
- ldc-1.40.1 (based on D 2.110.0)
- dub-1.39.0
- dtools-2.110.0 (overlay changes)
Diffstat (limited to 'nix-overlays/ldc/package.nix')
-rw-r--r-- | nix-overlays/ldc/package.nix | 105 |
1 files changed, 53 insertions, 52 deletions
diff --git a/nix-overlays/ldc/package.nix b/nix-overlays/ldc/package.nix index c20084c..39b510a 100644 --- a/nix-overlays/ldc/package.nix +++ b/nix-overlays/ldc/package.nix @@ -1,26 +1,27 @@ -{ lib -, stdenv -, fetchFromGitHub -, cmake -, ninja -, llvm_19 -, curl -, tzdata -, lit -, gdb -, unzip -, darwin -, callPackage -, makeWrapper -, runCommand -, writeText -, targetPackages - -, ldcBootstrap ? callPackage ./bootstrap.nix { } +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + ninja, + llvm_19, + curl, + tzdata, + lit, + gdb, + unzip, + darwin, + callPackage, + makeWrapper, + runCommand, + writeText, + targetPackages, + + ldcBootstrap ? callPackage ./bootstrap.nix { }, }: let - pathConfig = runCommand "ldc-lib-paths" {} '' + pathConfig = runCommand "ldc-lib-paths" { } '' mkdir $out echo ${tzdata}/share/zoneinfo/ > $out/TZDatabaseDirFile echo ${curl.out}/lib/libcurl${stdenv.hostPlatform.extensions.sharedLibrary} > $out/LibcurlPathFile @@ -30,13 +31,13 @@ in stdenv.mkDerivation (finalAttrs: { pname = "ldc"; - version = "1.40.0"; + version = "1.40.1"; src = fetchFromGitHub { owner = "ldc-developers"; repo = "ldc"; rev = "v${finalAttrs.version}"; - hash = "sha256-LT85DlAebecPpBUgZP0ayKTVrTUqN6DMJVEWTatLOxY="; + hash = "sha256-WdnwdH25A5oMNNY3uWG2hxnaAT+S1hNuP7LElH3uuuk="; fetchSubmodules = true; }; @@ -106,8 +107,7 @@ stdenv.mkDerivation (finalAttrs: { ''; # https://github.com/ldc-developers/ldc/issues/2497#issuecomment-459633746 - additionalExceptions = lib.optionalString stdenv.hostPlatform.isDarwin - "|druntime-test-shared"; + additionalExceptions = lib.optionalString stdenv.hostPlatform.isDarwin "|druntime-test-shared"; checkPhase = '' # Build default lib test runners @@ -147,34 +147,35 @@ stdenv.mkDerivation (finalAttrs: { }; passthru.ldcBootstrap = ldcBootstrap; - passthru.tests = let - ldc = finalAttrs.finalPackage; - helloWorld = stdenv.mkDerivation (finalAttrs: { - name = "ldc-hello-world"; - src = writeText "hello_world.d" '' - module hello_world; - import std.stdio; - void main() { - writeln("Hello, world!"); - } - ''; - dontUnpack = true; - buildInputs = [ ldc ]; - dFlags = []; - buildPhase = '' - ldc2 ${lib.escapeShellArgs finalAttrs.dFlags} -of=test $src - ''; - installPhase = '' - mkdir -p $out/bin - mv test $out/bin - ''; - }); - in { - # Without -shared, built binaries should not contain - # references to the compiler binaries. - no-references-to-compiler = helloWorld.overrideAttrs { - disallowedReferences = [ ldc ]; - dFlags = ["-g"]; + passthru.tests = + let + ldc = finalAttrs.finalPackage; + helloWorld = stdenv.mkDerivation (finalAttrs: { + name = "ldc-hello-world"; + src = writeText "hello_world.d" '' + module hello_world; + import std.stdio; + void main() { + writeln("Hello, world!"); + } + ''; + dontUnpack = true; + buildInputs = [ ldc ]; + dFlags = [ ]; + buildPhase = '' + ldc2 ${lib.escapeShellArgs finalAttrs.dFlags} -of=test $src + ''; + installPhase = '' + mkdir -p $out/bin + mv test $out/bin + ''; + }); + in { + # Without -shared, built binaries should not contain + # references to the compiler binaries. + no-references-to-compiler = helloWorld.overrideAttrs { + disallowedReferences = [ ldc ]; + dFlags = ["-g"]; }; }; }) |