diff options
Diffstat (limited to 'nix-overlays/ldc')
-rw-r--r-- | nix-overlays/ldc/bootstrap.nix | 12 | ||||
-rw-r--r-- | nix-overlays/ldc/package.nix | 25 |
2 files changed, 21 insertions, 16 deletions
diff --git a/nix-overlays/ldc/bootstrap.nix b/nix-overlays/ldc/bootstrap.nix index 8f76b5b..f166568 100644 --- a/nix-overlays/ldc/bootstrap.nix +++ b/nix-overlays/ldc/bootstrap.nix @@ -13,13 +13,13 @@ let inherit (stdenv) hostPlatform; OS = if hostPlatform.isDarwin then "osx" else hostPlatform.parsed.kernel.name; ARCH = if hostPlatform.isDarwin && hostPlatform.isAarch64 then "arm64" else hostPlatform.parsed.cpu.name; - version = "1.25.0"; + version = "1.41.0"; hashes = { - # Get these from `nix store prefetch-file https://github.com/ldc-developers/ldc/releases/download/v1.25.0/ldc2-1.25.0-osx-x86_64.tar.xz` etc.. - osx-x86_64 = "sha256-6iKnbS+oalLKmyS8qYD/wS21b7+O+VgsWG2iT4PrWPU="; - linux-x86_64 = "sha256-sfg47RdlsIpryc3iZvE17OtLweh3Zw6DeuNJYgpuH+o="; - linux-aarch64 = "sha256-UDZ43x4flSo+SfsPeE8juZO2Wtk2ZzwySk0ADHnvJBI="; - osx-arm64 = "sha256-O/x0vy0wwQFaDc4uWSeMhx+chJKqbQb6e5QNYf+7DCw="; + # Get these from `nix store prefetch-file https://github.com/ldc-developers/ldc/releases/download/v1.41.0/ldc2-1.41.0-osx-x86_64.tar.xz` etc.. + osx-x86_64 = "sha256-W8/0i2PFakXbqs2wxb3cjqa+htSgx7LHyDGOBH9yEYE="; + linux-x86_64 = "sha256-SkOUV/D+WeadAv1rV1Sfw8h60PVa2fueQlB7b44yfI8="; + linux-aarch64 = "sha256-HEuVChPVM3ntT1ZDZsJ+xW1iYeIWhogNcMdIaz6Me6g="; + osx-arm64 = "sha256-FXJnBC8QsEchBhkxSqcZtPC/iHYB6TscY0qh7LPFRuQ="; }; in stdenv.mkDerivation { pname = "ldc-bootstrap"; diff --git a/nix-overlays/ldc/package.nix b/nix-overlays/ldc/package.nix index ff2089b..1767785 100644 --- a/nix-overlays/ldc/package.nix +++ b/nix-overlays/ldc/package.nix @@ -2,20 +2,21 @@ lib, stdenv, fetchFromGitHub, + fetchpatch, + callPackage, + makeWrapper, + removeReferencesTo, + runCommand, + writeText, + targetPackages, cmake, ninja, - llvm_19, + llvm_20, curl, tzdata, lit, gdb, unzip, - darwin, - callPackage, - makeWrapper, - runCommand, - writeText, - targetPackages, ldcBootstrap ? callPackage ./bootstrap.nix { }, }: @@ -63,9 +64,7 @@ stdenv.mkDerivation (finalAttrs: { ''; nativeBuildInputs = [ - cmake ldcBootstrap lit lit.python llvm_19.dev makeWrapper ninja unzip - ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - darwin.apple_sdk.frameworks.Foundation + cmake ldcBootstrap lit lit.python llvm_20.dev makeWrapper ninja unzip ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ # https://github.com/NixOS/nixpkgs/pull/36378#issuecomment-385034818 gdb @@ -135,6 +134,12 @@ stdenv.mkDerivation (finalAttrs: { --set-default CC ${targetPackages.stdenv.cc}/bin/cc ''; + preFixup = '' + find $out/bin -type f -exec ${removeReferencesTo}/bin/remove-references-to -t ${ldcBootstrap} '{}' + + ''; + + disallowedReferences = [ ldcBootstrap ]; + meta = with lib; { description = "LLVM-based D compiler"; homepage = "https://github.com/ldc-developers/ldc"; |