about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/audio/netease-cloud-music-gtk/default.nix
blob: 72027fe922b8dafecb4fea9e9b965c43232eb7fe (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
{ lib
, stdenv
, glib
, gtk3
, curl
, dbus
, openssl
, gst_all_1
, pkg-config
, rustPlatform
, wrapGAppsHook
, fetchurl
, fetchFromGitHub
}:
rustPlatform.buildRustPackage rec {
  pname = "netease-cloud-music-gtk";
  version = "1.2.2";
  src = fetchFromGitHub {
    owner = "gmg137";
    repo = "netease-cloud-music-gtk";
    rev = version;
    sha256 = "sha256-42MaylfG5LY+TiYHWQMoh9CiVLShKXSBpMrxdWhujow=";
  };
  cargoSha256 = "sha256-A9wIcESdaJwLY4g/QlOxMU5PBB9wjvIzaXBSqeiRJBM=";
  cargoPatches = [ ./cargo-lock.patch ];

  nativeBuildInputs = [
    glib
    gtk3
    dbus
    pkg-config
    wrapGAppsHook
  ];

  buildInputs = [
    glib
    gtk3
    curl
    dbus
    openssl
  ] ++ (with gst_all_1; [
    gstreamer
    gst-plugins-base
    gst-plugins-good
    gst-plugins-bad
    gst-plugins-ugly
  ]);

  postPatch = ''
    install -D netease-cloud-music-gtk.desktop $out/share/applications/netease-cloud-music-gtk.desktop
    install -D icons/netease-cloud-music-gtk.svg $out/share/icons/hicolor/scalable/apps/netease-cloud-music-gtk.svg
  '';

  meta = with lib; {
    description = "netease-cloud-music-gtk is a Rust + GTK based netease cloud music player";
    homepage = "https://github.com/gmg137/netease-cloud-music-gtk";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ diffumist ];
  };
}