summary refs log tree commit diff
path: root/pkgs/applications/networking/transporter/default.nix
blob: 141c40f3b84e54e7048172d049e82588f7b1a6f8 (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
71
{ stdenv
, fetchFromGitHub
, meson
, ninja
, pkgconfig
, granite
, vala_0_40
, gnome3
, libxml2
, gettext
, gobjectIntrospection
, appstream-glib
, desktop-file-utils
, magic-wormhole
, wrapGAppsHook }:

let
  pname = "Transporter";
  version = "1.3.3";
in stdenv.mkDerivation rec {
  name = "${pname}-${version}";

  src = fetchFromGitHub {
    owner = "bleakgrey";
    repo = pname;
    rev = version;
    sha256 = "19zb2yqmyyhk5vgh6p278b76shlq0r8ykk1ks8zzr187nr5lf5k1";
  };

  nativeBuildInputs = [
    appstream-glib
    desktop-file-utils
    gettext
    gobjectIntrospection # For setup hook
    libxml2
    meson
    ninja
    pkgconfig
    vala_0_40
    wrapGAppsHook
  ];

  buildInputs = with gnome3; [
    defaultIconTheme # If I omit this there's no icons in KDE
    glib
    granite
    gsettings_desktop_schemas
    gtk3
    libgee
    magic-wormhole
  ];

  prePatch = ''
  # The paths were hardcoded
  substituteInPlace ./src/WormholeInterface.vala \
    --replace /bin/wormhole ${magic-wormhole}/bin/wormhole
  '';
  
  postPatch = ''
    chmod +x ./meson/post_install.py
    patchShebangs ./meson/post_install.py
  '';

  meta = with stdenv.lib; {
    description = "Simple magic-wormhole client";
    homepage    = https://github.com/bleakgrey/Transporter;
    license     = licenses.gpl3;
    maintainers = with maintainers; [ worldofpeace ];
    platforms = platforms.linux;
  };
}