about summary refs log tree commit diff
path: root/pkgs/games/heroic/fhsenv.nix
blob: d3625ad129b652fd5ac2f7de1253ce48b86d0a32 (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
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
{ lib
, buildFHSUserEnv
, heroic-unwrapped
, extraPkgs ? pkgs: [ ]
, extraLibraries ? pkgs: [ ]
}:

buildFHSUserEnv {
  name = "heroic";

  runScript = "heroic";

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

  multiPkgs = let
    xorgDeps = pkgs: with pkgs.xorg; [
      libpthreadstubs
      libSM
      libX11
      libXaw
      libxcb
      libXcomposite
      libXcursor
      libXdmcp
      libXext
      libXi
      libXinerama
      libXmu
      libXrandr
      libXrender
      libXv
      libXxf86vm
    ];
  in pkgs: with pkgs; [
    alsa-lib
    alsa-plugins
    bash
    cabextract
    cairo
    coreutils
    cups
    dbus
    freealut
    freetype
    fribidi
    giflib
    glib
    gnutls
    gst_all_1.gst-plugins-base
    gtk3
    lcms2
    libevdev
    libgcrypt
    libGLU
    libglvnd
    libgpg-error
    libjpeg
    libkrb5
    libmpeg2
    libogg
    libopus
    libpng
    libpulseaudio
    libselinux
    libsndfile
    libsndfile
    libtheora
    libtiff
    libusb1
    libv4l
    libva
    libvorbis
    libxkbcommon
    libxml2
    mpg123
    ncurses
    ocl-icd
    openldap
    pipewire
    samba4
    sane-backends
    SDL2
    sqlite
    udev
    udev
    unixODBC
    util-linux
    v4l-utils
    vulkan-loader
    wayland
    zlib
  ] ++ xorgDeps 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;
}