From d1a4e0784baa88c326e54183a53ec0a1bae91d8d Mon Sep 17 00:00:00 2001 From: Martino Fontana Date: Thu, 6 Oct 2022 20:14:13 +0200 Subject: [PATCH 1/4] bottles: don't include system wine by default --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index dc456b3848e5..a99f41dc903b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -27405,7 +27405,7 @@ with pkgs; bonzomatic = callPackage ../applications/editors/bonzomatic { }; bottles = callPackage ../applications/misc/bottles { - wine = wineWowPackages.minimal; + wine = null; }; brave = callPackage ../applications/networking/browsers/brave { }; From 7aa3e528bfce93c52986dca931be962532d5c985 Mon Sep 17 00:00:00 2001 From: "Bryan A. S" Date: Sat, 30 Jul 2022 23:32:16 -0300 Subject: [PATCH 2/4] icoextract: init at 0.1.4 for use with bottles --- .../python-modules/icoextract/default.nix | 31 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/development/python-modules/icoextract/default.nix diff --git a/pkgs/development/python-modules/icoextract/default.nix b/pkgs/development/python-modules/icoextract/default.nix new file mode 100644 index 000000000000..8aa38c1d96ef --- /dev/null +++ b/pkgs/development/python-modules/icoextract/default.nix @@ -0,0 +1,31 @@ +{ lib, buildPythonPackage, fetchPypi, pefile, pillow}: + +buildPythonPackage rec { + pname = "icoextract"; + version = "0.1.4"; + + src = fetchPypi { + inherit pname version; + extension = "tar.gz"; + sha256 = "sha256-x0GEV0PUbkAzoUJgAqup9bHd7iYttGyzIZNdo8KsFyo="; + }; + + propagatedBuildInputs = [ + pefile + pillow + ]; + + # tests expect mingw and multiarch + doCheck = false; + + pythonImportsCheck = [ + "icoextract" + ]; + + meta = with lib; { + description = "Extract icons from Windows PE files"; + homepage = "https://github.com/jlu5/icoextract"; + license = licenses.mit; + maintainers = with maintainers; [ bryanasdev000 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c4714ffe9a52..9017298b8ecc 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4369,6 +4369,8 @@ self: super: with self; { idasen = callPackage ../development/python-modules/idasen { }; + icoextract = callPackage ../development/python-modules/icoextract { }; + icontract = callPackage ../development/python-modules/icontract { }; identify = callPackage ../development/python-modules/identify { }; From 6b802f913f6bf12ec526f5d2ab33fc88bf4abfa5 Mon Sep 17 00:00:00 2001 From: "Bryan A. S" Date: Sat, 30 Jul 2022 23:34:45 -0300 Subject: [PATCH 3/4] fvs: init at 0.3.4 for use with bottles --- .../python-modules/fvs/default.nix | 31 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/development/python-modules/fvs/default.nix diff --git a/pkgs/development/python-modules/fvs/default.nix b/pkgs/development/python-modules/fvs/default.nix new file mode 100644 index 000000000000..c60f3a1255af --- /dev/null +++ b/pkgs/development/python-modules/fvs/default.nix @@ -0,0 +1,31 @@ +{ lib, buildPythonPackage, fetchPypi, orjson}: + +buildPythonPackage rec { + pname = "fvs"; + version = "0.3.4"; + + src = fetchPypi { + inherit version; + pname = "FVS"; + extension = "tar.gz"; + sha256 = "sha256-yYd0HzdwbqB9kexJjBRRYmdsoWtZtcjCNRz0ZJVM5CI="; + }; + + propagatedBuildInputs = [ + orjson + ]; + + # no tests in src + doCheck = false; + + pythonImportsCheck = [ + "fvs" + ]; + + meta = with lib; { + description = "File Versioning System with hash comparison and data storage to create unlinked states that can be deleted"; + homepage = "https://github.com/mirkobrombin/FVS"; + license = licenses.mit; + maintainers = with maintainers; [ bryanasdev000 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9017298b8ecc..044e58dcd9a2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3534,6 +3534,8 @@ self: super: with self; { fuzzywuzzy = callPackage ../development/python-modules/fuzzywuzzy { }; + fvs = callPackage ../development/python-modules/fvs { }; + fx2 = callPackage ../development/python-modules/fx2 { }; galario = toPythonModule (pkgs.galario.override { From d155128b531a9b3a7a5dd1fe435f426071a2a7b7 Mon Sep 17 00:00:00 2001 From: Martino Fontana Date: Wed, 19 Oct 2022 23:23:15 +0200 Subject: [PATCH 4/4] bottles: 2022.5.28-trento-3 -> 2022.10.14.1 --- pkgs/applications/misc/bottles/default.nix | 98 +++++++++++-------- .../misc/bottles/vulkan_icd.patch | 13 +++ 2 files changed, 72 insertions(+), 39 deletions(-) create mode 100644 pkgs/applications/misc/bottles/vulkan_icd.patch diff --git a/pkgs/applications/misc/bottles/default.nix b/pkgs/applications/misc/bottles/default.nix index e5d846606a71..3ac928a3d36f 100644 --- a/pkgs/applications/misc/bottles/default.nix +++ b/pkgs/applications/misc/bottles/default.nix @@ -1,10 +1,28 @@ -{ lib, fetchFromGitHub, gitUpdater -, meson, ninja, pkg-config, wrapGAppsHook -, desktop-file-utils, gsettings-desktop-schemas, libnotify, libhandy, webkitgtk -, python3Packages, gettext -, appstream-glib, gdk-pixbuf, glib, gobject-introspection, gspell, gtk3, gtksourceview4, gnome -, steam, xdg-utils, pciutils, cabextract -, freetype, p7zip, gamemode, mangohud +{ lib +, fetchFromGitHub +, fetchFromGitLab +, gitUpdater +, python3Packages +, blueprint-compiler +, meson +, ninja +, pkg-config +, wrapGAppsHook4 +, appstream-glib +, desktop-file-utils +, librsvg +, gtk4 +, gtksourceview5 +, libadwaita +, steam +, cabextract +, p7zip +, xdpyinfo +, imagemagick +, procps +, gamescope +, mangohud +, vmtouch , wine , bottlesExtraLibraries ? pkgs: [ ] # extra packages to add to steam.run multiPkgs , bottlesExtraPkgs ? pkgs: [ ] # extra packages to add to steam.run targetPkgs @@ -21,75 +39,77 @@ let in python3Packages.buildPythonApplication rec { pname = "bottles"; - version = "2022.5.28-trento-3"; + version = "2022.10.14.1"; src = fetchFromGitHub { owner = "bottlesdevs"; repo = pname; rev = version; - sha256 = "sha256-KIDLRqDLFTsVAczRpTchnUtKJfVHqbYzf8MhIR5UdYY="; + sha256 = "sha256-FO91GSGlc2f3TSLrlmRDPi5p933/Y16tdEpX4RcKhL0="; }; + patches = [ ./vulkan_icd.patch ]; + postPatch = '' chmod +x build-aux/meson/postinstall.py patchShebangs build-aux/meson/postinstall.py - substituteInPlace src/backend/wine/winecommand.py \ + substituteInPlace bottles/backend/wine/winecommand.py \ --replace \ - 'self.__get_runner()' \ - '(lambda r: (f"${steam-run}/bin/steam-run {r}", r)[r == "wine" or r == "wine64"])(self.__get_runner())' - ''; + "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 ninja pkg-config - wrapGAppsHook - gettext + wrapGAppsHook4 + gtk4 # gtk4-update-icon-cache appstream-glib desktop-file-utils ]; buildInputs = [ - gdk-pixbuf - glib - gobject-introspection - gsettings-desktop-schemas - gspell - gtk3 - gtksourceview4 - libhandy - libnotify - webkitgtk - gnome.adwaita-icon-theme + librsvg + gtk4 + gtksourceview5 + libadwaita ]; propagatedBuildInputs = with python3Packages; [ pyyaml - pytoml requests - pycairo pygobject3 - lxml - dbus-python - gst-python - liblarch patool markdown + fvs + pefile + urllib3 + chardet + certifi + idna + pillow + orjson + icoextract ] ++ [ - steam-run - xdg-utils - pciutils cabextract - wine - freetype p7zip - gamemode # programs.gamemode.enable + xdpyinfo + imagemagick + procps + + gamescope mangohud + vmtouch + wine ]; format = "other"; - strictDeps = false; # broken with gobject-introspection setup hook, see https://github.com/NixOS/nixpkgs/issues/56943 dontWrapGApps = true; # prevent double wrapping preFixup = '' diff --git a/pkgs/applications/misc/bottles/vulkan_icd.patch b/pkgs/applications/misc/bottles/vulkan_icd.patch new file mode 100644 index 000000000000..d638917151ea --- /dev/null +++ b/pkgs/applications/misc/bottles/vulkan_icd.patch @@ -0,0 +1,13 @@ +diff --git a/bottles/backend/utils/vulkan.py b/bottles/backend/utils/vulkan.py +index 6673493..07f70d1 100644 +--- a/bottles/backend/utils/vulkan.py ++++ b/bottles/backend/utils/vulkan.py +@@ -29,6 +29,8 @@ class VulkanUtils: + "/etc/vulkan", + "/usr/local/share/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 += [