buildPythonPackage: Simplify attribute inheritance.
Suggested by Eelco Dolstra. svn path=/nixpkgs/trunk/; revision=15731
This commit is contained in:
parent
1635ec4bdf
commit
010edd3739
@ -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";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user