wxhexeditor: add darwin support
This commit is contained in:
parent
a989aa4619
commit
4a4300eae4
@ -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 ];
|
||||
};
|
||||
}
|
||||
|
@ -32423,7 +32423,9 @@ with pkgs;
|
||||
wsjtx = qt5.callPackage ../applications/radio/wsjtx { };
|
||||
|
||||
wxhexeditor = callPackage ../applications/editors/wxhexeditor {
|
||||
wxGTK = wxGTK31;
|
||||
inherit (darwin.apple_sdk.frameworks) Cocoa;
|
||||
inherit (llvmPackages) openmp;
|
||||
wxGTK = wxGTK32;
|
||||
};
|
||||
|
||||
xa = callPackage ../development/compilers/xa/xa.nix { };
|
||||
|
Loading…
Reference in New Issue
Block a user