1{ fetchFromGitLab, lib, stdenv
2, autoreconfHook, pkg-config
3, libusb1
4}:
5
6stdenv.mkDerivation rec {
7 pname = "libjaylink";
8 version = "0.3.1";
9
10 src = fetchFromGitLab {
11 domain = "gitlab.zapb.de";
12 owner = "libjaylink";
13 repo = "libjaylink";
14 rev = version;
15 sha256 = "sha256-odJDE1A0WZ9vBXPxaUdthjTgmbmbdHjbyY1PkaM4+vI=";
16 };
17
18 nativeBuildInputs = [ autoreconfHook pkg-config ];
19 buildInputs = [ libusb1 ];
20
21 postPatch = ''
22 patchShebangs autogen.sh
23 '';
24
25 postInstall = ''
26 install -Dm644 contrib/99-libjaylink.rules $out/lib/udev/rules.d/libjaylink.rules
27 '';
28
29 meta = with lib; {
30 homepage = "https://gitlab.zapb.de/libjaylink/libjaylink";
31 description = "libjaylink is a shared library written in C to access SEGGER J-Link and compatible devices.";
32 license = licenses.gpl2Plus;
33 maintainers = with maintainers; [ felixsinger ];
34 platforms = platforms.unix;
35 };
36}