4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
62 lines
1.1 KiB
Nix
62 lines
1.1 KiB
Nix
{ lib, stdenv, buildPythonPackage, fetchPypi, isPyPy
|
|
, dnspython
|
|
, geoip2
|
|
, ipython
|
|
, praw
|
|
, pyenchant
|
|
, pygeoip
|
|
, pytestCheckHook
|
|
, python
|
|
, pytz
|
|
, sqlalchemy
|
|
, xmltodict
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "sopel";
|
|
version = "7.0.7";
|
|
disabled = isPyPy;
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "84d42708d176aecfb7b95299af0e484896f5f80df61f43c92d8e7a53de0b2099";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
dnspython
|
|
geoip2
|
|
ipython
|
|
praw
|
|
pyenchant
|
|
pygeoip
|
|
pytz
|
|
sqlalchemy
|
|
xmltodict
|
|
];
|
|
|
|
# remove once https://github.com/sopel-irc/sopel/pull/1653 lands
|
|
postPatch = ''
|
|
substituteInPlace requirements.txt \
|
|
--replace "praw>=4.0.0,<6.0.0" "praw"
|
|
'';
|
|
|
|
checkInputs = [ pytestCheckHook ];
|
|
|
|
preCheck = ''
|
|
export TESTDIR=$(mktemp -d)
|
|
cp -R ./test $TESTDIR
|
|
pushd $TESTDIR
|
|
'';
|
|
|
|
postCheck = ''
|
|
popd
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Simple and extensible IRC bot";
|
|
homepage = "http://sopel.chat";
|
|
license = licenses.efl20;
|
|
maintainers = with maintainers; [ mog ];
|
|
};
|
|
}
|