From 9f7ed5ed1044aad8804fbbed6c2e928461e4cece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 26 Apr 2018 16:36:35 +0200 Subject: [PATCH] python.pkgs.pkgconfig: move expression --- .../python-modules/pkgconfig/default.nix | 25 ++++++++++++++++++ pkgs/top-level/python-packages.nix | 26 ++----------------- 2 files changed, 27 insertions(+), 24 deletions(-) create mode 100644 pkgs/development/python-modules/pkgconfig/default.nix diff --git a/pkgs/development/python-modules/pkgconfig/default.nix b/pkgs/development/python-modules/pkgconfig/default.nix new file mode 100644 index 000000000000..b810213cce92 --- /dev/null +++ b/pkgs/development/python-modules/pkgconfig/default.nix @@ -0,0 +1,25 @@ +{ lib, buildPythonPackage, fetchPypi, nose, pkgconfig }: + +buildPythonPackage rec { + pname = "pkgconfig"; + version = "1.3.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"; + }; + + checkInputs = [ nose ]; + + propagatedBuildInputs = [ pkgconfig ]; + + checkPhase = '' + nosetests + ''; + + meta = with lib; { + description = "Interface Python with pkg-config"; + homepage = https://github.com/matze/pkgconfig; + license = licenses.mit; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b9355c62c506..974937fac8c6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9992,30 +9992,8 @@ in { inherit (pkgs.xorg) libX11; }; - pkgconfig = buildPythonPackage rec { - name = "pkgconfig-${version}"; - version = "1.3.1"; - - src = pkgs.fetchurl { - url = "mirror://pypi/p/pkgconfig/${name}.tar.gz"; - sha256 = "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"; - }; - - buildInputs = with self; [ nose ]; - - propagatedBuildInputs = with self; [pkgs.pkgconfig]; - - meta = { - description = "Interface Python with pkg-config"; - homepage = https://github.com/matze/pkgconfig; - license = licenses.mit; - }; - - # nosetests needs to be run explicitly. - checkPhase = '' - nosetests - ''; - + pkgconfig = callPackage ../development/python-modules/pkgconfig { + inherit (pkgs) pkgconfig; }; plumbum = callPackage ../development/python-modules/plumbum { };