Merge pull request #98093 from marius851000/portmod

authored by Doron Behar and committed by GitHub 44dd65ff c5c468bd

+332
+24
pkgs/development/python-modules/baron/default.nix
···
··· 1 + { lib, fetchPypi, buildPythonPackage, rply, pytestCheckHook, isPy3k }: 2 + 3 + buildPythonPackage rec { 4 + pname = "baron"; 5 + version = "0.9"; 6 + 7 + src = fetchPypi { 8 + inherit pname version; 9 + sha256 = "0fib74nkqnl1i2zzlhbbfpw3whwc4951p9x61r2xrxhwp4r9yn5h"; 10 + }; 11 + 12 + propagatedBuildInputs = [ rply ]; 13 + 14 + checkInputs = [ pytestCheckHook ]; 15 + 16 + doCheck = isPy3k; 17 + 18 + meta = with lib; { 19 + homepage = "https://github.com/gristlabs/asttokens"; 20 + description = "Abstraction on top of baron, a FST for python to make writing refactoring code a realistic task"; 21 + license = licenses.lgpl3Plus; 22 + maintainers = with maintainers; [ marius851000 ]; 23 + }; 24 + }
+57
pkgs/development/python-modules/patool/default.nix
···
··· 1 + { stdenv, lib, buildPythonPackage, fetchFromGitHub, pytestCheckHook, p7zip, 2 + unzip, cabextract, zip, zopfli, lzip, zpaq, gnutar, gnugrep, diffutils, file, 3 + gzip, bzip2, xz}: 4 + 5 + # unrar is unfree, as well as 7z with unrar support, not including it (patool doesn't support unar) 6 + 7 + let 8 + compression-utilities = [ 9 + p7zip 10 + unzip 11 + gnutar 12 + cabextract 13 + zip 14 + zopfli 15 + lzip 16 + zpaq 17 + gzip 18 + gnugrep 19 + diffutils 20 + bzip2 21 + file 22 + xz 23 + ]; 24 + in 25 + buildPythonPackage rec { 26 + pname = "patool"; 27 + version = "1.12"; 28 + 29 + #pypi doesn't have test data 30 + src = fetchFromGitHub { 31 + owner = "wummel"; 32 + repo = pname; 33 + rev = "upstream/${version}"; 34 + sha256 = "0v4r77sm3yzh7y1whfwxmp01cchd82jbhvbg9zsyd2yb944imzjy"; 35 + }; 36 + 37 + prePatch = '' 38 + substituteInPlace patoolib/util.py \ 39 + --replace "path = None" 'path = append_to_path(os.environ["PATH"], "${lib.makeBinPath compression-utilities}")' 40 + ''; 41 + 42 + checkInputs = [ pytestCheckHook ] ++ compression-utilities; 43 + 44 + disabledTests = [ 45 + "test_unzip" 46 + "test_unzip_file" 47 + "test_zip" 48 + "test_zip_file" 49 + ]; 50 + 51 + meta = with lib; { 52 + description = "portable archive file manager"; 53 + homepage = "https://wummel.github.io/patool/"; 54 + license = licenses.gpl3; 55 + maintainers = with maintainers; [ marius851000 ]; 56 + }; 57 + }
+20
pkgs/development/python-modules/pypblib/default.nix
···
··· 1 + { lib, buildPythonPackage, fetchPypi }: 2 + 3 + buildPythonPackage rec { 4 + pname = "pypblib"; 5 + version = "0.0.4"; 6 + 7 + src = fetchPypi { 8 + inherit pname version; 9 + sha256 = "0qlhykm9flj6cv3v0b9q40gy21yz0lnp0wxlxvb3ijkpy45r7pbi"; 10 + }; 11 + 12 + pythonImportsCheck = [ "pypblib" ]; 13 + 14 + meta = with lib; { 15 + homepage = "https://pypi.org/project/pypblib/"; 16 + description = "PBLib Python3 Bindings"; 17 + license = licenses.mit; 18 + maintainers = [ maintainers.marius851000 ]; 19 + }; 20 + }
+24
pkgs/development/python-modules/python-sat/default.nix
···
··· 1 + { buildPythonPackage, fetchFromGitHub, lib, six, pypblib, pytestCheckHook }: 2 + 3 + buildPythonPackage rec { 4 + pname = "python-sat"; 5 + version = "0.1.6.dev6"; 6 + 7 + src = fetchFromGitHub { 8 + owner = "pysathq"; 9 + repo = "pysat"; 10 + rev = version; 11 + sha256 = "1gckxhqkvzyw7pmwg8xzxq146jysqy0s23l5mjc3awm6swdij66y"; 12 + }; 13 + 14 + propagatedBuildInputs = [ six pypblib ]; 15 + 16 + checkInputs = [ pytestCheckHook ]; 17 + 18 + meta = with lib; { 19 + description = "Toolkit to provide interface for various SAT (without optional dependancy py-aiger-cnf)"; 20 + homepage = "https://github.com/pysathq/pysat"; 21 + license = licenses.mit; 22 + maintainers = [ maintainers.marius851000 ]; 23 + }; 24 + }
+27
pkgs/development/python-modules/redbaron/default.nix
···
··· 1 + { lib, fetchPypi, buildPythonPackage, baron, pytestCheckHook }: 2 + 3 + buildPythonPackage rec { 4 + pname = "redbaron"; 5 + version = "0.9.2"; 6 + 7 + src = fetchPypi { 8 + inherit pname version; 9 + sha256 = "0bqkq0wn20cc3qrcd1ifq74p4m570j345bkq4axl08kbr8whfba7"; 10 + }; 11 + 12 + propagatedBuildInputs = [ baron ]; 13 + 14 + preCheck = '' 15 + rm -rf tests/__pycache__ 16 + rm tests/test_bounding_box.py 17 + ''; #error about fixtures 18 + 19 + checkInputs = [ pytestCheckHook ]; 20 + 21 + meta = with lib; { 22 + homepage = "https://github.com/gristlabs/asttokens"; 23 + description = "Abstraction on top of baron, a FST for python to make writing refactoring code a realistic task"; 24 + license = licenses.lgpl3Plus; 25 + maintainers = with maintainers; [ marius851000 ]; 26 + }; 27 + }
+98
pkgs/games/portmod/default.nix
···
··· 1 + { lib, stdenv, callPackage, python3Packages, fetchFromGitLab, cacert, 2 + rustPlatform, bubblewrap, git, perlPackages, imagemagick7, fetchurl, fetchzip, 3 + jre, makeWrapper, tr-patcher, tes3cmd }: 4 + 5 + let 6 + version = "2.0_beta9"; 7 + 8 + src = fetchFromGitLab { 9 + owner = "portmod"; 10 + repo = "Portmod"; 11 + rev = "v${version}"; 12 + sha256 = "0a598rb0z6gsdyr4n0lc0yc583njjii07p6vxw75xsh7292vxksc"; 13 + }; 14 + 15 + portmod-rust = rustPlatform.buildRustPackage rec { 16 + inherit src version; 17 + pname = "portmod-rust"; 18 + 19 + cargoSha256 = "14p1aywwbkf2pk85sir5g9ni08zam2hid0kaz111718b006nrxh7"; 20 + 21 + nativeBuildInputs = [ python3Packages.python ]; 22 + 23 + doCheck = false; 24 + }; 25 + 26 + bin-programs = [ 27 + bubblewrap 28 + git 29 + python3Packages.virtualenv 30 + tr-patcher 31 + tes3cmd 32 + imagemagick7 33 + ]; 34 + 35 + in 36 + python3Packages.buildPythonApplication rec { 37 + inherit src version; 38 + 39 + pname = "portmod"; 40 + 41 + SETUPTOOLS_SCM_PRETEND_VERSION = version; 42 + 43 + # build the rust library independantly 44 + prePatch = '' 45 + substituteInPlace setup.py \ 46 + --replace "from setuptools_rust import Binding, RustExtension" "" \ 47 + --replace "RustExtension(\"portmod.portmod\", binding=Binding.PyO3, strip=True)" "" 48 + ''; 49 + 50 + propagatedBuildInputs = with python3Packages; [ 51 + setuptools_scm 52 + setuptools 53 + requests 54 + chardet 55 + colorama 56 + restrictedpython 57 + appdirs 58 + GitPython 59 + progressbar2 60 + python-sat 61 + redbaron 62 + patool 63 + packaging 64 + ]; 65 + 66 + checkInputs = with python3Packages; [ 67 + pytestCheckHook 68 + ] ++ bin-programs; 69 + 70 + preCheck = '' 71 + cp ${portmod-rust}/lib/libportmod.so portmod/portmod.so 72 + export HOME=$(mktemp -d) 73 + ''; 74 + 75 + # some test require network access 76 + disabledTests = [ 77 + "test_masters_esp" 78 + "test_logging" 79 + "test_execute_network_permissions" 80 + "test_execute_permissions_bleed" 81 + "test_git" 82 + ]; 83 + 84 + # for some reason, installPhase doesn't copy the compiled binary 85 + postInstall = '' 86 + cp ${portmod-rust}/lib/libportmod.so $out/${python3Packages.python.sitePackages}/portmod/portmod.so 87 + 88 + makeWrapperArgs+=("--prefix" "GIT_SSL_CAINFO" ":" "${cacert}/etc/ssl/certs/ca-bundle.crt" \ 89 + "--prefix" "PATH" ":" "${lib.makeBinPath bin-programs }") 90 + ''; 91 + 92 + meta = { 93 + description = "mod manager for openMW based on portage"; 94 + homepage = "https://gitlab.com/portmod/portmod"; 95 + license = lib.licenses.gpl3; 96 + maintainers = with lib.maintainers; [ marius851000 ]; 97 + }; 98 + }
+28
pkgs/games/tes3cmd/default.nix
···
··· 1 + { stdenv, lib, perlPackages, fetchFromGitHub }: 2 + 3 + stdenv.mkDerivation rec { 4 + pname = "tes3cmd"; 5 + version = "0.40-pre-release-2"; 6 + 7 + src = fetchFromGitHub { 8 + owner = "john-moonsugar"; 9 + repo = pname; 10 + rev = "f72e9ed9dd18e8545dd0dc2a4056c250cf505790"; 11 + sha256 = "01zqplp8yb0xnl54963n0zkz66rf3hn2x3i255jlhdhx1c43jba7"; 12 + }; 13 + 14 + buildInputs = [ perlPackages.perl ]; 15 + 16 + installPhase = '' 17 + mkdir -p $out/bin 18 + cp tes3cmd $out/bin/tes3cmd 19 + ''; 20 + 21 + meta = with lib; { 22 + description = "A command line tool for examining and modifying plugins for the Elder Scrolls game Morrowind by Bethesda Softworks."; 23 + homepage = "https://github.com/john-moonsugar/tes3cmd"; 24 + license = licenses.mit; 25 + maintainers = [ maintainers.marius851000 ]; 26 + platforms = platforms.linux; 27 + }; 28 + }
+36
pkgs/games/tr-patcher/default.nix
···
··· 1 + { stdenv, lib, fetchurl, fetchzip, jre, makeWrapper }: 2 + 3 + let 4 + translation-file = fetchurl { 5 + url = "https://gitlab.com/bmwinger/tr-patcher/-/raw/master/lib/Translation.txt?inline=false"; 6 + sha256 = "136zd2s73b4n1w2n34wxi656bm448748nn3y7a64fd89ysg9n7n8"; 7 + }; 8 + in 9 + stdenv.mkDerivation rec { 10 + pname = "tr-patcher"; 11 + version = "1.0.5"; 12 + 13 + # use the pre compiled source, as compilation is a bit complex 14 + src = fetchzip { 15 + url = "https://gitlab.com/bmwinger/tr-patcher/uploads/b57899980b2351c136393f02977c4fab/tr-patcher-shadow.zip"; 16 + sha256 = "0va7nbmlgf3p2nc0z2b9n1285y4q5rpyjr4w93rdnx38wrhinxnw"; 17 + }; 18 + 19 + nativeBuildInputs = [ makeWrapper ]; 20 + 21 + installPhase = '' 22 + install -Dm644 lib/tr-patcher-all.jar $out/lib/tr-patcher.jar 23 + install -Dm644 ${translation-file} $out/lib/Translation.txt 24 + mkdir -p $out/bin 25 + makeWrapper ${jre}/bin/java $out/bin/tr-patcher \ 26 + --add-flags "-jar $out/lib/tr-patcher.jar" 27 + ''; 28 + 29 + meta = with lib; { 30 + description = "Allow to update dependancies of the Tamriel-Data mod for morrowind"; 31 + homepage = "https://gitlab.com/bmwinger/tr-patcher"; 32 + license = licenses.gpl3; 33 + maintainers = [ maintainers.marius851000 ]; 34 + platforms = platforms.linux; 35 + }; 36 + }
+8
pkgs/top-level/all-packages.nix
··· 2342 2343 patdiff = callPackage ../tools/misc/patdiff { }; 2344 2345 pbpst = callPackage ../applications/misc/pbpst { }; 2346 2347 pbzx = callPackage ../tools/compression/pbzx { }; ··· 25326 openmw = libsForQt5.callPackage ../games/openmw { }; 25327 25328 openmw-tes3mp = libsForQt5.callPackage ../games/openmw/tes3mp.nix { }; 25329 25330 openraPackages = import ../games/openra pkgs; 25331
··· 2342 2343 patdiff = callPackage ../tools/misc/patdiff { }; 2344 2345 + patool = with python3Packages; toPythonApplication patool; 2346 + 2347 pbpst = callPackage ../applications/misc/pbpst { }; 2348 2349 pbzx = callPackage ../tools/compression/pbzx { }; ··· 25328 openmw = libsForQt5.callPackage ../games/openmw { }; 25329 25330 openmw-tes3mp = libsForQt5.callPackage ../games/openmw/tes3mp.nix { }; 25331 + 25332 + portmod = callPackage ../games/portmod { }; 25333 + 25334 + tr-patcher = callPackage ../games/tr-patcher { }; 25335 + 25336 + tes3cmd = callPackage ../games/tes3cmd { }; 25337 25338 openraPackages = import ../games/openra pkgs; 25339
+10
pkgs/top-level/python-packages.nix
··· 774 775 bap = callPackage ../development/python-modules/bap { bap = pkgs.ocaml-ng.ocamlPackages_4_07.bap; }; 776 777 base58 = callPackage ../development/python-modules/base58 { }; 778 779 baselines = callPackage ../development/python-modules/baselines { }; ··· 4364 4365 pathtools = callPackage ../development/python-modules/pathtools { }; 4366 4367 patsy = callPackage ../development/python-modules/patsy { }; 4368 4369 paver = callPackage ../development/python-modules/paver { }; ··· 5259 5260 pyparted = callPackage ../development/python-modules/pyparted { }; 5261 5262 pypcap = callPackage ../development/python-modules/pypcap { }; 5263 5264 pypdf2 = callPackage ../development/python-modules/pypdf2 { }; ··· 5835 5836 python-rtmidi = callPackage ../development/python-modules/python-rtmidi { }; 5837 5838 python-simple-hipchat = callPackage ../development/python-modules/python-simple-hipchat { }; 5839 python_simple_hipchat = self.python-simple-hipchat; 5840 ··· 6103 recaptcha_client = callPackage ../development/python-modules/recaptcha_client { }; 6104 6105 recommonmark = callPackage ../development/python-modules/recommonmark { }; 6106 6107 redis = callPackage ../development/python-modules/redis { }; 6108
··· 774 775 bap = callPackage ../development/python-modules/bap { bap = pkgs.ocaml-ng.ocamlPackages_4_07.bap; }; 776 777 + baron = callPackage ../development/python-modules/baron { }; 778 + 779 base58 = callPackage ../development/python-modules/base58 { }; 780 781 baselines = callPackage ../development/python-modules/baselines { }; ··· 4366 4367 pathtools = callPackage ../development/python-modules/pathtools { }; 4368 4369 + patool = callPackage ../development/python-modules/patool { }; 4370 + 4371 patsy = callPackage ../development/python-modules/patsy { }; 4372 4373 paver = callPackage ../development/python-modules/paver { }; ··· 5263 5264 pyparted = callPackage ../development/python-modules/pyparted { }; 5265 5266 + pypblib = callPackage ../development/python-modules/pypblib { }; 5267 + 5268 pypcap = callPackage ../development/python-modules/pypcap { }; 5269 5270 pypdf2 = callPackage ../development/python-modules/pypdf2 { }; ··· 5841 5842 python-rtmidi = callPackage ../development/python-modules/python-rtmidi { }; 5843 5844 + python-sat = callPackage ../development/python-modules/python-sat { }; 5845 + 5846 python-simple-hipchat = callPackage ../development/python-modules/python-simple-hipchat { }; 5847 python_simple_hipchat = self.python-simple-hipchat; 5848 ··· 6111 recaptcha_client = callPackage ../development/python-modules/recaptcha_client { }; 6112 6113 recommonmark = callPackage ../development/python-modules/recommonmark { }; 6114 + 6115 + redbaron = callPackage ../development/python-modules/redbaron { }; 6116 6117 redis = callPackage ../development/python-modules/redis { }; 6118