Unverified Commit e1aa07fd authored by Bobby Rong's avatar Bobby Rong Committed by GitHub
Browse files

Merge pull request #185504 from NickCao/netease

netease-cloud-music-gtk: 1.2.2 -> 2.0.1
parents 762b0033 272ac286
Loading
Loading
Loading
Loading
+877 −733

File changed.

Preview size limit exceeded, changes collapsed.

+48 −30
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, meson
, ninja
, pkg-config
, glib
, gtk3
, curl
, dbus
, gtk4
, appstream-glib
, desktop-file-utils
, libxml2
, wrapGAppsHook4
, openssl
, dbus
, libadwaita
, gst_all_1
, pkg-config
, rustPlatform
, wrapGAppsHook
, fetchurl
, fetchFromGitHub
, Foundation
, SystemConfiguration
}:
rustPlatform.buildRustPackage rec {

stdenv.mkDerivation rec {
  pname = "netease-cloud-music-gtk";
  version = "1.2.2";
  version = "2.0.1";

  src = fetchFromGitHub {
    owner = "gmg137";
    repo = "netease-cloud-music-gtk";
    repo = pname;
    rev = version;
    sha256 = "sha256-42MaylfG5LY+TiYHWQMoh9CiVLShKXSBpMrxdWhujow=";
    hash = "sha256-dlJZvmfw9+cavAysxVzCekgPdygg5zbU3ZR5BOjPk08=";
  };

  patches = [ ./cargo-lock.patch ];

  cargoDeps = rustPlatform.fetchCargoTarball {
    inherit src patches;
    hash = "sha256-mJyjWEBsLhHwJCeZyRdby/K/jse0F9UBwfQxkNtZito=";
  };
  cargoSha256 = "sha256-A9wIcESdaJwLY4g/QlOxMU5PBB9wjvIzaXBSqeiRJBM=";
  cargoPatches = [ ./cargo-lock.patch ];

  nativeBuildInputs = [
    glib
    gtk3
    dbus
    meson
    ninja
    pkg-config
    wrapGAppsHook
  ];
    glib # glib-compile-resources
    gtk4 # gtk4-update-icon-cache
    appstream-glib # appstream-util
    desktop-file-utils # update-desktop-database
    libxml2 # xmllint
    wrapGAppsHook4
  ] ++ (with rustPlatform; [
    cargoSetupHook
    rust.cargo
    rust.rustc
  ]);

  buildInputs = [
    glib
    gtk3
    curl
    dbus
    openssl
    dbus
    libadwaita
  ] ++ (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
  '';
  ]) ++ lib.optionals stdenv.isDarwin [
    Foundation
    SystemConfiguration
  ];

  meta = with lib; {
    description = "netease-cloud-music-gtk is a Rust + GTK based netease cloud music player";
    description = "A Rust + GTK based netease cloud music player";
    homepage = "https://github.com/gmg137/netease-cloud-music-gtk";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ diffumist ];
    mainProgram = "netease-cloud-music-gtk4";
  };
}
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@
set -eu -vx

here=$PWD
version=$(cat default.nix | rg '^  version = "' | cut -d '"' -f 2)
version=$(rg '^  version = "' default.nix | cut -d '"' -f 2)
checkout=$(mktemp -d)

git clone -b "$version" --depth=1 https://github.com/gmg137/netease-cloud-music-gtk "$checkout"
+3 −1
Original line number Diff line number Diff line
@@ -25399,7 +25399,9 @@ with pkgs;
  netease-music-tui = callPackage ../applications/audio/netease-music-tui { };
  netease-cloud-music-gtk = callPackage ../applications/audio/netease-cloud-music-gtk { };
  netease-cloud-music-gtk = callPackage ../applications/audio/netease-cloud-music-gtk {
    inherit (darwin.apple_sdk.frameworks) Foundation SystemConfiguration;
  };
  nordic = callPackage ../data/themes/nordic { };