wxhexeditor: add darwin support
This commit is contained in:
parent
a989aa4619
commit
4a4300eae4
2 changed files with 12 additions and 5 deletions
|
@ -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 {
|
stdenv.mkDerivation rec {
|
||||||
pname = "wxHexEditor";
|
pname = "wxHexEditor";
|
||||||
|
@ -12,13 +12,17 @@ stdenv.mkDerivation rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ autoconf automake ];
|
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 .";
|
preConfigure = "patchShebangs .";
|
||||||
|
|
||||||
prePatch = ''
|
prePatch = ''
|
||||||
substituteInPlace Makefile --replace "/usr" "$out"
|
substituteInPlace Makefile --replace "/usr" "$out"
|
||||||
substituteInPlace Makefile --replace "mhash; ./configure" "mhash; ./configure --prefix=$out"
|
substituteInPlace Makefile --replace "mhash; ./configure" "mhash; ./configure --prefix=$out"
|
||||||
|
'' + lib.optionalString stdenv.cc.isClang ''
|
||||||
|
substituteInPlace Makefile --replace "-lgomp" "-lomp"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
|
@ -30,7 +34,7 @@ stdenv.mkDerivation rec {
|
||||||
./missing-semicolon.patch
|
./missing-semicolon.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
makeFlags = [ "OPTFLAGS=-fopenmp" ];
|
makeFlags = lib.optionals stdenv.cc.isGNU [ "OPTFLAGS=-fopenmp" ];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Hex Editor / Disk Editor for Huge Files or Devices";
|
description = "Hex Editor / Disk Editor for Huge Files or Devices";
|
||||||
|
@ -46,6 +50,7 @@ stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
homepage = "http://www.wxhexeditor.org/";
|
homepage = "http://www.wxhexeditor.org/";
|
||||||
license = lib.licenses.gpl2;
|
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 { };
|
wsjtx = qt5.callPackage ../applications/radio/wsjtx { };
|
||||||
|
|
||||||
wxhexeditor = callPackage ../applications/editors/wxhexeditor {
|
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 { };
|
xa = callPackage ../development/compilers/xa/xa.nix { };
|
||||||
|
|
Loading…
Reference in a new issue