diff options
Diffstat (limited to 'nixpkgs/pkgs/tools/package-management')
12 files changed, 126 insertions, 481 deletions
diff --git a/nixpkgs/pkgs/tools/package-management/apx/default.nix b/nixpkgs/pkgs/tools/package-management/apx/default.nix index eb7b0f3a8c71..d24a5bc07106 100644 --- a/nixpkgs/pkgs/tools/package-management/apx/default.nix +++ b/nixpkgs/pkgs/tools/package-management/apx/default.nix @@ -2,21 +2,24 @@ , buildGoModule , fetchFromGitHub , distrobox +, installShellFiles }: buildGoModule rec { pname = "apx"; - version = "2.1.2"; + version = "2.3.0"; src = fetchFromGitHub { owner = "Vanilla-OS"; repo = "apx"; rev = "v${version}"; - hash = "sha256-0xQfbnLvNB1X1B8440CYHZWFGSQV319IU5tgXS3lyUI="; + hash = "sha256-/RGL2mCfJiJInnt5zgc1xXPqZxXCAcoWIbky99okvL0="; }; vendorHash = null; + nativeBuildInputs = [ installShellFiles ]; + ldflags = [ "-s" "-w" ]; postPatch = '' @@ -28,8 +31,8 @@ buildGoModule rec { ''; postInstall = '' - install -D config/apx.json -t $out/share/apx/ - install -D man/man1/apx.1 -t $out/man/man1/ + install -m 444 -D config/apx.json -t $out/share/apx/ + installManPage man/man1/* ''; meta = with lib; { diff --git a/nixpkgs/pkgs/tools/package-management/ciel/default.nix b/nixpkgs/pkgs/tools/package-management/ciel/default.nix index 87ea364aa4c4..c5809fdca944 100644 --- a/nixpkgs/pkgs/tools/package-management/ciel/default.nix +++ b/nixpkgs/pkgs/tools/package-management/ciel/default.nix @@ -62,7 +62,7 @@ rustPlatform.buildRustPackage rec { ''; meta = with lib; { - description = "A tool for controlling AOSC OS packaging environments using multi-layer filesystems and containers."; + description = "A tool for controlling AOSC OS packaging environments using multi-layer filesystems and containers"; homepage = "https://github.com/AOSC-Dev/ciel-rs"; license = licenses.mit; platforms = platforms.linux; diff --git a/nixpkgs/pkgs/tools/package-management/licensee/Gemfile.lock b/nixpkgs/pkgs/tools/package-management/licensee/Gemfile.lock index 487224bf5da2..6bfe70664bd1 100644 --- a/nixpkgs/pkgs/tools/package-management/licensee/Gemfile.lock +++ b/nixpkgs/pkgs/tools/package-management/licensee/Gemfile.lock @@ -1,36 +1,38 @@ GEM remote: https://rubygems.org/ specs: - addressable (2.8.1) + addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) + base64 (0.2.0) dotenv (2.8.1) - faraday (2.7.2) + faraday (2.8.1) + base64 faraday-net_http (>= 2.0, < 3.1) ruby2_keywords (>= 0.0.4) faraday-net_http (3.0.2) - licensee (9.16.0) + licensee (9.16.1) dotenv (~> 2.0) - octokit (>= 4.20, < 7.0) + octokit (>= 4.20, < 9.0) reverse_markdown (>= 1, < 3) rugged (>= 0.24, < 2.0) thor (>= 0.19, < 2.0) - mini_portile2 (2.8.1) - nokogiri (1.13.10) - mini_portile2 (~> 2.8.0) + mini_portile2 (2.8.5) + nokogiri (1.16.0) + mini_portile2 (~> 2.8.2) racc (~> 1.4) - octokit (6.0.1) + octokit (8.0.0) faraday (>= 1, < 3) sawyer (~> 0.9) - public_suffix (5.0.1) - racc (1.6.2) + public_suffix (5.0.4) + racc (1.7.3) reverse_markdown (2.1.1) nokogiri ruby2_keywords (0.0.5) - rugged (1.5.0.1) + rugged (1.7.1) sawyer (0.9.2) addressable (>= 2.3.5) faraday (>= 0.17.3, < 3) - thor (1.2.1) + thor (1.3.0) PLATFORMS ruby @@ -39,4 +41,4 @@ DEPENDENCIES licensee BUNDLED WITH - 2.3.26 + 2.4.22 diff --git a/nixpkgs/pkgs/tools/package-management/licensee/gemset.nix b/nixpkgs/pkgs/tools/package-management/licensee/gemset.nix index 25726d2ac5c2..0a850ba8758b 100644 --- a/nixpkgs/pkgs/tools/package-management/licensee/gemset.nix +++ b/nixpkgs/pkgs/tools/package-management/licensee/gemset.nix @@ -5,10 +5,20 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1ypdmpdn20hxp5vwxz3zc04r5xcwqc25qszdlg41h8ghdqbllwmw"; + sha256 = "0irbdwkkjwzajq1ip6ba46q49sxnrl2cw7ddkdhsfhb6aprnm3vr"; type = "gem"; }; - version = "2.8.1"; + version = "2.8.6"; + }; + base64 = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "01qml0yilb9basf7is2614skjp8384h2pycfx86cr8023arfj98g"; + type = "gem"; + }; + version = "0.2.0"; }; dotenv = { groups = ["default"]; @@ -21,15 +31,15 @@ version = "2.8.1"; }; faraday = { - dependencies = ["faraday-net_http" "ruby2_keywords"]; + dependencies = ["base64" "faraday-net_http" "ruby2_keywords"]; groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "17lacy6n0hsayafvgxgzmngfq2x62b2arbn32bj2yyzmgxwyxhqn"; + sha256 = "19p45ryrvxff6ggdj4fq76dk7wlkfgrh474c3kwzdsjx3xpdq8x8"; type = "gem"; }; - version = "2.7.2"; + version = "2.8.1"; }; faraday-net_http = { groups = ["default"]; @@ -47,20 +57,20 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0i4hs0vbgp0w3pdddr37zhydm16af122rmr0w39v3nqrj1ir65kv"; + sha256 = "05g5w9c4jlfhwn0hfz117s1c7hfdm5yn7cywr4mah7xr41yvbh04"; type = "gem"; }; - version = "9.16.0"; + version = "9.16.1"; }; mini_portile2 = { groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1af4yarhbbx62f7qsmgg5fynrik0s36wjy3difkawy536xg343mp"; + sha256 = "1kl9c3kdchjabrihdqfmcplk3lq4cw1rr9f378y6q22qwy5dndvs"; type = "gem"; }; - version = "2.8.1"; + version = "2.8.5"; }; nokogiri = { dependencies = ["mini_portile2" "racc"]; @@ -68,10 +78,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0n79k78c5vdcyl0m3y3l5x9kxl6xf5lgriwi2vd665qmdkr01vnk"; + sha256 = "1l8b0i24h4irivyhwy9xmkjbggw86cxkzkiqdqg0jpcp9qc8h4rl"; type = "gem"; }; - version = "1.13.10"; + version = "1.16.0"; }; octokit = { dependencies = ["faraday" "sawyer"]; @@ -79,30 +89,30 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0a5iy1v1n8f5ggp6q601mn8dz1n08ffs4gv0zsh5ca68j8dfmpx5"; + sha256 = "11fhv1a43c51jkgmqf62aypf9yw74lc6ph4qmzsh2bydwwzbwqn3"; type = "gem"; }; - version = "6.0.1"; + version = "8.0.0"; }; public_suffix = { groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0hz0bx2qs2pwb0bwazzsah03ilpf3aai8b7lk7s35jsfzwbkjq35"; + sha256 = "1bni4qjrsh2q49pnmmd6if4iv3ak36bd2cckrs6npl111n769k9m"; type = "gem"; }; - version = "5.0.1"; + version = "5.0.4"; }; racc = { groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "09jgz6r0f7v84a7jz9an85q8vvmp743dqcsdm3z9c8rqcqv6pljq"; + sha256 = "01b9662zd2x9bp4rdjfid07h09zxj7kvn7f5fghbqhzc625ap1dp"; type = "gem"; }; - version = "1.6.2"; + version = "1.7.3"; }; reverse_markdown = { dependencies = ["nokogiri"]; @@ -130,10 +140,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "02h1cv73znwfgy61mqmfylcfvwyyp3lddiz3njgivfx234mpz50x"; + sha256 = "02m9zksfy3dwzhbv56xq2wwmlghca5209hdg895pi2x2d2sbkahi"; type = "gem"; }; - version = "1.5.0.1"; + version = "1.7.1"; }; sawyer = { dependencies = ["addressable" "faraday"]; @@ -151,9 +161,9 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0inl77jh4ia03jw3iqm5ipr76ghal3hyjrd6r8zqsswwvi9j2xdi"; + sha256 = "1hx77jxkrwi66yvs10wfxqa8s25ds25ywgrrf66acm9nbfg7zp0s"; type = "gem"; }; - version = "1.2.1"; + version = "1.3.0"; }; } diff --git a/nixpkgs/pkgs/tools/package-management/nix/common.nix b/nixpkgs/pkgs/tools/package-management/nix/common.nix index 0ea47dd7e17c..946407826f25 100644 --- a/nixpkgs/pkgs/tools/package-management/nix/common.nix +++ b/nixpkgs/pkgs/tools/package-management/nix/common.nix @@ -6,7 +6,7 @@ , src ? fetchFromGitHub { owner = "NixOS"; repo = "nix"; rev = version; inherit hash; } , patches ? [ ] , maintainers ? with lib.maintainers; [ eelco lovesegfault artturin ] -}: +}@args: assert (hash == null) -> (src != null); let atLeast24 = lib.versionAtLeast version "2.4pre"; @@ -213,6 +213,11 @@ self = stdenv.mkDerivation { preInstallCheck = lib.optionalString stdenv.isDarwin '' export TMPDIR=$NIX_BUILD_TOP '' + # Prevent crashes in libcurl due to invoking Objective-C `+initialize` methods after `fork`. + # See http://sealiesoftware.com/blog/archive/2017/6/5/Objective-C_and_fork_in_macOS_1013.html. + + lib.optionalString stdenv.isDarwin '' + export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=yes + '' # See https://github.com/NixOS/nix/issues/5687 + lib.optionalString (atLeast25 && stdenv.isDarwin) '' echo "exit 99" > tests/gc-non-blocking.sh @@ -232,6 +237,9 @@ self = stdenv.mkDerivation { }; }; + # point 'nix edit' and ofborg at the file that defines the attribute, + # not this common file. + pos = builtins.unsafeGetAttrPos "version" args; meta = with lib; { description = "Powerful package manager that makes package management reliable and reproducible"; longDescription = '' diff --git a/nixpkgs/pkgs/tools/package-management/packagekit/qt.nix b/nixpkgs/pkgs/tools/package-management/packagekit/qt.nix index 72045735cba3..897f8d9e7b4a 100644 --- a/nixpkgs/pkgs/tools/package-management/packagekit/qt.nix +++ b/nixpkgs/pkgs/tools/package-management/packagekit/qt.nix @@ -1,7 +1,9 @@ -{ stdenv, fetchFromGitHub, cmake, pkg-config +{ stdenv, lib, fetchFromGitHub, cmake, pkg-config , qttools, packagekit }: -stdenv.mkDerivation rec { +let + isQt6 = lib.versions.major qttools.version == "6"; +in stdenv.mkDerivation rec { pname = "packagekit-qt"; version = "1.1.1"; @@ -16,6 +18,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config qttools ]; + cmakeFlags = [ (lib.cmakeBool "BUILD_WITH_QT6" isQt6) ]; + dontWrapQtApps = true; meta = packagekit.meta // { diff --git a/nixpkgs/pkgs/tools/package-management/pacman/default.nix b/nixpkgs/pkgs/tools/package-management/pacman/default.nix index f9a7fcdcde59..800e392f0f24 100644 --- a/nixpkgs/pkgs/tools/package-management/pacman/default.nix +++ b/nixpkgs/pkgs/tools/package-management/pacman/default.nix @@ -48,9 +48,12 @@ stdenv.mkDerivation rec { hash = "sha256-fY4+jFEhrsCWXfcfWb7fRgUsbPFPljZcRBHsPeCkwaU="; }; + strictDeps = true; + nativeBuildInputs = [ asciidoc installShellFiles + libarchive makeWrapper meson ninja diff --git a/nixpkgs/pkgs/tools/package-management/pdm/default.nix b/nixpkgs/pkgs/tools/package-management/pdm/default.nix index 0bf1cb88be68..b8f1b00b844d 100644 --- a/nixpkgs/pkgs/tools/package-management/pdm/default.nix +++ b/nixpkgs/pkgs/tools/package-management/pdm/default.nix @@ -32,13 +32,14 @@ in with python.pkgs; buildPythonApplication rec { pname = "pdm"; - version = "2.10.4"; - format = "pyproject"; - disabled = pythonOlder "3.7"; + version = "2.12.1"; + pyproject = true; + + disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-bf2dTLWQQ+3sstC0fSCOVdidMzunGX3rBcyi37x6S/s="; + hash = "sha256-OaKroZmGyUWnm/WEw3dSheJOnH+O2KYDgVthxfrF20w="; }; nativeBuildInputs = [ @@ -49,6 +50,7 @@ buildPythonApplication rec { blinker certifi cachecontrol + dep-logic findpython installer packaging @@ -69,6 +71,9 @@ buildPythonApplication rec { ] ++ lib.optionals (pythonOlder "3.10") [ importlib-metadata + ] + ++ lib.optionals (pythonAtLeast "3.10") [ + truststore ]; nativeCheckInputs = [ diff --git a/nixpkgs/pkgs/tools/package-management/poetry/default.nix b/nixpkgs/pkgs/tools/package-management/poetry/default.nix index 6de9219529bd..75cede5df7d3 100644 --- a/nixpkgs/pkgs/tools/package-management/poetry/default.nix +++ b/nixpkgs/pkgs/tools/package-management/poetry/default.nix @@ -1,8 +1,8 @@ -{ python3, fetchFromGitHub }: +{ lib, python3, fetchFromGitHub }: let - python = python3.override { - packageOverrides = self: super: rec { + newPackageOverrides = + self: super: { poetry = self.callPackage ./unwrapped.nix { }; # The versions of Poetry and poetry-core need to match exactly, @@ -21,7 +21,10 @@ let }; }); } // (plugins self); - }; + python = python3.override (old: { + packageOverrides = lib.composeManyExtensions + ((if old ? packageOverrides then [ old.packageOverrides ] else [ ]) ++ [ newPackageOverrides ]); + }); plugins = ps: with ps; { poetry-audit-plugin = callPackage ./plugins/poetry-audit-plugin.nix { }; diff --git a/nixpkgs/pkgs/tools/package-management/poetry/unwrapped.nix b/nixpkgs/pkgs/tools/package-management/poetry/unwrapped.nix index 33fcb8e6f46d..f13a7715464b 100644 --- a/nixpkgs/pkgs/tools/package-management/poetry/unwrapped.nix +++ b/nixpkgs/pkgs/tools/package-management/poetry/unwrapped.nix @@ -10,8 +10,8 @@ , cleo , crashtest , dulwich +, fastjsonschema , installer -, jsonschema , keyring , packaging , pexpect @@ -37,6 +37,7 @@ , pytest-mock , pytest-xdist , pythonAtLeast +, darwin }: buildPythonPackage rec { @@ -59,8 +60,10 @@ buildPythonPackage rec { ]; pythonRelaxDeps = [ - # only pinned to avoid dependency on Rust - "jsonschema" + # platformdirs 4.x is backwards compatible; https://github.com/python-poetry/poetry/commit/eb80d10846f7336b0b2a66ce2964e72dffee9a1c + "platformdirs" + # xattr 1.0 is backwards compatible modulo dropping Python 2 support: https://github.com/xattr/xattr/compare/v0.10.0...v1.0.0 + "xattr" ]; propagatedBuildInputs = [ @@ -69,8 +72,8 @@ buildPythonPackage rec { cleo crashtest dulwich + fastjsonschema installer - jsonschema keyring packaging pexpect @@ -108,6 +111,8 @@ buildPythonPackage rec { httpretty pytest-mock pytest-xdist + ] ++ lib.optionals stdenv.isDarwin [ + darwin.ps ]; preCheck = ('' diff --git a/nixpkgs/pkgs/tools/package-management/protontricks/default.nix b/nixpkgs/pkgs/tools/package-management/protontricks/default.nix index b8689fdf9966..462a2546ff5d 100644 --- a/nixpkgs/pkgs/tools/package-management/protontricks/default.nix +++ b/nixpkgs/pkgs/tools/package-management/protontricks/default.nix @@ -4,7 +4,9 @@ , setuptools-scm , setuptools , vdf -, bash +, pillow +, substituteAll +, writeShellScript , steam-run , winetricks , yad @@ -14,36 +16,41 @@ buildPythonApplication rec { pname = "protontricks"; - version = "1.10.1"; + version = "1.11.0"; src = fetchFromGitHub { owner = "Matoking"; repo = pname; rev = version; - sha256 = "sha256-gKrdUwX5TzeHHXuwhUyI4REPE6TNiZ6lhonyMCHcBCA="; + sha256 = "sha256-5FpcIaQodvNjdqUfD9hvXlrdhszr98j0zm3MCCpZFoc="; }; patches = [ # Use steam-run to run Proton binaries - ./steam-run.patch + (substituteAll { + src = ./steam-run.patch; + steamRun = lib.getExe steam-run; + bash = writeShellScript "steam-run-bash" '' + exec ${lib.getExe steam-run} bash "$@" + ''; + }) ]; - SETUPTOOLS_SCM_PRETEND_VERSION = version; - nativeBuildInputs = [ setuptools-scm ]; propagatedBuildInputs = [ setuptools # implicit dependency, used to find data/icon_placeholder.png vdf + pillow ]; makeWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ - bash - steam-run winetricks yad ]}" + # Steam Runtime does not work outside of steam-run, so don't use it + "--set STEAM_RUNTIME 0" ]; nativeCheckInputs = [ pytestCheckHook ]; diff --git a/nixpkgs/pkgs/tools/package-management/protontricks/steam-run.patch b/nixpkgs/pkgs/tools/package-management/protontricks/steam-run.patch index bcc1fc989836..3c865746377a 100644 --- a/nixpkgs/pkgs/tools/package-management/protontricks/steam-run.patch +++ b/nixpkgs/pkgs/tools/package-management/protontricks/steam-run.patch @@ -1,470 +1,65 @@ -diff --git a/src/protontricks/cli/main.py b/src/protontricks/cli/main.py -index c77d287..236c2a9 100755 ---- a/src/protontricks/cli/main.py -+++ b/src/protontricks/cli/main.py -@@ -17,8 +17,7 @@ from ..flatpak import (FLATPAK_BWRAP_COMPATIBLE_VERSION, - get_running_flatpak_version) - from ..gui import (prompt_filesystem_access, select_steam_app_with_gui, - select_steam_installation) --from ..steam import (find_legacy_steam_runtime_path, find_proton_app, -- find_steam_installations, get_steam_apps, -+from ..steam import (find_proton_app, find_steam_installations, get_steam_apps, - get_steam_lib_paths) - from ..util import run_command - from ..winetricks import get_winetricks_path -@@ -67,8 +66,7 @@ def main(args=None, steam_path=None, steam_root=None): - "WINE: path to a custom 'wine' executable\n" - "WINESERVER: path to a custom 'wineserver' executable\n" - "STEAM_RUNTIME: 1 = enable Steam Runtime, 0 = disable Steam " -- "Runtime, valid path = custom Steam Runtime path, " -- "empty = enable automatically (default)\n" -+ "Runtime, empty = enable automatically (default)\n" - "PROTONTRICKS_GUI: GUI provider to use, accepts either 'yad' " - "or 'zenity'" - ), -@@ -204,17 +202,9 @@ def main(args=None, steam_path=None, steam_root=None): - if not steam_path: - exit_("No Steam installation was selected.") - -- # 2. Find the pre-installed legacy Steam Runtime if enabled -- legacy_steam_runtime_path = None -- use_steam_runtime = True -- -+ # 2. Use Steam Runtime if enabled - if os.environ.get("STEAM_RUNTIME", "") != "0" and not args.no_runtime: -- legacy_steam_runtime_path = find_legacy_steam_runtime_path( -- steam_root=steam_root -- ) -- -- if not legacy_steam_runtime_path: -- exit_("Steam Runtime was enabled but couldn't be found!") -+ use_steam_runtime = True - else: - use_steam_runtime = False - logger.info("Steam Runtime disabled.") -@@ -281,7 +271,6 @@ def main(args=None, steam_path=None, steam_root=None): - proton_app=proton_app, - steam_app=steam_app, - use_steam_runtime=use_steam_runtime, -- legacy_steam_runtime_path=legacy_steam_runtime_path, - command=[str(winetricks_path), "--gui"], - use_bwrap=use_bwrap, - start_wineserver=start_background_wineserver -@@ -361,7 +350,6 @@ def main(args=None, steam_path=None, steam_root=None): - proton_app=proton_app, - steam_app=steam_app, - use_steam_runtime=use_steam_runtime, -- legacy_steam_runtime_path=legacy_steam_runtime_path, - use_bwrap=use_bwrap, - start_wineserver=start_background_wineserver, - command=[str(winetricks_path)] + args.winetricks_command -@@ -373,7 +361,6 @@ def main(args=None, steam_path=None, steam_root=None): - steam_app=steam_app, - command=args.command, - use_steam_runtime=use_steam_runtime, -- legacy_steam_runtime_path=legacy_steam_runtime_path, - use_bwrap=use_bwrap, - start_wineserver=start_background_wineserver, - # Pass the command directly into the shell *without* diff --git a/src/protontricks/data/scripts/bwrap_launcher.sh b/src/protontricks/data/scripts/bwrap_launcher.sh -index b5552e1..b11bc99 100644 +index 922c59d..54742a4 100644 --- a/src/protontricks/data/scripts/bwrap_launcher.sh +++ b/src/protontricks/data/scripts/bwrap_launcher.sh @@ -1,4 +1,4 @@ -#!/bin/bash -+#!/usr/bin/env bash ++#!@bash@ # Helper script set -o errexit -@@ -80,6 +80,8 @@ done - log_info "Following directories will be mounted inside container: ${mount_dirs[*]}" - log_info "Using temporary directory: $PROTONTRICKS_TEMP_PATH" - --exec "$STEAM_RUNTIME_PATH"/run --share-pid --launcher \ -+exec steam-run "$STEAM_RUNTIME_PATH"/pressure-vessel/bin/pressure-vessel-wrap \ -+--variable-dir="${PRESSURE_VESSEL_VARIABLE_DIR:-$STEAM_RUNTIME_PATH/var}" \ -+--share-pid --launcher \ - "${mount_params[@]}" -- \ - --bus-name="com.github.Matoking.protontricks.App${STEAM_APPID}_${PROTONTRICKS_SESSION_ID}" diff --git a/src/protontricks/data/scripts/wine_launch.sh b/src/protontricks/data/scripts/wine_launch.sh -index 1f8a432..2d82f2b 100644 +index 1b0a0ce..127f13e 100644 --- a/src/protontricks/data/scripts/wine_launch.sh +++ b/src/protontricks/data/scripts/wine_launch.sh @@ -1,4 +1,4 @@ -#!/bin/bash -+#!/usr/bin/env -S steam-run bash ++#!@bash@ # Helper script created by Protontricks to run Wine binaries using Steam Runtime set -o errexit -@@ -158,8 +158,8 @@ if [[ -n "$PROTONTRICKS_INSIDE_STEAM_RUNTIME" - export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"$PROTON_LD_LIBRARY_PATH" - log_info "Appending to LD_LIBRARY_PATH: $PROTON_LD_LIBRARY_PATH" - elif [[ "$PROTONTRICKS_STEAM_RUNTIME" = "legacy" ]]; then -- export LD_LIBRARY_PATH="$PROTON_LD_LIBRARY_PATH" -- log_info "LD_LIBRARY_PATH set to $LD_LIBRARY_PATH" -+ export LD_LIBRARY_PATH="$PROTON_LD_LIBRARY_PATH":"$LD_LIBRARY_PATH" -+ log_info "Inserting to head of LD_LIBRARY_PATH: $PROTON_LD_LIBRARY_PATH" - fi - exec "$PROTON_DIST_PATH"/bin/@@name@@ "$@" || : - elif [[ "$PROTONTRICKS_STEAM_RUNTIME" = "bwrap" ]]; then diff --git a/src/protontricks/data/scripts/wineserver_keepalive.sh b/src/protontricks/data/scripts/wineserver_keepalive.sh -index 8168dae..559de33 100644 +index 8168dae..cb3e7d9 100644 --- a/src/protontricks/data/scripts/wineserver_keepalive.sh +++ b/src/protontricks/data/scripts/wineserver_keepalive.sh @@ -1,4 +1,4 @@ -#!/bin/bash -+#!/usr/bin/env bash ++#!@bash@ # A simple keepalive script that will ensure a wineserver process is kept alive # for the duration of the Protontricks session. # This is accomplished by launching a simple Windows batch script that will -diff --git a/src/protontricks/steam.py b/src/protontricks/steam.py -index c39b51d..79de098 100644 ---- a/src/protontricks/steam.py -+++ b/src/protontricks/steam.py -@@ -14,9 +14,8 @@ from .util import lower_dict - - __all__ = ( - "COMMON_STEAM_DIRS", "SteamApp", "find_steam_installations", -- "find_steam_path", "find_legacy_steam_runtime_path", -- "iter_appinfo_sections", "get_appinfo_sections", "get_tool_appid", -- "find_steam_compat_tool_app", "find_appid_proton_prefix", -+ "find_steam_path", "iter_appinfo_sections", "get_appinfo_sections", -+ "get_tool_appid", "find_steam_compat_tool_app", "find_appid_proton_prefix", - "find_proton_app", "get_steam_lib_paths", "get_compat_tool_dirs", - "get_custom_compat_tool_installations_in_dir", - "get_custom_compat_tool_installations", "find_current_steamid3", -@@ -393,37 +392,6 @@ def find_steam_path(): - return None, None - - --def find_legacy_steam_runtime_path(steam_root): -- """ -- Find the legacy Steam Runtime either using the STEAM_RUNTIME env or -- steam_root -- """ -- env_steam_runtime = os.environ.get("STEAM_RUNTIME", "") -- -- if env_steam_runtime == "0": -- # User has disabled Steam Runtime -- logger.info("STEAM_RUNTIME is 0. Disabling Steam Runtime.") -- return None -- elif env_steam_runtime and Path(env_steam_runtime).is_dir(): -- # User has a custom Steam Runtime -- logger.info( -- "Using custom Steam Runtime at %s", env_steam_runtime) -- return Path(env_steam_runtime) -- elif env_steam_runtime in ["1", ""]: -- # User has enabled Steam Runtime or doesn't have STEAM_RUNTIME set; -- # default to enabled Steam Runtime in either case -- steam_runtime_path = steam_root / "ubuntu12_32" / "steam-runtime" -- -- logger.info( -- "Using default Steam Runtime at %s", str(steam_runtime_path)) -- return steam_runtime_path -- -- logger.error( -- "Path in STEAM_RUNTIME doesn't point to a valid Steam Runtime!") -- -- return None -- -- - APPINFO_STRUCT_HEADER = "<4sL" - APPINFO_V27_STRUCT_SECTION = "<LLLLQ20sL" - APPINFO_V28_STRUCT_SECTION = "<LLLLQ20sL20s" diff --git a/src/protontricks/util.py b/src/protontricks/util.py -index 7e95af5..7dc9a29 100644 +index 9262cd0..00b2b2f 100644 --- a/src/protontricks/util.py +++ b/src/protontricks/util.py -@@ -8,14 +8,14 @@ import shutil - import tempfile - import re - from pathlib import Path --from subprocess import PIPE, check_output, run, Popen, DEVNULL -+from subprocess import PIPE, run, Popen, DEVNULL - - import pkg_resources - - __all__ = ( - "SUPPORTED_STEAM_RUNTIMES", "lower_dict", -- "get_legacy_runtime_library_paths", "get_host_library_paths", -- "RUNTIME_ROOT_GLOB_PATTERNS", "get_runtime_library_paths", -+ "get_host_library_paths", "RUNTIME_ROOT_GLOB_PATTERNS", -+ "get_runtime_library_paths", - "WINE_SCRIPT_TEMPLATE", "create_wine_bin_dir", "run_command" - ) - -@@ -43,24 +43,6 @@ def lower_dict(d): - return {k.lower(): _lower_value(v) for k, v in d.items()} - - --def get_legacy_runtime_library_paths(legacy_steam_runtime_path, proton_app): -- """ -- Get LD_LIBRARY_PATH value to use when running a command using Steam Runtime -- """ -- steam_runtime_paths = check_output([ -- str(legacy_steam_runtime_path / "run.sh"), -- "--print-steam-runtime-library-paths" -- ]) -- steam_runtime_paths = str(steam_runtime_paths, "utf-8") -- # Add Proton installation directory first into LD_LIBRARY_PATH -- # so that libwine.so.1 is picked up correctly (see issue #3) -- return "".join([ -- str(proton_app.proton_dist_path / "lib"), os.pathsep, -- str(proton_app.proton_dist_path / "lib64"), os.pathsep, -- steam_runtime_paths -- ]) -- -- - def get_host_library_paths(): - """ - Get host library paths to use when creating the LD_LIBRARY_PATH environment -@@ -72,7 +54,7 @@ def get_host_library_paths(): +@@ -99,7 +99,7 @@ def get_host_library_paths(): # Since that command is unavailable with newer Steam Runtime releases, # do it ourselves here. result = run( - ["/sbin/ldconfig", "-XNv"], -+ ["steam-run", "ldconfig", "-XNv"], ++ ["@steamRun@", "/sbin/ldconfig", "-XNv"], check=True, stdout=PIPE, stderr=PIPE ) lines = result.stdout.decode("utf-8").split("\n") -@@ -90,7 +72,7 @@ RUNTIME_ROOT_GLOB_PATTERNS = ( - ) - - --def get_runtime_library_paths(proton_app, use_bwrap=True): -+def get_runtime_library_paths(proton_app, proton_app_only=True): - """ - Get LD_LIBRARY_PATH value to use when running a command using Steam Runtime - """ -@@ -111,7 +93,7 @@ def get_runtime_library_paths(proton_app, use_bwrap=True): - f"Could not find Steam Runtime runtime root for {runtime_app.name}" - ) - -- if use_bwrap: -+ if proton_app_only: - return "".join([ - str(proton_app.proton_dist_path / "lib"), os.pathsep, - str(proton_app.proton_dist_path / "lib64"), os.pathsep -@@ -313,7 +295,7 @@ def run_command( - wine_environ["STEAM_RUNTIME_PATH"] = \ - str(proton_app.required_tool_app.install_path) - wine_environ["PROTON_LD_LIBRARY_PATH"] = \ -- get_runtime_library_paths(proton_app, use_bwrap=use_bwrap) -+ get_runtime_library_paths(proton_app, proton_app_only=use_bwrap) - - runtime_name = proton_app.required_tool_app.name - logger.info( -@@ -337,13 +319,9 @@ def run_command( - "Current Steam Runtime not recognized by Protontricks." - ) - else: -- # Legacy Steam Runtime requires a different LD_LIBRARY_PATH -- # that is produced by a script. - wine_environ["PROTONTRICKS_STEAM_RUNTIME"] = "legacy" - wine_environ["PROTON_LD_LIBRARY_PATH"] = \ -- get_legacy_runtime_library_paths( -- legacy_steam_runtime_path, proton_app -- ) -+ get_runtime_library_paths(proton_app, proton_app_only=True) - - # bwrap is not available, so ensure it is not launched even if the - # user configured it so -@@ -353,7 +331,6 @@ def run_command( - # configuring the environment and Wine before launching the underlying - # Wine binaries. - wine_bin_dir = create_wine_bin_dir(proton_app) -- wine_environ["LEGACY_STEAM_RUNTIME_PATH"] = str(legacy_steam_runtime_path) - wine_environ["PATH"] = os.pathsep.join( - [str(wine_bin_dir), wine_environ["PATH"]] - ) -diff --git a/tests/cli/test_main.py b/tests/cli/test_main.py -index 0a35f8d..9b96629 100644 ---- a/tests/cli/test_main.py -+++ b/tests/cli/test_main.py -@@ -121,15 +121,10 @@ class TestCLIRun: - assert str(command.args[0]).endswith(".local/bin/winetricks") - assert command.args[1] == "winecfg" - assert command.env["PATH"].startswith(str(wine_bin_dir)) -- assert ( -- "fake_steam_runtime/lib64" in command.env["PROTON_LD_LIBRARY_PATH"] -- ) - assert command.env["WINE"] == str(wine_bin_dir / "wine") - assert command.env["WINELOADER"] == str(wine_bin_dir / "wine") - assert command.env["WINESERVER"] == str(wine_bin_dir / "wineserver") - -- assert command.env["LEGACY_STEAM_RUNTIME_PATH"] == \ -- str(steam_runtime_dir / "steam-runtime") - assert command.env["PROTONTRICKS_STEAM_RUNTIME"] == "legacy" - assert "STEAM_RUNTIME_PATH" not in command.env - -@@ -180,16 +175,14 @@ class TestCLIRun: - assert command.env["PATH"].startswith(str(wine_bin_dir)) - - # Compared to the traditional Steam Runtime, PROTON_LD_LIBRARY_PATH -- # will be different -+ # will be the same (it would be different without steam-run.patch) - proton_install_path = Path(proton_app.install_path) - assert command.env["PROTON_LD_LIBRARY_PATH"] == "".join([ - str(proton_install_path / "dist" / "lib"), os.pathsep, - str(proton_install_path / "dist" / "lib64"), os.pathsep - ]) - -- # Environment variables for both legacy and new Steam Runtime exist -- assert command.env["LEGACY_STEAM_RUNTIME_PATH"] == \ -- str(steam_runtime_dir / "steam-runtime") -+ # Environment variable for new Steam Runtime exists - assert command.env["STEAM_RUNTIME_PATH"] == \ - str(steam_runtime_soldier.install_path) - assert command.env["PROTONTRICKS_STEAM_RUNTIME"] == "bwrap" -@@ -254,9 +247,7 @@ class TestCLIRun: - str(runtime_root / "lib" / "x86_64-linux-gnu") - ])) - -- # Environment variables for both legacy and new Steam Runtime exist -- assert command.env["LEGACY_STEAM_RUNTIME_PATH"] == \ -- str(steam_runtime_dir / "steam-runtime") -+ # Environment variable for new Steam Runtime exists - assert command.env["STEAM_RUNTIME_PATH"] == \ - str(steam_runtime_soldier.install_path) - assert command.env["PROTONTRICKS_STEAM_RUNTIME"] == "legacy" -@@ -407,7 +398,6 @@ class TestCLIRun: - - # Also ensure log messages are included in the error message - assert b"Found Steam directory at" in message -- assert b"Using default Steam Runtime" in message - - def test_run_gui_provider_not_found(self, cli, home_dir, steam_app_factory): - """ -@@ -421,20 +411,6 @@ class TestCLIRun: - - assert "YAD or Zenity is not installed" in result - -- def test_run_steam_runtime_not_found( -- self, cli, steam_dir, steam_app_factory): -- """ -- Try performing a command with Steam Runtime enabled but no -- available Steam Runtime installation -- """ -- steam_app_factory(name="Fake game 1", appid=10) -- result = cli( -- ["10", "winecfg"], env={"STEAM_RUNTIME": "invalid/path"}, -- expect_returncode=1 -- ) -- -- assert "Steam Runtime was enabled but couldn't be found" in result -- - def test_run_proton_not_found(self, cli, steam_dir, steam_app_factory): - steam_app_factory(name="Fake game 1", appid=10) - result = cli(["10", "winecfg"], expect_returncode=1) diff --git a/tests/conftest.py b/tests/conftest.py -index 106e0d9..8236f3a 100644 +index a516437..88bf804 100644 --- a/tests/conftest.py +++ b/tests/conftest.py -@@ -169,7 +169,7 @@ def steam_runtime_dir(steam_dir): +@@ -170,7 +170,7 @@ def steam_runtime_dir(steam_dir): """ (steam_dir.parent / "root" / "ubuntu12_32" / "steam-runtime").mkdir(parents=True) (steam_dir.parent / "root" / "ubuntu12_32" / "steam-runtime" / "run.sh").write_text( - "#!/bin/bash\n" -+ "#!/usr/bin/env -S steam-run bash\n" ++ "#!/bin/sh\n" """if [ "$1" = "--print-steam-runtime-library-paths" ]; then\n""" " echo 'fake_steam_runtime/lib:fake_steam_runtime/lib64'\n" "fi" -@@ -735,7 +735,7 @@ def xdg_user_dir_bin(home_dir): +@@ -764,7 +764,7 @@ def xdg_user_dir_bin(home_dir): # Only mock PICTURES and DOWNLOAD; mocking everything isn't necessary # for the tests. (home_dir / ".local" / "bin" / "xdg-user-dir").write_text( - '#!/bin/bash\n' -+ '#!/usr/bin/env -S steam-run bash\n' ++ '#!/bin/sh\n' 'if [[ "$1" == "PICTURES" ]]; then\n' ' echo "$HOME/Pictures"\n' 'elif [[ "$1" == "DOWNLOAD" ]]; then\n' -diff --git a/tests/test_flatpak.py b/tests/test_flatpak.py -index cb2b9bb..440b704 100644 ---- a/tests/test_flatpak.py -+++ b/tests/test_flatpak.py -@@ -159,36 +159,6 @@ class TestGetInaccessiblePaths: - - assert len(inaccessible_paths) == 0 - -- @pytest.mark.usefixtures("xdg_user_dir_bin") -- def test_flatpak_xdg_user_dir(self, monkeypatch, tmp_path, home_dir): -- """ -- Test that XDG filesystem permissions such as 'xdg-pictures' and -- 'xdg-download' are detected correctly -- """ -- flatpak_info_path = tmp_path / "flatpak-info" -- -- flatpak_info_path.write_text( -- "[Application]\n" -- "name=fake.flatpak.Protontricks\n" -- "\n" -- "[Instance]\n" -- "flatpak-version=1.12.1\n" -- "\n" -- "[Context]\n" -- "filesystems=xdg-pictures;" -- ) -- monkeypatch.setattr( -- "protontricks.flatpak.FLATPAK_INFO_PATH", str(flatpak_info_path) -- ) -- -- inaccessible_paths = get_inaccessible_paths([ -- str(home_dir / "Pictures"), -- str(home_dir / "Download") -- ]) -- -- assert len(inaccessible_paths) == 1 -- assert str(inaccessible_paths[0]) == str(home_dir / "Download") -- - def test_flatpak_unknown_permission(self, monkeypatch, tmp_path, caplog): - """ - Test that unknown filesystem permissions are ignored -diff --git a/tests/test_util.py b/tests/test_util.py -index ec5f4f3..0b0a66c 100644 ---- a/tests/test_util.py -+++ b/tests/test_util.py -@@ -98,44 +98,6 @@ class TestRunCommand: - assert command.env["WINELOADER"] == "/fake/wine" - assert command.env["WINESERVER"] == "/fake/wineserver" - -- def test_unknown_steam_runtime_detected( -- self, home_dir, proton_factory, runtime_app_factory, -- steam_app_factory, caplog): -- """ -- Test that Protontricks will log a warning if it encounters a Steam -- Runtime it does not recognize -- """ -- steam_runtime_medic = runtime_app_factory( -- name="Steam Linux Runtime - Medic", -- appid=14242420, -- runtime_dir_name="medic" -- ) -- proton_app = proton_factory( -- name="Proton 5.20", appid=100, compat_tool_name="proton_520", -- is_default_proton=True, required_tool_app=steam_runtime_medic -- ) -- steam_app = steam_app_factory(name="Fake game", appid=10) -- -- run_command( -- winetricks_path=Path("/usr/bin/winetricks"), -- proton_app=proton_app, -- steam_app=steam_app, -- command=["echo", "nothing"], -- shell=True, -- use_steam_runtime=True -- ) -- -- # Warning will be logged since Protontricks does not recognize -- # Steam Runtime Medic and can't ensure it's being configured correctly -- warning = next( -- record for record in caplog.records -- if record.levelname == "WARNING" -- and "not recognized" in record.getMessage() -- ) -- assert warning.getMessage() == \ -- "Current Steam Runtime not recognized by Protontricks." -- -- - class TestLowerDict: - def test_lower_nested_dict(self): - """ |