nixpkgs-suyu/pkgs/applications/misc/bottles/default.nix

93 lines
2.1 KiB
Nix

{ lib, fetchFromGitHub
, 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, gnome
, steam-run, xdg-utils, pciutils, cabextract, wineWowPackages
, freetype, p7zip, gamemode
}:
python3Packages.buildPythonApplication rec {
pname = "bottles";
version = "2021.12.28-treviso";
src = fetchFromGitHub {
owner = "bottlesdevs";
repo = pname;
rev = version;
sha256 = "lZbSLLBg7XM6PuOmu5rJ15dg+QHHRcjijRYE6u3WT9Y=";
};
postPatch = ''
chmod +x build-aux/meson/postinstall.py
patchShebangs build-aux/meson/postinstall.py
'';
nativeBuildInputs = [
meson
ninja
pkg-config
wrapGAppsHook
gettext
appstream-glib
desktop-file-utils
];
buildInputs = [
gdk-pixbuf
glib
gobject-introspection
gsettings-desktop-schemas
gspell
gtk3
libhandy
libnotify
webkitgtk
gnome.adwaita-icon-theme
];
propagatedBuildInputs = with python3Packages; [
pyyaml
pytoml
requests
pycairo
pygobject3
lxml
dbus-python
gst-python
liblarch
patool
markdown
] ++ [
steam-run
xdg-utils
pciutils
cabextract
wineWowPackages.minimal
freetype
p7zip
gamemode # programs.gamemode.enable
];
format = "other";
strictDeps = false; # broken with gobject-introspection setup hook, see https://github.com/NixOS/nixpkgs/issues/56943
dontWrapGApps = true; # prevent double wrapping
preConfigure = ''
patchShebangs build-aux/meson/postinstall.py
substituteInPlace src/backend/runner.py \
--replace "{Paths.runners}" "${steam-run}/bin/steam-run {Paths.runners}"
'';
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
meta = with lib; {
description = "An easy-to-use wineprefix manager";
homepage = "https://usebottles.com/";
license = licenses.gpl3Only;
maintainers = with maintainers; [ bloomvdomino shamilton ];
platforms = platforms.linux;
};
}