diff options
author | milahu <milahu@gmail.com> | 2021-10-03 00:37:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-03 00:37:35 +0200 |
commit | a4df6db57dd68f7d5dad5dd56aadae57327048d2 (patch) | |
tree | 9764f3760fc141d8412c0178ad9dc9a74e8ea079 | |
parent | ae7916107ef2160eb4ae7b76c5b5f5a29d1158f0 (diff) |
rpl: update to 4467bd4 (#140161)
* rpl: update to 1.10 Changes upstream as discussed in https://github.com/kcoyner/rpl/issues/7 - manpage missing because of a missing python package.
-rw-r--r-- | pkgs/tools/text/rpl/default.nix | 33 | ||||
-rw-r--r-- | pkgs/tools/text/rpl/remove-argparse-manpage.diff | 27 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 4 |
3 files changed, 54 insertions, 10 deletions
diff --git a/pkgs/tools/text/rpl/default.nix b/pkgs/tools/text/rpl/default.nix index 97a30211621c1..ee2fcd72ca9ab 100644 --- a/pkgs/tools/text/rpl/default.nix +++ b/pkgs/tools/text/rpl/default.nix @@ -1,22 +1,41 @@ -{ lib, fetchFromGitHub, pythonPackages }: +{ lib, fetchFromGitHub, python3Packages }: -pythonPackages.buildPythonApplication rec { +let + rev = "4467bd46a7a798f738247a7f090c1505176bd597"; + sha256 = "0yf3pc3fws4nnh4nd8d3jpglmsyi69d17qqgpcnkpqca5l4cd25w"; +in + +python3Packages.buildPythonApplication rec { pname = "rpl"; - version = "1.5.7"; + version = "1.10"; # Tests not included in pip package. doCheck = false; + src = fetchFromGitHub { - owner = "kcoyner"; + owner = "rrthomas"; repo = "rpl"; - rev = "v${version}"; - sha256 = "1xhpgcmq91ivy9ijfyz5ilg51m7fz8ar2077r7gq246j8gbf8ggr"; + inherit rev sha256; }; + patches = [ + ./remove-argparse-manpage.diff # quickfix for ImportError: No module named build_manpages.build_manpages + ]; + + buildInputs = [ + #python3Packages.argparse-manpage # TODO + python3Packages.chardet + ]; + + installPhase = '' + mkdir -p $out/bin + mv rpl $out/bin + ''; + meta = with lib; { description = "Replace strings in files"; - homepage = "https://github.com/kcoyner/rpl"; + homepage = "https://github.com/rrthomas/rpl"; license = licenses.gpl2; maintainers = with maintainers; [ teto ]; }; diff --git a/pkgs/tools/text/rpl/remove-argparse-manpage.diff b/pkgs/tools/text/rpl/remove-argparse-manpage.diff new file mode 100644 index 0000000000000..8d32976996828 --- /dev/null +++ b/pkgs/tools/text/rpl/remove-argparse-manpage.diff @@ -0,0 +1,27 @@ +diff --git a/setup.cfg b/setup.cfg +index 12e9198..38e5376 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -15,7 +15,6 @@ classifiers = + [options] + scripts = rpl + python_requires = >=3 +-setup_requires = argparse-manpage + install_requires = chardet + + [options.extras_require] +diff --git a/setup.py b/setup.py +index 96cade6..879fc44 100644 +--- a/setup.py ++++ b/setup.py +@@ -1,9 +1,8 @@ +-from build_manpages.build_manpages import get_install_cmd + from setuptools import setup + from setuptools.command.install import install + + setup( + cmdclass={ +- 'install': get_install_cmd(install), ++ 'install': install, + } + ) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b8cb714fa7b23..d18d668f57487 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -32109,9 +32109,7 @@ with pkgs; inherit glib gtk3 gobject-introspection wrapGAppsHook; }; - rpl = callPackage ../tools/text/rpl { - pythonPackages = python3Packages; - }; + rpl = callPackage ../tools/text/rpl { }; ricty = callPackage ../data/fonts/ricty { }; |