depot/third_party/nixpkgs/pkgs/tools/graphics/hobbits/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

38 lines
1.1 KiB
Nix

{ lib, stdenv, mkDerivation, fetchFromGitHub
, cmake, pkg-config, pffft, libpcap, libusb1, python3, wrapQtAppsHook
}:
stdenv.mkDerivation rec {
pname = "hobbits";
version = "0.54.1";
src = fetchFromGitHub {
owner = "Mahlet-Inc";
repo = "hobbits";
rev = "v${version}";
hash = "sha256-SbSuw5e2ll/wU5UBV0MOlvCXb4rvPtsE4l8XzRbBiLI=";
};
postPatch = ''
substituteInPlace src/hobbits-core/settingsdata.cpp \
--replace "pythonHome = \"/usr\"" "pythonHome = \"${python3}\""
substituteInPlace cmake/gitversion.cmake \
--replace "[Mystery Build]" "${version}"
'';
buildInputs = [ pffft libpcap libusb1 python3 ];
nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];
cmakeFlags = [ "-DUSE_SYSTEM_PFFFT=ON" ];
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isAarch64 "-Wno-error=narrowing";
meta = with lib; {
description = "Multi-platform GUI for bit-based analysis, processing, and visualization";
homepage = "https://github.com/Mahlet-Inc/hobbits";
license = licenses.mit;
maintainers = with maintainers; [ sikmir ];
platforms = platforms.linux;
};
}