summary refs log tree commit diff
path: root/pkgs/tools/graphics/hobbits/default.nix
blob: 477c6bea249a60998e0918fff596c3beb8c046ec (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ lib, stdenv, mkDerivation, fetchFromGitHub
, cmake, pkg-config, fftw, libpcap, libusb1, python3
}:

mkDerivation rec {
  pname = "hobbits";
  version = "0.52.0";

  src = fetchFromGitHub {
    owner = "Mahlet-Inc";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-GZHBkBRt1ySItV+h5rdvey7KwdUWh5+rgztXh6HW3Js=";
  };

  postPatch = ''
    substituteInPlace src/hobbits-core/settingsdata.cpp \
      --replace "pythonHome = \"/usr\"" "pythonHome = \"${python3}\""
    substituteInPlace cmake/gitversion.cmake \
      --replace "[Mystery Build]" "${version}"
  '';

  buildInputs = [ fftw libpcap libusb1 python3 ];

  nativeBuildInputs = [ cmake pkg-config ];

  meta = with lib; {
    description = "A 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;
  };
}