mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-24 10:56:56 +00:00
ced21f5e1a
The `buildPython*` function computes name from `pname` and `version`. This change removes `name` attribute from all expressions in `pkgs/development/python-modules`. While at it, some other minor changes were made as well, such as replacing `fetchurl` calls with `fetchPypi`.
48 lines
1.2 KiB
Nix
48 lines
1.2 KiB
Nix
{ stdenv, buildPythonPackage, fetchFromGitHub, pytest, six, clint, pyyaml, docopt
|
|
, requests, jsonpatch, args, schema, responses, backports_csv }:
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "internetarchive";
|
|
version = "1.7.2";
|
|
|
|
# Can't use pypi, data files for tests missing
|
|
src = fetchFromGitHub {
|
|
owner = "jjjake";
|
|
repo = "internetarchive";
|
|
rev = "v${version}";
|
|
sha256 = "1cijagy22qi8ydrvizqmi1whnc3qr94yk0910lwgpxjywcygggir";
|
|
};
|
|
# It is hardcoded to specific versions, I don't know why.
|
|
preConfigure = ''
|
|
sed "s/schema>=.*/schema>=0.4.0',/" -i setup.py
|
|
sed "/backports.csv/d" -i setup.py
|
|
'';
|
|
|
|
#phases = [ "unpackPhase" "configurePhase" "installPhase" "fixupPhase" "installCheckPhase" ];
|
|
buildInputs = [ pytest responses ];
|
|
propagatedBuildInputs = [
|
|
six
|
|
clint
|
|
pyyaml
|
|
docopt
|
|
requests
|
|
jsonpatch
|
|
args
|
|
schema
|
|
backports_csv
|
|
];
|
|
|
|
# Tests disabled because ia binary doesn't exist when tests run
|
|
doCheck = false;
|
|
|
|
checkPhase = "pytest tests";
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "A python wrapper for the various Internet Archive APIs";
|
|
homepage = https://github.com/jjjake/internetarchive;
|
|
license = licenses.agpl3;
|
|
};
|
|
}
|