buildPythonPackage: Simplify attribute inheritance.

Suggested by Eelco Dolstra.

svn path=/nixpkgs/trunk/; revision=15731
This commit is contained in:
Ludovic Courtès 2009-05-26 10:03:33 +00:00
parent 1635ec4bdf
commit 010edd3739

View File

@ -5,7 +5,7 @@
{ python, setuptools, makeWrapper, lib }: { python, setuptools, makeWrapper, lib }:
attrs: { name, src, meta, patches ? [], doCheck ? true, ... } @ attrs:
let let
# Return the list of recursively propagated build inputs of PKG. # Return the list of recursively propagated build inputs of PKG.
@ -20,7 +20,7 @@ let
in in
python.stdenv.mkDerivation rec { python.stdenv.mkDerivation rec {
inherit (attrs) src meta; inherit src meta patches doCheck;
name = "python-" + attrs.name; name = "python-" + attrs.name;
@ -32,18 +32,8 @@ python.stdenv.mkDerivation rec {
then attrs.propagatedBuildInputs then attrs.propagatedBuildInputs
else []); else []);
patches =
(if attrs ? patches
then attrs.patches
else []);
buildPhase = "true"; buildPhase = "true";
doCheck =
(if attrs ? doCheck
then attrs.doCheck
else true);
# Many packages, but not all, support this. # Many packages, but not all, support this.
checkPhase = "python setup.py test"; checkPhase = "python setup.py test";