about summary refs log tree commit diff
path: root/pkgs/applications/science/electronics/kingstvis/default.nix
blob: 3699aebbbff0e3286cbcb3786326c73491f7f239 (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
58
59
{ buildFHSEnv
, dbus
, fetchzip
, fontconfig
, freetype
, glib
, lib
, libGL
, stdenv
, xkeyboard_config
, xorg
, zlib
}:

let
  name = "kingstvis";
  version = "3.6.1";
  src = fetchzip {
    url = "http://res.kingst.site/kfs/KingstVIS_v${version}.tar.gz";
    hash = "sha256-eZJ3RZWdmNx/El3Hh5kUf44pIwdvwOEkRysYBgUkS18=";
  };
in

buildFHSEnv {
  inherit name;

  targetPkgs = pkgs: (with pkgs; [
    dbus
    fontconfig
    freetype
    glib
    libGL
    xkeyboard_config
    xorg.libICE
    xorg.libSM
    xorg.libX11
    xorg.libXext
    xorg.libXi
    xorg.libXrender
    xorg.libxcb
    zlib
  ]);

  extraInstallCommands = ''
    install -Dvm644 ${src}/Driver/99-Kingst.rules \
      $out/lib/udev/rules.d/99-Kingst.rules
  '';

  runScript = "${src}/KingstVIS";

  meta = {
    description = "Kingst Virtual Instruments Studio, software for logic analyzers";
    homepage = "http://www.qdkingst.com/";
    sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
    license = lib.licenses.unfree;
    maintainers = [ lib.maintainers.luisdaranda ];
    platforms = [ "x86_64-linux" ];
  };
}