Skip to content

Commit

Permalink
elkhound, weidu: add darwin support (#372808)
Browse files Browse the repository at this point in the history
  • Loading branch information
wegank authored Jan 20, 2025
2 parents 69538dc + 38f32ee commit 4600bce
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
3 changes: 1 addition & 2 deletions pkgs/by-name/el/elkhound/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ stdenv.mkDerivation rec {
homepage = "https://scottmcpeak.com/elkhound/";
license = licenses.bsd3;
maintainers = with maintainers; [ peterhoeg ];
# possibly works on Darwin
platforms = platforms.linux;
platforms = platforms.unix;
};
}
15 changes: 11 additions & 4 deletions pkgs/by-name/we/weidu/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
ocaml-ng,
perl,
which,
gnumake42,
fetchpatch,
}:

let
Expand All @@ -27,9 +27,17 @@ stdenv.mkDerivation rec {
sha256 = "sha256-+vkKTzFZdAzY2dL+mZ4A0PDxhTKGgs9bfArz7S6b4m4=";
};

patches = [
(fetchpatch {
url = "https://github.com/WeiDUorg/weidu/commit/bb90190d8bf7d102952c07d8288a7dc6c7a3322e.patch";
hash = "sha256-Z4hHdMR1dYjJeERJSqlYynyPu2CvE6+XJuCr9ogDmvk=";
})
];

postPatch = ''
substitute sample.Configuration Configuration \
--replace /usr/bin ${lib.makeBinPath [ ocaml' ]} \
--replace /usr/local/bin ${lib.makeBinPath [ ocaml' ]} \
--replace elkhound ${elkhound}/bin/elkhound
mkdir -p obj/{.depend,x86_LINUX}
Expand All @@ -43,7 +51,6 @@ stdenv.mkDerivation rec {
ocaml'
perl
which
gnumake42
];

buildFlags = [
Expand All @@ -69,7 +76,7 @@ stdenv.mkDerivation rec {
homepage = "https://weidu.org";
license = licenses.gpl2Only;
maintainers = with maintainers; [ peterhoeg ];
# should work fine on both Darwin and Windows
platforms = platforms.linux;
# should work fine on Windows
platforms = platforms.unix;
};
}

0 comments on commit 4600bce

Please sign in to comment.