Merge pull request #202265 from SuperSamus/bottles
Fixes https://github.com/NixOS/nixpkgs/issues/203051
This commit is contained in:
commit
2dea0f4c2d
|
@ -14,55 +14,31 @@
|
|||
, gtk4
|
||||
, gtksourceview5
|
||||
, libadwaita
|
||||
, steam
|
||||
, cabextract
|
||||
, p7zip
|
||||
, xdpyinfo
|
||||
, imagemagick
|
||||
, lsb-release
|
||||
, pciutils
|
||||
, procps
|
||||
, gamescope
|
||||
, mangohud
|
||||
, vkbasalt-cli
|
||||
, vmtouch
|
||||
, wine
|
||||
, bottlesExtraLibraries ? pkgs: [ ] # extra packages to add to steam.run multiPkgs
|
||||
, bottlesExtraPkgs ? pkgs: [ ] # extra packages to add to steam.run targetPkgs
|
||||
}:
|
||||
|
||||
let
|
||||
steam-run = (steam.override {
|
||||
# required by wine runner `caffe`
|
||||
extraLibraries = pkgs: with pkgs; [ libunwind libusb1 gnutls ]
|
||||
++ bottlesExtraLibraries pkgs;
|
||||
extraPkgs = pkgs: [ ]
|
||||
++ bottlesExtraPkgs pkgs;
|
||||
}).run;
|
||||
in
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "bottles";
|
||||
version = "2022.10.14.1";
|
||||
pname = "bottles-unwrapped";
|
||||
version = "2022.11.14";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bottlesdevs";
|
||||
repo = pname;
|
||||
repo = "bottles";
|
||||
rev = version;
|
||||
sha256 = "sha256-FO91GSGlc2f3TSLrlmRDPi5p933/Y16tdEpX4RcKhL0=";
|
||||
sha256 = "sha256-bigrJtqx9iZURYojwxlGe7xSGWS13wSaGcrTTROP9J8=";
|
||||
};
|
||||
|
||||
patches = [ ./vulkan_icd.patch ];
|
||||
|
||||
postPatch = ''
|
||||
chmod +x build-aux/meson/postinstall.py
|
||||
patchShebangs build-aux/meson/postinstall.py
|
||||
|
||||
substituteInPlace bottles/backend/wine/winecommand.py \
|
||||
--replace \
|
||||
"command = f\"{runner} {command}\"" \
|
||||
"command = f\"{''' if runner == 'wine' or runner == 'wine64' else '${steam-run}/bin/steam-run '}{runner} {command}\"" \
|
||||
--replace \
|
||||
"command = f\"{_picked['entry_point']} {command}\"" \
|
||||
"command = f\"${steam-run}/bin/steam-run {_picked['entry_point']} {command}\""
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
blueprint-compiler
|
||||
meson
|
||||
|
@ -101,12 +77,16 @@ python3Packages.buildPythonApplication rec {
|
|||
p7zip
|
||||
xdpyinfo
|
||||
imagemagick
|
||||
procps
|
||||
vkbasalt-cli
|
||||
|
||||
gamescope
|
||||
mangohud
|
||||
vmtouch
|
||||
wine
|
||||
|
||||
# Undocumented (subprocess.Popen())
|
||||
lsb-release
|
||||
pciutils
|
||||
procps
|
||||
];
|
||||
|
||||
format = "other";
|
||||
|
|
101
pkgs/applications/misc/bottles/fhsenv.nix
Normal file
101
pkgs/applications/misc/bottles/fhsenv.nix
Normal file
|
@ -0,0 +1,101 @@
|
|||
{ lib
|
||||
, buildFHSUserEnvBubblewrap
|
||||
, symlinkJoin
|
||||
, bottles-unwrapped
|
||||
, extraPkgs ? pkgs: [ ]
|
||||
, extraLibraries ? pkgs: [ ]
|
||||
}:
|
||||
|
||||
let fhsEnv = {
|
||||
targetPkgs = pkgs: with pkgs; [
|
||||
bottles-unwrapped
|
||||
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
|
||||
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;
|
||||
};
|
||||
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;
|
||||
}
|
|
@ -1,13 +1,15 @@
|
|||
diff --git a/bottles/backend/utils/vulkan.py b/bottles/backend/utils/vulkan.py
|
||||
index 6673493..07f70d1 100644
|
||||
index 6673493..9191004 100644
|
||||
--- a/bottles/backend/utils/vulkan.py
|
||||
+++ b/bottles/backend/utils/vulkan.py
|
||||
@@ -29,6 +29,8 @@ class VulkanUtils:
|
||||
@@ -28,7 +28,9 @@ class VulkanUtils:
|
||||
"/usr/share/vulkan",
|
||||
"/etc/vulkan",
|
||||
"/usr/local/share/vulkan",
|
||||
"/usr/local/etc/vulkan"
|
||||
+ "/run/opengl-driver/share/vulkan/",
|
||||
+ "/run/opengl-driver-32/share/vulkan/",
|
||||
- "/usr/local/etc/vulkan"
|
||||
+ "/usr/local/etc/vulkan",
|
||||
+ "/run/opengl-driver/share/vulkan",
|
||||
+ "/run/opengl-driver-32/share/vulkan",
|
||||
]
|
||||
if "FLATPAK_ID" in os.environ:
|
||||
__vk_icd_dirs += [
|
||||
|
|
31
pkgs/tools/graphics/vkbasalt-cli/default.nix
Normal file
31
pkgs/tools/graphics/vkbasalt-cli/default.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{ lib
|
||||
, python3Packages
|
||||
, fetchFromGitLab
|
||||
, vkbasalt
|
||||
}:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "vkbasalt-cli";
|
||||
version = "3.1.1";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "TheEvilSkeleton";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-4MFqndnvwAsqyer9kMNuCZFP/Xdl7W//AyCe7n83328=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace vkbasalt/lib.py \
|
||||
--replace /usr ${vkbasalt}
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "vkbasalt.lib" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Command-line utility for vkBasalt";
|
||||
homepage = "https://gitlab.com/TheEvilSkeleton/vkbasalt-cli";
|
||||
license = with licenses; [ lgpl3Only gpl3Only ];
|
||||
maintainers = with maintainers; [ martfont ];
|
||||
};
|
||||
}
|
|
@ -8,11 +8,11 @@
|
|||
, libX11
|
||||
, spirv-headers
|
||||
, vulkan-headers
|
||||
, vkBasalt32
|
||||
, vkbasalt32
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "vkBasalt";
|
||||
pname = "vkbasalt";
|
||||
version = "0.3.2.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
|
@ -26,9 +26,10 @@ stdenv.mkDerivation rec {
|
|||
buildInputs = [ libX11 spirv-headers vulkan-headers ];
|
||||
mesonFlags = [ "-Dappend_libdir_vkbasalt=true" ];
|
||||
|
||||
# Include 32bit layer in 64bit build
|
||||
postInstall = lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") ''
|
||||
ln -s ${vkBasalt32}/share/vulkan/implicit_layer.d/vkBasalt.json \
|
||||
install -Dm 644 $src/config/vkBasalt.conf $out/share/vkBasalt/vkBasalt.conf
|
||||
# Include 32bit layer in 64bit build
|
||||
ln -s ${vkbasalt32}/share/vulkan/implicit_layer.d/vkBasalt.json \
|
||||
"$out/share/vulkan/implicit_layer.d/vkBasalt32.json"
|
||||
'';
|
||||
|
|
@ -1567,6 +1567,7 @@ mapAliases ({
|
|||
virtmanager = virt-manager; # Added 2019-10-29
|
||||
virtmanager-qt = virt-manager-qt; # Added 2019-10-29
|
||||
virtviewer = throw "'virtviewer' has been renamed to/replaced by 'virt-viewer'"; # Converted to throw 2022-02-22
|
||||
vkBasalt = vkbasalt; # Added 2022-11-22
|
||||
vnc2flv = throw "vnc2flv has been removed: abandoned by upstream"; # Added 2022-03-21
|
||||
vorbisTools = throw "'vorbisTools' has been renamed to/replaced by 'vorbis-tools'"; # Converted to throw 2022-02-22
|
||||
vtun = throw "vtune has been removed as it's unmaintained upstream"; # Added 2021-10-29
|
||||
|
|
|
@ -12652,10 +12652,12 @@ with pkgs;
|
|||
|
||||
vix = callPackage ../tools/misc/vix { };
|
||||
|
||||
vkBasalt = callPackage ../tools/graphics/vkBasalt {
|
||||
vkBasalt32 = pkgsi686Linux.vkBasalt;
|
||||
vkbasalt = callPackage ../tools/graphics/vkbasalt {
|
||||
vkbasalt32 = pkgsi686Linux.vkbasalt;
|
||||
};
|
||||
|
||||
vkbasalt-cli = callPackage ../tools/graphics/vkbasalt-cli { };
|
||||
|
||||
vkmark = callPackage ../tools/graphics/vkmark { };
|
||||
|
||||
vncrec = callPackage ../tools/video/vncrec { };
|
||||
|
@ -27750,9 +27752,9 @@ with pkgs;
|
|||
|
||||
bonzomatic = callPackage ../applications/editors/bonzomatic { };
|
||||
|
||||
bottles = callPackage ../applications/misc/bottles {
|
||||
wine = null;
|
||||
};
|
||||
bottles = callPackage ../applications/misc/bottles/fhsenv.nix { };
|
||||
|
||||
bottles-unwrapped = callPackage ../applications/misc/bottles { };
|
||||
|
||||
brave = callPackage ../applications/networking/browsers/brave { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue