Skip to content

Commit

Permalink
fix(pkgs/dmd/{v2.102.2..v2.104.0): Add patch to enable x86_64-darwin …
Browse files Browse the repository at this point in the history
  • Loading branch information
PetarKirov committed Feb 18, 2024
1 parent 7c4e016 commit 9a750cd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/version-utils.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{...}: {
versionBetween = after: before: version:
((builtins.compareVersions version after) >= 0)
&& ((builtins.compareVersions version before) < 0);
}
11 changes: 11 additions & 0 deletions pkgs/dmd/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
HOST_DMD ? "${callPackage ./bootstrap.nix {}}/bin/dmd",
}: let
inherit (import ../../lib/build-status.nix {inherit lib;}) getBuildStatus;
inherit (import ../../lib/version-utils.nix {inherit lib;}) versionBetween;

buildStatus = getBuildStatus "dmd" version stdenv.system;

Expand Down Expand Up @@ -196,6 +197,16 @@ in
extraPrefix = "druntime/";
sha256 = "sha256-/pPKK7ZK9E/mBrxm2MZyBNhYExE8p9jz8JqBdZSE6uY=";
})
]
++ lib.optionals (versionBetween "2.102.2" "2.104.0" version) [
(fetchpatch {
# Fix for: https://issues.dlang.org/show_bug.cgi?id=23846
# Implemented in: https://github.com/dlang/dmd/pull/15139
url = "https://github.com/dlang/dmd/commit/deaf1b81986c57d31a1b1163301ca4d157505220.patch";
stripLen = 1;
extraPrefix = "dmd/";
sha256 = "sha256-xgaIraFH3ZfIn99ms148MP7cKV63JgU90yEYq21noRw=";
})
];

postPatch =
Expand Down

0 comments on commit 9a750cd

Please sign in to comment.