It seems that ledger-autosync is broken in nixpkgs-unstable and I would like to fix it:
$ nix-build -A python3Packages.ledger-autosync
...
Finished executing setuptoolsBuildPhase
installing
Executing pipInstallPhase
/build/source/dist /build/source
Processing ./ledger_autosync-1.0.2-py3-none-any.whl
Collecting ofxparse@ https://github.com/jseutter/ofxparse/tarball/3236cfd96434feb6bc79a8b66f3400f18e2ad3c4
... several network-related errors ...
builder for '/nix/store/41jw86sg0lrfr1ggi6axq9bsbn1bbrys-ledger-autosync-1.0.2-0b674c5.drv' failed with exit code 1
error: build of '/nix/store/41jw86sg0lrfr1ggi6axq9bsbn1bbrys-ledger-autosync-1.0.2-0b674c5.drv' failed
Nevertheless, the ledger-autosync’s Nix definition references a dependency to ofxparse
:
{ lib, python3Packages, fetchFromGitHub, ledger, hledger, useLedger ? true, useHledger ? true }:
python3Packages.buildPythonApplication rec {
pname = "ledger-autosync";
version = "1.0.2-0b674c5";
# no tests included in PyPI tarball
src = fetchFromGitHub {
owner = "egh";
repo = "ledger-autosync";
rev = "0b674c57c833f75b1a36d8caf78e1567c8e2180c";
sha256 = "0q404gr85caib5hg83cnmgx4684l72w9slxyxrwsiwhlf7gm443q";
};
propagatedBuildInputs = with python3Packages; [
...
ofxclient
ofxhome
ofxparse
...
] ++ lib.optional useLedger ledger
++ lib.optional useHledger hledger;
# Checks require ledger as a python package,
# ledger does not support python3 while ledger-autosync requires it.
checkInputs = with python3Packages; [ ledger hledger nose mock ];
checkPhase = ''
nosetests -a generic -a ledger -a hledger
'';
meta = with lib; {... };
}
ofxparse
builds fine.
Why is building ledger-autosync requiring the network for a package in the build inputs?