diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2022-10-08 21:44:03 +0200 |
---|---|---|
committer | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2022-10-08 21:44:03 +0200 |
commit | 4a4300eae49622868868999f773b72d3e4598d59 (patch) | |
tree | e74dda236340ef1674ac61a3f52679d074a176a4 /pkgs/applications/editors/wxhexeditor | |
parent | a989aa4619162ff37bcbb8c2fb1e502658647fb2 (diff) |
wxhexeditor: add darwin support
Diffstat (limited to 'pkgs/applications/editors/wxhexeditor')
-rw-r--r-- | pkgs/applications/editors/wxhexeditor/default.nix | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/pkgs/applications/editors/wxhexeditor/default.nix b/pkgs/applications/editors/wxhexeditor/default.nix index f310fb85a26c6..efcbe32f78d77 100644 --- a/pkgs/applications/editors/wxhexeditor/default.nix +++ b/pkgs/applications/editors/wxhexeditor/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, fetchpatch, wxGTK, autoconf, automake, libtool, python2, gettext }: +{ lib, stdenv, fetchFromGitHub, fetchpatch, wxGTK, autoconf, automake, libtool, python2, gettext, openmp, Cocoa }: stdenv.mkDerivation rec { pname = "wxHexEditor"; @@ -12,13 +12,17 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ autoconf automake ]; - buildInputs = [ wxGTK libtool python2 gettext ]; + buildInputs = [ wxGTK libtool python2 gettext ] + ++ lib.optionals stdenv.cc.isClang [ openmp ] + ++ lib.optionals stdenv.isDarwin [ Cocoa ]; preConfigure = "patchShebangs ."; prePatch = '' substituteInPlace Makefile --replace "/usr" "$out" substituteInPlace Makefile --replace "mhash; ./configure" "mhash; ./configure --prefix=$out" + '' + lib.optionalString stdenv.cc.isClang '' + substituteInPlace Makefile --replace "-lgomp" "-lomp" ''; patches = [ @@ -30,7 +34,7 @@ stdenv.mkDerivation rec { ./missing-semicolon.patch ]; - makeFlags = [ "OPTFLAGS=-fopenmp" ]; + makeFlags = lib.optionals stdenv.cc.isGNU [ "OPTFLAGS=-fopenmp" ]; meta = { description = "Hex Editor / Disk Editor for Huge Files or Devices"; @@ -46,6 +50,7 @@ stdenv.mkDerivation rec { ''; homepage = "http://www.wxhexeditor.org/"; license = lib.licenses.gpl2; - platforms = lib.platforms.linux; + platforms = lib.platforms.unix; + maintainers = with lib.maintainers; [ wegank ]; }; } |