diff options
author | marius david <mariusdavid@laposte.net> | 2021-08-10 11:55:15 +0200 |
---|---|---|
committer | marius david <mariusdavid@laposte.net> | 2021-08-10 11:58:18 +0200 |
commit | bce379dd870eb2aefda283d513dcfc0825fe3d74 (patch) | |
tree | a639c08ec6db46c11822ff32eac3c5fe69a97520 | |
parent | 9207d0909e6ff00912081c1571437f715d7ed41e (diff) | |
download | nixpkgs-bce379dd870eb2aefda283d513dcfc0825fe3d74.tar nixpkgs-bce379dd870eb2aefda283d513dcfc0825fe3d74.tar.gz nixpkgs-bce379dd870eb2aefda283d513dcfc0825fe3d74.tar.bz2 nixpkgs-bce379dd870eb2aefda283d513dcfc0825fe3d74.tar.lz nixpkgs-bce379dd870eb2aefda283d513dcfc0825fe3d74.tar.xz nixpkgs-bce379dd870eb2aefda283d513dcfc0825fe3d74.tar.zst nixpkgs-bce379dd870eb2aefda283d513dcfc0825fe3d74.zip |
portmod: 2.0_beta9 -> 2.0.3
-rw-r--r-- | pkgs/games/portmod/default.nix | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/pkgs/games/portmod/default.nix b/pkgs/games/portmod/default.nix index 9db57d3e0a9..b677c63defe 100644 --- a/pkgs/games/portmod/default.nix +++ b/pkgs/games/portmod/default.nix @@ -1,22 +1,22 @@ { lib, callPackage, python3Packages, fetchFromGitLab, cacert, rustPlatform, bubblewrap, git, perlPackages, imagemagick, fetchurl, fetchzip, - jre, makeWrapper, tr-patcher, tes3cmd }: + jre, makeWrapper, tr-patcher, tes3cmd, fetchpatch }: let - version = "2.0_beta9"; + version = "2.0.3"; src = fetchFromGitLab { owner = "portmod"; repo = "Portmod"; rev = "v${version}"; - sha256 = "0a598rb0z6gsdyr4n0lc0yc583njjii07p6vxw75xsh7292vxksc"; + sha256 = "sha256-vMdyaI1Ps7bFoRvwdVNVG9vPFEiGb7CPvKEWfxiM128="; }; portmod-rust = rustPlatform.buildRustPackage rec { inherit src version; pname = "portmod-rust"; - cargoHash = "sha256-7Ce+EIbZuOur7iGOUXNWiXReuZO54LQJu+sJPw1CJGg="; + cargoHash = "sha256-tAghZmlg34jHr8gtNgL3MQ8EI7K6/TfDcTbBjxdWLr0="; nativeBuildInputs = [ python3Packages.python ]; @@ -44,9 +44,18 @@ python3Packages.buildPythonApplication rec { prePatch = '' substituteInPlace setup.py \ --replace "from setuptools_rust import Binding, RustExtension" "" \ - --replace "RustExtension(\"portmod.portmod\", binding=Binding.PyO3, strip=True)" "" + --replace "RustExtension(\"portmodlib.portmod\", binding=Binding.PyO3, strip=True)" "" ''; + patches = [ + (fetchpatch { + # fix error when symlinks are present in the path (https://gitlab.com/portmod/portmod/-/merge_requests/393) + # happen with ~/.nix-profile + url = "https://gitlab.com/portmod/portmod/-/merge_requests/393.patch"; + sha256 = "sha256-XHifwD/Nh7UiMZdvSNudVF7qpBOpjGTKSr4VVdJqUdA="; + }) + ]; + propagatedBuildInputs = with python3Packages; [ setuptools-scm setuptools @@ -61,6 +70,7 @@ python3Packages.buildPythonApplication rec { redbaron patool packaging + fasteners ]; checkInputs = with python3Packages; [ @@ -68,7 +78,7 @@ python3Packages.buildPythonApplication rec { ] ++ bin-programs; preCheck = '' - cp ${portmod-rust}/lib/libportmod.so portmod/portmod.so + cp ${portmod-rust}/lib/libportmod.so portmodlib/portmod.so export HOME=$(mktemp -d) ''; @@ -79,11 +89,14 @@ python3Packages.buildPythonApplication rec { "test_execute_network_permissions" "test_execute_permissions_bleed" "test_git" + "test_sync" + "test_manifest" + "test_add_repo" ]; # for some reason, installPhase doesn't copy the compiled binary postInstall = '' - cp ${portmod-rust}/lib/libportmod.so $out/${python3Packages.python.sitePackages}/portmod/portmod.so + cp ${portmod-rust}/lib/libportmod.so $out/${python3Packages.python.sitePackages}/portmodlib/portmod.so makeWrapperArgs+=("--prefix" "GIT_SSL_CAINFO" ":" "${cacert}/etc/ssl/certs/ca-bundle.crt" \ "--prefix" "PATH" ":" "${lib.makeBinPath bin-programs }") |