summaryrefslogtreecommitdiff
path: root/pkgs/by-name/he/heroic/package.nix
blob: 6ffb8e0fc6c77ca8001ee87d8433f3bca8f19595 (about) (plain)
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
{
  buildFHSEnv,
  heroic-unwrapped,
  extraPkgs ? pkgs: [ ],
  extraLibraries ? pkgs: [ ],
}:

buildFHSEnv {
  pname = "heroic";
  inherit (heroic-unwrapped) version;

  runScript = "heroic";

  # Many Wine and native games need 32-bit libraries.
  multiArch = true;

  # required by Electron
  unshareIpc = false;

  targetPkgs =
    pkgs:
    with pkgs;
    [
      heroic-unwrapped
      gamemode
      curl
      gawk
      zenity
      kdePackages.kdialog
      mangohud
      nettools
      opencl-headers
      p7zip
      pciutils
      perl
      psmisc
      python3
      umu-launcher
      unzip
      which
      xorg.xrandr
      zstd
    ]
    ++ extraPkgs pkgs;

  multiPkgs =
    let
      xorgDeps =
        pkgs: with pkgs.xorg; [
          libICE
          libpthreadstubs
          libSM
          libX11
          libXaw
          libxcb
          libXcomposite
          libXcursor
          libXdmcp
          libXext
          libXfixes
          libXi
          libXinerama
          libXmu
          libXrandr
          libXrender
          libXScrnSaver
          libXt
          libXtst
          libXv
          libXxf86vm
        ];
      gstreamerDeps =
        pkgs: with pkgs.gst_all_1; [
          gstreamer
          gst-plugins-base
          gst-plugins-good
          gst-plugins-ugly
          gst-plugins-bad
          gst-libav
        ];
    in
    pkgs:
    with pkgs;
    [
      alsa-lib
      alsa-plugins
      bash
      cabextract
      cairo
      coreutils
      cups
      dbus
      freealut
      freetype
      fribidi
      giflib
      glib
      gnutls
      gtk3
      icu
      lcms2
      libevdev
      libgcrypt
      libGLU
      libglvnd
      libgpg-error
      libgudev
      libjpeg
      libkrb5
      libmpeg2
      libogg
      libopus
      libpng
      libpulseaudio
      libselinux
      libsndfile
      libsoup_2_4
      libtheora
      libtiff
      libunwind
      libusb1
      libv4l
      libva
      libvdpau
      libvorbis
      libvpx
      libwebp
      libxkbcommon
      libxml2
      mpg123
      ncurses
      ocl-icd
      openal
      openldap
      openssl
      pango
      pipewire
      samba4
      sane-backends
      SDL2
      speex
      sqlite
      udev
      unixODBC
      util-linux
      vulkan-loader
      wayland
      zlib
    ]
    ++ xorgDeps pkgs
    ++ gstreamerDeps pkgs
    ++ extraLibraries pkgs;

  extraInstallCommands = ''
    mkdir -p $out/share
    ln -s ${heroic-unwrapped}/share/applications $out/share
    ln -s ${heroic-unwrapped}/share/icons $out/share
  '';

  meta = heroic-unwrapped.meta;
}