about summary refs log tree commit diff
path: root/pkgs/by-name/qc/qcm/package.nix
blob: 6e99a64e4bbac976c27b259b99bbac5fc17eac09 (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
{ lib
, stdenv
, fetchFromGitHub
, cmake
, pkg-config
, qt6
, curl
, ffmpeg
, cubeb
}:

stdenv.mkDerivation rec {
  pname = "qcm";
  version = "1.0.2";

  src = fetchFromGitHub {
    owner = "hypengw";
    repo = "Qcm";
    rev = "v${version}";
    fetchSubmodules = true;
    hash = "sha256-6QivAQqOuWIldx2Rh5nNsj0gia3AOUm6vy9aqyJ1G6k=";
  };

  patches = [ ./remove_cubeb_vendor.patch ];

  nativeBuildInputs = [
    cmake
    pkg-config
    qt6.wrapQtAppsHook
  ];

  buildInputs = [
    qt6.qtbase
    qt6.qtdeclarative
    qt6.qtwayland
    curl
    ffmpeg
    cubeb
  ] ++ cubeb.passthru.backendLibs;

  qtWrapperArgs = [
    "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath cubeb.passthru.backendLibs}"
  ];

  postInstall = ''
    rm -r $out/{include,lib/cmake}
  '';

  meta = with lib; {
    description = "An unofficial Qt client for netease cloud music";
    homepage = "https://github.com/hypengw/Qcm";
    license = licenses.gpl2Plus;
    mainProgram = "Qcm";
    maintainers = with maintainers; [ aleksana ];
    platforms = platforms.linux;
  };
}