mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 18:33:00 +00:00
936092be1a
When I ran rpl, I got the error ``` ModuleNotFoundError: No module named 'chardet' ``` but making this change to use propagatedBuildInputs fixed it, as described at https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/python.section.md#handling-dependencies-handling-dependencies
39 lines
895 B
Nix
39 lines
895 B
Nix
{ lib, fetchFromGitHub, python3Packages }:
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
pname = "rpl";
|
|
version = "1.10";
|
|
|
|
# Tests not included in pip package.
|
|
doCheck = false;
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "rrthomas";
|
|
repo = "rpl";
|
|
rev = "4467bd46a7a798f738247a7f090c1505176bd597";
|
|
sha256 = "0yf3pc3fws4nnh4nd8d3jpglmsyi69d17qqgpcnkpqca5l4cd25w";
|
|
};
|
|
|
|
patches = [
|
|
./remove-argparse-manpage.diff # quickfix for ImportError: No module named build_manpages.build_manpages
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
#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/rrthomas/rpl";
|
|
license = licenses.gpl2;
|
|
maintainers = with maintainers; [ teto ];
|
|
};
|
|
}
|