From bd370455c85cead2ff95f7c16605ccac4739a634 Mon Sep 17 00:00:00 2001 From: bloomvdomino <0x@ytex.de> Date: Sat, 20 Feb 2021 21:07:22 +0100 Subject: [PATCH] bottles: init at 2.1.1 --- pkgs/applications/misc/bottles/default.nix | 77 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 79 insertions(+) create mode 100644 pkgs/applications/misc/bottles/default.nix diff --git a/pkgs/applications/misc/bottles/default.nix b/pkgs/applications/misc/bottles/default.nix new file mode 100644 index 00000000000..5c6e9a0f9fe --- /dev/null +++ b/pkgs/applications/misc/bottles/default.nix @@ -0,0 +1,77 @@ +{ lib, fetchFromGitHub +, meson, ninja, pkg-config, wrapGAppsHook +, desktop-file-utils, gsettings-desktop-schemas, libnotify +, python3Packages, gettext +, appstream-glib, gdk-pixbuf, glib, gobject-introspection, gspell, gtk3 +, steam-run-native +}: + +python3Packages.buildPythonApplication rec { + pname = "bottles"; + version = "2.1.1"; + + src = fetchFromGitHub { + owner = "bottlesdevs"; + repo = pname; + rev = version; + sha256 = "1hbjnd06h0h47gcwb1s1b9py5nwmia1m35da6zydbl70vs75imhn"; + }; + + 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 + libnotify + ]; + + propagatedBuildInputs = with python3Packages; [ + pycairo + pygobject3 + lxml + dbus-python + gst-python + liblarch + ] ++ [ steam-run-native ]; + + format = "other"; + strictDeps = false; # broken with gobject-introspection setup hook, see https://github.com/NixOS/nixpkgs/issues/56943 + dontWrapGApps = true; # prevent double wrapping + + preConfigure = '' + substituteInPlace build-aux/meson/postinstall.py \ + --replace "'update-desktop-database'" "'${desktop-file-utils}/bin/update-desktop-database'" + substituteInPlace src/runner.py \ + --replace " {runner}" " ${steam-run-native}/bin/steam-run {runner}" \ + --replace " {dxvk_setup}" " ${steam-run-native}/bin/steam-run {dxvk_setup}" + ''; + + preFixup = '' + makeWrapperArgs+=("''${gappsWrapperArgs[@]}") + ''; + + meta = with lib; { + description = "An easy-to-use wineprefix manager"; + homepage = "https://github.com/bottlesdevs/Bottles"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ bloomvdomino ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1d488a13b22..5606c20e86b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21439,6 +21439,8 @@ in bonzomatic = callPackage ../applications/editors/bonzomatic { }; + bottles = callPackage ../applications/misc/bottles { }; + brave = callPackage ../applications/networking/browsers/brave { }; break-time = callPackage ../applications/misc/break-time { };