nixpkgs/pkgs/tools/misc/pubs/default.nix

52 lines
1.3 KiB
Nix
Raw Normal View History

2018-04-06 19:01:59 +03:00
{ stdenv, fetchFromGitHub, python3 }:
2018-01-08 16:09:53 +03:00
2018-04-06 19:01:59 +03:00
let
python3Packages = (python3.override {
packageOverrides = self: super: {
# https://github.com/pubs/pubs/issues/131
pyfakefs = super.pyfakefs.overridePythonAttrs (oldAttrs: rec {
version = "3.3";
src = self.fetchPypi {
pname = "pyfakefs";
inherit version;
sha256 = "e3e198dea5e0d5627b73ba113fd0b139bb417da6bc15d920b2c873143d2f12a6";
};
postPatch = "";
doCheck = false;
});
};
}).pkgs;
in python3Packages.buildPythonApplication rec {
pname = "pubs";
2018-01-08 16:09:53 +03:00
version = "0.7.0";
src = fetchFromGitHub {
owner = "pubs";
repo = "pubs";
rev = "v${version}";
sha256 = "0n5wbjx9wqy6smfg625mhma739jyg7c92766biaiffp0a2bzr475";
};
propagatedBuildInputs = with python3Packages; [
dateutil configobj bibtexparser pyyaml requests beautifulsoup4
];
2018-04-06 19:01:59 +03:00
checkInputs = with python3Packages; [ pyfakefs ddt ];
2018-01-08 16:09:53 +03:00
preCheck = ''
# API tests require networking
rm tests/test_apis.py
# pyfakefs works weirdly in the sandbox
export HOME=/
'';
meta = with stdenv.lib; {
description = "Command-line bibliography manager";
homepage = https://github.com/pubs/pubs;
license = licenses.lgpl3;
maintainers = with maintainers; [ gebner ];
};
}