1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 13:41:26 +00:00
nixpkgs/pkgs/build-support/build-setupcfg/default.nix
Shea Levy 603a369b89
Revert "buildSetupcfg: Include unzip for zip sources."
Misunderstood the error I was seeing.

This reverts commit 0d3eb70133.
2018-04-14 20:12:22 -04:00

26 lines
877 B
Nix

# Build a python package from info made available by setupcfg2nix.
#
# * src: The source of the package.
# * info: The package information generated by setupcfg2nix.
# * meta: Standard nixpkgs metadata.
# * application: Whether this package is a python library or an
# application which happens to be written in python.
# * doCheck: Whether to run the test suites.
pythonPackages:
{ src, info, meta ? {}, application ? false, doCheck ? true }: let
build = if application
then pythonPackages.buildPythonApplication
else pythonPackages.buildPythonPackage;
in build {
inherit (info) pname version;
inherit src meta doCheck;
nativeBuildInputs = map (p: pythonPackages.${p}) (
(info.setup_requires or []) ++
(if doCheck then (info.tests_require or []) else []));
propagatedBuildInputs = map (p: pythonPackages.${p})
(info.install_requires or []);
}