Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
69 lines
1.8 KiB
Nix
69 lines
1.8 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
cmake,
|
|
pkg-config,
|
|
pffft,
|
|
libpcap,
|
|
libusb1,
|
|
python3,
|
|
qt5,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "hobbits";
|
|
version = "0.55.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Mahlet-Inc";
|
|
repo = "hobbits";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-W6QBLj+GkmM88cOVSIc1PLiVXysjv74J7citFW6SRDM=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace src/hobbits-core/settingsdata.cpp \
|
|
--replace-warn "pythonHome = \"/usr\"" "pythonHome = \"${python3}\""
|
|
substituteInPlace cmake/gitversion.cmake \
|
|
--replace-warn "[Mystery Build]" "${finalAttrs.version}"
|
|
substituteInPlace CMakeLists.txt \
|
|
--replace-warn "SELF_CONTAINED_APP OR APPLE" "SELF_CONTAINED_APP"
|
|
'';
|
|
|
|
buildInputs = [
|
|
pffft
|
|
libpcap
|
|
libusb1
|
|
python3
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
pkg-config
|
|
qt5.wrapQtAppsHook
|
|
];
|
|
|
|
cmakeFlags = [ (lib.cmakeBool "USE_SYSTEM_PFFFT" true) ];
|
|
|
|
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isAarch64 "-Wno-error=narrowing";
|
|
|
|
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
|
mkdir -p $out/{Applications,bin}
|
|
mv $out/hobbits.app $out/Applications
|
|
wrapProgram $out/Applications/hobbits.app/Contents/MacOS/hobbits \
|
|
--prefix DYLD_LIBRARY_PATH : $out/Applications/hobbits.app/Contents/Frameworks
|
|
ln -s $out/Applications/hobbits.app/Contents/MacOS/hobbits $out/bin/hobbits
|
|
# Prevent wrapping
|
|
find $out/Applications -type f -name "*.dylib" -exec chmod -x {} \;
|
|
'';
|
|
|
|
meta = {
|
|
description = "Multi-platform GUI for bit-based analysis, processing, and visualization";
|
|
homepage = "https://github.com/Mahlet-Inc/hobbits";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ sikmir ];
|
|
platforms = with lib.platforms; linux ++ darwin;
|
|
};
|
|
})
|