summary refs log tree commit diff
path: root/pkgs/applications/audio/shortwave/default.nix
blob: 055694fb40f5b79b971620296c60f739fc70e0fa (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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
{ stdenv
, fetchFromGitLab
, cargo
, dbus
, desktop-file-utils
, gdk-pixbuf
, gettext
, glib
, gst_all_1
, gtk3
, libhandy
, meson
, ninja
, openssl
, pkg-config
, python3
, rust
, rustc
, rustPlatform
, sqlite
, wrapGAppsHook
}:

rustPlatform.buildRustPackage rec {
  pname = "shortwave";
  version = "1.1.1";

  src = fetchFromGitLab {
    domain = "gitlab.gnome.org";
    owner = "World";
    repo = "Shortwave";
    rev = version;
    sha256 = "1vlhp2ss06j41simjrrjg38alp85jddhqyvccy6bhfzm0gzynwld";
  };

  cargoSha256 = "181699rlpr5dszc18wg0kbss3gfskxaz9lpxpgsc4yfb6ip89qnk";

  nativeBuildInputs = [
    cargo
    desktop-file-utils
    gettext
    glib # for glib-compile-schemas
    meson
    ninja
    pkg-config
    python3
    rustc
    wrapGAppsHook
  ];

  buildInputs = [
    dbus
    gdk-pixbuf
    glib
    gtk3
    libhandy
    openssl
    sqlite
  ] ++ (with gst_all_1; [
    gstreamer
    gst-plugins-base
    gst-plugins-good
    gst-plugins-bad
  ]);

  # Don't use buildRustPackage phases, only use it for rust deps setup
  configurePhase = null;
  buildPhase = null;
  checkPhase = null;
  installPhase = null;

  postPatch = ''
    patchShebangs build-aux/meson/postinstall.py
  '';

  meta = with stdenv.lib; {
    homepage = "https://gitlab.gnome.org/World/Shortwave";
    description = "Find and listen to internet radio stations";
    longDescription = ''
      Shortwave is a streaming audio player designed for the GNOME
      desktop. It is the successor to the older Gradio application.
    '';
    maintainers = with maintainers; [ lasandell ];
    license = licenses.gpl3Plus;
    platforms = platforms.linux;
  };
}