about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/urjtag/default.nix
blob: 4630ec31ebbae2e51c30b04d1839c3f8873c7d55 (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{ lib
, stdenv
, fetchurl
, autoconf
, automake
, autoreconfHook
, gettext
, libftdi1
, libtool
, libusb-compat-0_1
, makeWrapper
, pkg-config
, readline
, which
, bsdlSupport ? true
, jedecSupport ? true
, staplSupport ? true
, svfSupport ? true
}:

stdenv.mkDerivation rec {
  pname = "urjtag";
  version = "2021.03";

  src = fetchurl {
    url = "mirror://sourceforge/project/${pname}/${pname}/${version}/${pname}-${version}.tar.xz";
    hash = "sha256-sKLqokVROvCW3E13AQmDIzXGlMbBKqXpL++uhoVBbxw=";
  };

  nativeBuildInputs = [
    autoreconfHook
    pkg-config
    which
    gettext
  ];
  buildInputs = [
    libftdi1
    libtool
    libusb-compat-0_1
    readline
  ];

  configureFlags = [
    (lib.enableFeature bsdlSupport  "bsdl")
    (lib.enableFeature jedecSupport "jedec-exp")
    (lib.enableFeature staplSupport "stapl")
    (lib.enableFeature svfSupport   "svf")
  ];

  meta = with lib; {
    homepage = "http://urjtag.org/";
    description = "Universal JTAG library, server and tools";
    license = with licenses; [ gpl2Plus lgpl21Plus ];
    maintainers = with maintainers; [ AndersonTorres ];
    platforms = platforms.linux;
  };
}