Merge pull request #329823 from ExpidusOS/fix/pkgsllvm/elfutils
[NixPkgs.git] / pkgs / by-name / wi / wiliwili / package.nix
blob302b47b65b4e5c627a290032ce97fb2b929f59ef
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   cmake,
6   pkg-config,
7   wayland-scanner,
8   mpv-unwrapped,
9   openssl,
10   curl,
11   libxkbcommon,
12   dbus,
13   libffi,
14   wayland,
15   egl-wayland,
16   xorg,
19 stdenv.mkDerivation (finalAttrs: {
20   pname = "wiliwili";
21   version = "1.4.1";
23   src = fetchFromGitHub {
24     owner = "xfangfang";
25     repo = "wiliwili";
26     rev = "v${finalAttrs.version}";
27     fetchSubmodules = true;
28     hash = "sha256-Fl8YV7yBW9dmcpcHCDVvkAzICTopNb4zKziDkR6NEwU=";
29   };
31   nativeBuildInputs = [
32     cmake
33     pkg-config
34   ] ++ lib.optionals stdenv.isLinux [
35     wayland-scanner
36   ];
38   buildInputs = [
39     mpv-unwrapped
40     openssl
41     curl
42     libxkbcommon
43     dbus
44   ] ++ lib.optionals stdenv.isLinux [
45     libffi # needed for wayland
46     wayland
47     egl-wayland
48     xorg.libX11
49     xorg.libXrandr
50     xorg.libXinerama
51     xorg.libXcursor
52     xorg.libXi
53   ];
55   cmakeFlags = [
56     (lib.cmakeBool "PLATFORM_DESKTOP" true)
57     (lib.cmakeBool "INSTALL" true)
58     (lib.cmakeBool "GLFW_BUILD_WAYLAND" stdenv.isLinux)
59     (lib.cmakeBool "GLFW_BUILD_X11" stdenv.isLinux)
60     # Otherwise cpr cmake will try to download zlib
61     (lib.cmakeBool "CPR_FORCE_USE_SYSTEM_CURL" true)
62   ];
64   meta = {
65     description = "Third-party Bilibili client with a switch-like UI";
66     homepage = "https://xfangfang.github.io/wiliwili";
67     # https://github.com/xfangfang/wiliwili/discussions/355
68     license = lib.licenses.gpl3Only;
69     mainProgram = "wiliwili";
70     maintainers = with lib.maintainers; [ aleksana ];
71     platforms = with lib.platforms; unix ++ windows;
72     # Testing on darwin was blocked due to broken swift
73     # buildInputs should still need some tweaking, but can't be sure
74     badPlatforms = lib.platforms.darwin;
75   };