about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libjaylink/default.nix
blob: 5d461940dcea900583ddcbbced08b9a9c5d17d93 (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
35
36
{ fetchFromGitLab, lib, stdenv
, autoreconfHook, pkg-config
, libusb1
}:

stdenv.mkDerivation rec {
  pname = "libjaylink";
  version = "0.3.1";

  src = fetchFromGitLab {
    domain = "gitlab.zapb.de";
    owner = "libjaylink";
    repo = "libjaylink";
    rev = version;
    sha256 = "sha256-odJDE1A0WZ9vBXPxaUdthjTgmbmbdHjbyY1PkaM4+vI=";
  };

  nativeBuildInputs = [ autoreconfHook pkg-config ];
  buildInputs = [ libusb1 ];

  postPatch = ''
    patchShebangs autogen.sh
  '';

  postInstall = ''
    install -Dm644 contrib/99-libjaylink.rules $out/lib/udev/rules.d/libjaylink.rules
  '';

  meta = with lib; {
    homepage = "https://gitlab.zapb.de/libjaylink/libjaylink";
    description = "libjaylink is a shared library written in C to access SEGGER J-Link and compatible devices.";
    license = licenses.gpl2Plus;
    maintainers = with maintainers; [ felixsinger ];
    platforms = platforms.unix;
  };
}