2
0
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-12 16:53:21 +00:00
nixpkgs/pkgs/applications/misc/bottles/fhsenv.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

113 lines
2.3 KiB
Nix
Raw Normal View History

2022-11-22 13:59:09 +00:00
{ lib
, buildFHSUserEnvBubblewrap
, symlinkJoin
, bottles-unwrapped
, gst_all_1
2022-11-22 13:59:09 +00:00
, extraPkgs ? pkgs: [ ]
, extraLibraries ? pkgs: [ ]
}:
let fhsEnv = {
targetPkgs = pkgs: with pkgs; [
bottles-unwrapped
# This only allows to enable the toggle, vkBasalt won't work if not installed with environment.systemPackages (or nix-env)
# See https://github.com/bottlesdevs/Bottles/issues/2401
2022-11-22 13:59:09 +00:00
vkbasalt
] ++ 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; [
# https://wiki.winehq.org/Building_Wine
alsa-lib
cups
dbus
fontconfig
freetype
glib
gnutls
libglvnd
gsm
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
gst_all_1.gst-plugins-ugly
gst_all_1.gst-plugins-bad
2023-01-16 09:55:04 +00:00
gst_all_1.gst-libav
2022-11-22 13:59:09 +00:00
libgphoto2
libjpeg_turbo
libkrb5
libpcap
libpng
libpulseaudio
libtiff
libunwind
libusb1
libv4l
libxml2
mpg123
ocl-icd
openldap
samba4
sane-backends
SDL2
udev
vulkan-loader
# https://www.gloriouseggroll.tv/how-to-get-out-of-wine-dependency-hell/
alsa-plugins
dosbox
giflib
gtk3
libva
libxslt
ncurses
openal
# Steam runtime
libgcrypt
libgpg-error
p11-kit
zlib # Freetype
] ++ xorgDeps pkgs
++ extraLibraries pkgs;
profile = ''
2023-01-16 09:55:04 +00:00
export GST_PLUGIN_PATH=/usr/lib32/gstreamer-1.0:/usr/lib64/gstreamer-1.0
'';
2022-11-22 13:59:09 +00:00
};
in
symlinkJoin {
name = "bottles";
paths = [
(buildFHSUserEnvBubblewrap (fhsEnv // { name = "bottles"; runScript = "bottles"; }))
(buildFHSUserEnvBubblewrap (fhsEnv // { name = "bottles-cli"; runScript = "bottles-cli"; }))
];
postBuild = ''
mkdir -p $out/share
ln -s ${bottles-unwrapped}/share/applications $out/share
ln -s ${bottles-unwrapped}/share/icons $out/share
'';
inherit (bottles-unwrapped) meta;
}