2022-04-20 22:19:45 +00:00
|
|
|
{ lib, fetchFromGitHub, gitUpdater
|
2021-02-20 20:07:22 +00:00
|
|
|
, meson, ninja, pkg-config, wrapGAppsHook
|
2021-12-18 16:15:08 +00:00
|
|
|
, desktop-file-utils, gsettings-desktop-schemas, libnotify, libhandy, webkitgtk
|
2021-02-20 20:07:22 +00:00
|
|
|
, python3Packages, gettext
|
2022-01-15 15:40:50 +00:00
|
|
|
, appstream-glib, gdk-pixbuf, glib, gobject-introspection, gspell, gtk3, gtksourceview4, gnome
|
2022-07-25 17:14:09 +00:00
|
|
|
, steam, xdg-utils, pciutils, cabextract
|
2022-03-01 20:05:02 +00:00
|
|
|
, freetype, p7zip, gamemode, mangohud
|
2022-07-25 17:14:09 +00:00
|
|
|
, wine
|
2022-01-15 15:40:50 +00:00
|
|
|
, 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
|
|
|
}:
|
|
|
|
|
2022-01-15 15:40:50 +00:00
|
|
|
let
|
|
|
|
steam-run = (steam.override {
|
|
|
|
# required by wine runner `caffe`
|
2022-03-20 17:26:17 +00:00
|
|
|
extraLibraries = pkgs: with pkgs; [ libunwind libusb1 gnutls ]
|
2022-01-15 15:40:50 +00:00
|
|
|
++ bottlesExtraLibraries pkgs;
|
|
|
|
extraPkgs = pkgs: [ ]
|
|
|
|
++ bottlesExtraPkgs pkgs;
|
|
|
|
}).run;
|
|
|
|
in
|
2021-02-20 20:07:22 +00:00
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "bottles";
|
2022-05-29 20:10:00 +00:00
|
|
|
version = "2022.5.28-trento-3";
|
2021-02-20 20:07:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bottlesdevs";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-05-29 20:10:00 +00:00
|
|
|
sha256 = "sha256-KIDLRqDLFTsVAczRpTchnUtKJfVHqbYzf8MhIR5UdYY=";
|
2021-02-20 20:07:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
chmod +x build-aux/meson/postinstall.py
|
|
|
|
patchShebangs build-aux/meson/postinstall.py
|
2022-04-18 01:03:29 +00:00
|
|
|
|
|
|
|
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
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
wrapGAppsHook
|
|
|
|
gettext
|
|
|
|
appstream-glib
|
|
|
|
desktop-file-utils
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gdk-pixbuf
|
|
|
|
glib
|
|
|
|
gobject-introspection
|
|
|
|
gsettings-desktop-schemas
|
|
|
|
gspell
|
|
|
|
gtk3
|
2022-01-15 15:40:50 +00:00
|
|
|
gtksourceview4
|
2021-04-26 13:26:26 +00:00
|
|
|
libhandy
|
2021-02-20 20:07:22 +00:00
|
|
|
libnotify
|
2021-12-18 16:15:08 +00:00
|
|
|
webkitgtk
|
|
|
|
gnome.adwaita-icon-theme
|
2021-02-20 20:07:22 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3Packages; [
|
2021-07-23 12:30:51 +00:00
|
|
|
pyyaml
|
2021-12-18 16:15:08 +00:00
|
|
|
pytoml
|
2021-07-23 12:30:51 +00:00
|
|
|
requests
|
2021-02-20 20:07:22 +00:00
|
|
|
pycairo
|
|
|
|
pygobject3
|
|
|
|
lxml
|
|
|
|
dbus-python
|
|
|
|
gst-python
|
|
|
|
liblarch
|
2021-08-01 09:50:21 +00:00
|
|
|
patool
|
2021-12-18 16:15:08 +00:00
|
|
|
markdown
|
2021-08-01 09:56:48 +00:00
|
|
|
] ++ [
|
2021-08-18 06:36:35 +00:00
|
|
|
steam-run
|
2021-08-01 09:56:48 +00:00
|
|
|
xdg-utils
|
2021-08-01 10:20:43 +00:00
|
|
|
pciutils
|
2021-08-18 06:36:35 +00:00
|
|
|
cabextract
|
2022-07-25 17:14:09 +00:00
|
|
|
wine
|
2021-12-18 16:15:08 +00:00
|
|
|
freetype
|
|
|
|
p7zip
|
|
|
|
gamemode # programs.gamemode.enable
|
2022-03-01 20:05:02 +00:00
|
|
|
mangohud
|
2021-08-01 09:56:48 +00:00
|
|
|
];
|
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
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
|
|
|
'';
|
|
|
|
|
2022-04-20 22:19:45 +00:00
|
|
|
passthru.updateScript = gitUpdater {
|
|
|
|
inherit pname version;
|
|
|
|
};
|
|
|
|
|
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/";
|
2022-02-27 21:44:04 +00:00
|
|
|
downloadPage = "https://github.com/bottlesdevs/Bottles/releases";
|
2021-02-20 20:07:22 +00:00
|
|
|
license = licenses.gpl3Only;
|
2022-06-22 22:52:42 +00:00
|
|
|
maintainers = with maintainers; [ psydvl shamilton ];
|
2021-02-20 20:07:22 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|