Skip to content

Commit

Permalink
WIP: imhex: add darwin support
Browse files Browse the repository at this point in the history
Currently fails with "error: unknown type name 'nullable'"
  • Loading branch information
anka-213 committed Sep 28, 2023
1 parent d1c454a commit 9077b8c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
28 changes: 23 additions & 5 deletions pkgs/applications/editors/imhex/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
{ lib
, stdenv
, gcc12
, freetype
, CoreFoundation
, ApplicationServices
, Foundation
, Cocoa
, CoreAudio
, AppKit
, ninja
, cmake
, llvm
, fetchFromGitHub
Expand All @@ -20,6 +29,7 @@
, yara
, rsync
}:
# gcc@12 ninja

let
version = "1.30.1";
Expand All @@ -44,21 +54,29 @@ stdenv.mkDerivation rec {
hash = "sha256-3s9Dgdhl+k2KjMoSHNl59YOoCEwqK+37DOzKdGP88/4=";
};

nativeBuildInputs = [ cmake llvm python3 perl pkg-config rsync ];
nativeBuildInputs = [ cmake llvm python3 perl pkg-config rsync ninja ];

buildInputs = [
capstone
curl
dbus
file
file # libmagic
fmt_8
glfw3
gtk3
freetype
# gtk3
jansson
libGLU
# libGLU
mbedtls
nlohmann_json
yara
] ++ lib.optionals stdenv.isDarwin [
CoreFoundation
ApplicationServices
Foundation
Cocoa
CoreAudio
AppKit
];

cmakeFlags = [
Expand All @@ -82,6 +100,6 @@ stdenv.mkDerivation rec {
homepage = "https://github.com/WerWolv/ImHex";
license = with licenses; [ gpl2Only ];
maintainers = with maintainers; [ luis kashw2 ];
platforms = platforms.linux;
platforms = platforms.unix;
};
}
5 changes: 4 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33076,7 +33076,10 @@ with pkgs;

imgp = python3Packages.callPackage ../applications/graphics/imgp { };

imhex = callPackage ../applications/editors/imhex { };
imhex = callPackage ../applications/editors/imhex {
stdenv = gcc12Stdenv;
inherit (darwin.apple_sdk.frameworks) CoreFoundation ApplicationServices Foundation Cocoa CoreAudio AppKit;
};

inframap = callPackage ../applications/networking/cluster/inframap { };

Expand Down

0 comments on commit 9077b8c

Please sign in to comment.