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

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

117 lines
2.9 KiB
Nix
Raw Normal View History

2021-02-20 20:07:22 +00:00
{ lib, fetchFromGitHub
, meson, ninja, pkg-config, wrapGAppsHook
, desktop-file-utils, gsettings-desktop-schemas, libnotify, libhandy, webkitgtk
2021-02-20 20:07:22 +00:00
, python3Packages, gettext
, appstream-glib, gdk-pixbuf, glib, gobject-introspection, gspell, gtk3, gtksourceview4, gnome
, steam, xdg-utils, pciutils, cabextract, wineWowPackages
, freetype, p7zip, gamemode, mangohud
, bottlesExtraLibraries ? pkgs: [ ] # extra packages to add to steam.run multiPkgs
, bottlesExtraPkgs ? pkgs: [ ] # extra packages to add to steam.run targetPkgs
2021-02-20 20:07:22 +00:00
}:
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
2021-02-20 20:07:22 +00:00
python3Packages.buildPythonApplication rec {
pname = "bottles";
version = "2022.4.14-trento";
sha256 = "0kjc1w8x4d6g2lx8x8isa2vnwacyjlh9lldf14wn4b118hsw85zs";
2022-03-10 18:33:20 +00:00
# Note: Update via pkgs/applications/misc/bottles/update.py
# mostly copypasted from pkgs/applications/networking/instant-messengers/telegram/tdesktop/update.py
2021-02-20 20:07:22 +00:00
src = fetchFromGitHub {
owner = "bottlesdevs";
repo = pname;
rev = version;
inherit sha256;
2021-02-20 20:07:22 +00:00
};
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
gtksourceview4
2021-04-26 13:26:26 +00:00
libhandy
2021-02-20 20:07:22 +00:00
libnotify
webkitgtk
gnome.adwaita-icon-theme
2021-02-20 20:07:22 +00:00
];
propagatedBuildInputs = with python3Packages; [
pyyaml
pytoml
requests
2021-02-20 20:07:22 +00:00
pycairo
pygobject3
lxml
dbus-python
gst-python
liblarch
patool
markdown
] ++ [
steam-run
xdg-utils
pciutils
cabextract
wineWowPackages.minimal
freetype
p7zip
gamemode # programs.gamemode.enable
mangohud
];
2021-02-20 20:07:22 +00:00
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/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())'
2021-02-20 20:07:22 +00:00
'';
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
2022-03-10 18:33:20 +00:00
passthru = {
updateScript = ./update.py;
};
2021-02-20 20:07:22 +00:00
meta = with lib; {
description = "An easy-to-use wineprefix manager";
2021-04-26 13:26:26 +00:00
homepage = "https://usebottles.com/";
downloadPage = "https://github.com/bottlesdevs/Bottles/releases";
2021-02-20 20:07:22 +00:00
license = licenses.gpl3Only;
maintainers = with maintainers; [ bloomvdomino psydvl shamilton ];
2021-02-20 20:07:22 +00:00
platforms = platforms.linux;
};
}