about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/misc/siglo/default.nix
blob: 520f4330e503720a017ed89dc536980351ba8bee (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
60
61
62
63
64
65
66
67
68
69
70
{ stdenv
, lib
, fetchFromGitHub
, glib
, meson
, ninja
, wrapGAppsHook
, desktop-file-utils
, gobject-introspection
, gtk3
, python3
}:

stdenv.mkDerivation rec {
  pname = "siglo";
  version = "0.9.9";

  src = fetchFromGitHub {
    owner = "theironrobin";
    repo = "siglo";
    rev = "v${version}";
    hash = "sha256-4jKsRpzuyHH31LXndC3Ua4TYcI0G0v9qqe0cbvLuCDA=";
  };

  patches = [
    ./siglo-no-user-install.patch
  ];

  postPatch = ''
    chmod +x build-aux/meson/postinstall.py # patchShebangs requires an executable file
    patchShebangs build-aux/meson/postinstall.py
  '';

  nativeBuildInputs = [
    glib
    meson
    ninja
    wrapGAppsHook
    python3.pkgs.wrapPython
    python3
    desktop-file-utils
    gtk3
    gobject-introspection
  ];

  buildInputs = [
    gtk3
    python3.pkgs.gatt
  ];

  pythonPath = with python3.pkgs; [
    gatt
    pybluez
    requests
  ];

  preFixup = ''
    buildPythonPath "$out $pythonPath"
    gappsWrapperArgs+=(--prefix PYTHONPATH : "$program_PYTHONPATH")
  '';

  meta = with lib; {
    description = "GTK app to sync InfiniTime watch with PinePhone";
    homepage = "https://github.com/theironrobin/siglo";
    changelog = "https://github.com/theironrobin/siglo/tags/v${version}";
    license = licenses.mpl20;
    maintainers = with maintainers; [ ];
    platforms = platforms.linux;
  };
}