Merge pull request #76488 from jtojnar/more-python-cleanups

Another batch of Python 2 clean-ups
This commit is contained in:
Frederik Rietdijk 2020-01-06 12:00:36 +01:00 committed by GitHub
commit 8fff915659
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 57 additions and 39 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, fftwSinglePrec, lv2, pkgconfig, python, wafHook }:
{ stdenv, fetchurl, fftwSinglePrec, lv2, pkgconfig, wafHook }:
stdenv.mkDerivation rec {
pname = "mda-lv2";
@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ pkgconfig wafHook ];
buildInputs = [ fftwSinglePrec lv2 python ];
buildInputs = [ fftwSinglePrec lv2 ];
meta = with stdenv.lib; {
homepage = http://drobilla.net/software/mda-lv2/;

View File

@ -1,10 +1,10 @@
{ stdenv, fetchurl, pkgconfig, intltool, perlPackages
, goffice, gnome3, wrapGAppsHook, gtk3, bison, pythonPackages
, goffice, gnome3, wrapGAppsHook, gtk3, bison, python3Packages
, itstool
}:
let
inherit (pythonPackages) python pygobject3;
inherit (python3Packages) python pygobject3;
in stdenv.mkDerivation rec {
pname = "gnumeric";
version = "1.12.46";

View File

@ -1,5 +1,5 @@
{ stdenv, lib, fetchgit, flex, bison, pkgconfig, which
, pythonSupport ? stdenv.buildPlatform == stdenv.hostPlatform, python, swig
, pythonSupport ? false, python, swig
}:
stdenv.mkDerivation rec {

View File

@ -21,7 +21,6 @@
, libsecret
, db
, python3
, python
, readline
, gtk3
}:
@ -51,7 +50,6 @@ stdenv.mkDerivation rec {
meson
ninja
pkgconfig
python
python3
vala
];

View File

@ -4,11 +4,10 @@
, meson
, ninja
, pkgconfig
, python
, python3
, gst-plugins-base
, libxml2
, flex
, perl
, gettext
, gobject-introspection
}:
@ -34,9 +33,8 @@ stdenv.mkDerivation rec {
pkgconfig
gettext
gobject-introspection
python
python3
flex
perl
];
buildInputs = [

View File

@ -3,7 +3,7 @@
, meson
, ninja
, pkgconfig
, python
, python3
, gst-plugins-base
, orc
, gettext
@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
ninja
gettext
pkgconfig
python
python3
];
buildInputs = [

View File

@ -3,7 +3,7 @@
, pkgconfig
, gstreamer
, gst-plugins-base
, python
, python3
, gobject-introspection
, json-glib
}:
@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
];
buildInputs = [
python
python3
json-glib
];

View File

@ -1,8 +1,5 @@
{ stdenv, autoreconfHook, fetchFromGitHub, pkgconfig, python2Packages, glib }:
{ stdenv, autoreconfHook, fetchFromGitHub, pkgconfig, enablePython ? false, python, glib }:
let
inherit (python2Packages) python cython;
in
stdenv.mkDerivation rec {
pname = "libplist";
version = "2019-04-04";
@ -14,18 +11,23 @@ stdenv.mkDerivation rec {
sha256 = "19yw80yblq29i2jx9yb7bx0lfychy9dncri3fk4as35kq5bf26i8";
};
outputs = ["bin" "dev" "out" "py"];
outputs = ["bin" "dev" "out" ] ++ stdenv.lib.optional enablePython "py";
nativeBuildInputs = [
pkgconfig
python
cython
autoreconfHook
] ++ stdenv.lib.optionals enablePython [
python
python.pkgs.cython
];
configureFlags = stdenv.lib.optionals (!enablePython) [
"--without-cython"
];
propagatedBuildInputs = [ glib ];
postFixup = ''
postFixup = stdenv.lib.optionalString enablePython ''
moveToOutput "lib/${python.libPrefix}" "$py"
'';

View File

@ -1,4 +1,4 @@
{ stdenv, lib, fetchFromGitHub, autoreconfHook, perl, cracklib, python }:
{ stdenv, lib, fetchFromGitHub, autoreconfHook, perl, cracklib, python3 }:
stdenv.mkDerivation rec {
pname = "libpwquality";
@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ autoreconfHook perl ];
buildInputs = [ cracklib python ];
buildInputs = [ cracklib python3 ];
meta = with lib; {
description = "Password quality checking and random password generation library";

View File

@ -1,11 +1,11 @@
{ qtModule, lib, python2, qtbase, qtsvg }:
{ qtModule, lib, python3, qtbase, qtsvg }:
with lib;
qtModule {
name = "qtdeclarative";
qtInputs = [ qtbase qtsvg ];
nativeBuildInputs = [ python2 ];
nativeBuildInputs = [ python3 ];
outputs = [ "out" "dev" "bin" ];
preConfigure = ''
NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QML2_IMPORT_PREFIX=\"$qtQmlPrefix\""

View File

@ -1,5 +1,5 @@
{ stdenv, lib, fetchgit, darwin, writeText
, git, ninja, python2 }:
, git, ninja, python3 }:
let
rev = "64b846c96daeb3eaf08e26d8a84d8451c6cb712b";
@ -25,7 +25,7 @@ stdenv.mkDerivation {
inherit rev sha256;
};
nativeBuildInputs = [ ninja python2 git ];
nativeBuildInputs = [ ninja python3 git ];
buildInputs = lib.optionals stdenv.isDarwin (with darwin; with apple_sdk.frameworks; [
libobjc
cctools

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, libgcrypt, libnl, pkgconfig, python2Packages, wireless-regdb }:
{ stdenv, fetchurl, fetchpatch, libgcrypt, libnl, pkgconfig, python3, wireless-regdb }:
stdenv.mkDerivation rec {
pname = "crda";
@ -9,9 +9,24 @@ stdenv.mkDerivation rec {
url = "http://kernel.org/pub/software/network/crda/crda-${version}.tar.xz";
};
patches = [
# Switch to Python 3
# https://lore.kernel.org/linux-wireless/1437542484-23409-1-git-send-email-ahmed.taahir@gmail.com/
(fetchpatch {
url = "https://lore.kernel.org/linux-wireless/1437542484-23409-2-git-send-email-ahmed.taahir@gmail.com/raw";
sha256 = "0s2n340cgaasvg1k8g9v8xjrbh4y2mcgrhdmv97ja2fs8xjcjbf1";
})
(fetchpatch {
url = "https://lore.kernel.org/linux-wireless/1437542484-23409-3-git-send-email-ahmed.taahir@gmail.com/raw";
sha256 = "01dlfw7kqhyx025jxq2l75950b181p9r7i9zkflcwvbzzdmx59md";
})
];
buildInputs = [ libgcrypt libnl ];
nativeBuildInputs = [
pkgconfig python2Packages.m2crypto python2Packages.python
pkgconfig
python3
python3.pkgs.pycrypto
];
postPatch = ''
@ -37,6 +52,11 @@ stdenv.mkDerivation rec {
doCheck = true;
checkTarget = "verify";
postInstall = ''
# The patch installs build header
rm $out/include/reglib/keys-gcrypt.h
'';
meta = with stdenv.lib; {
description = "Linux wireless Central Regulatory Domain Agent";
longDescription = ''

View File

@ -1,5 +1,5 @@
{ stdenv, file, lib, fetchFromGitHub, autoreconfHook, bison, flex, pkgconfig
, pythonSupport ? stdenv.buildPlatform == stdenv.hostPlatform, swig ? null, python}:
, pythonSupport ? false, swig ? null, python}:
stdenv.mkDerivation rec {
pname = "libnl";

View File

@ -1,6 +1,6 @@
{ stdenv, fetchurl, fetchpatch
, pkgconfig, autoreconfHook
, gmp, python, iptables, ldns, unbound, openssl, pcsclite, glib
, gmp, python3, iptables, ldns, unbound, openssl, pcsclite, glib
, openresolv
, systemd, pam
, curl
@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig autoreconfHook ];
buildInputs =
[ curl gmp python ldns unbound openssl pcsclite ]
[ curl gmp python3 ldns unbound openssl pcsclite ]
++ optionals enableTNC [ trousers sqlite libxml2 ]
++ optionals stdenv.isLinux [ systemd.dev pam iptables ]
++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ SystemConfiguration ])

View File

@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub, lib
, intltool, glib, pkgconfig, polkit, python, sqlite
, intltool, glib, pkgconfig, polkit, python3, sqlite
, gobject-introspection, vala, gtk-doc, autoreconfHook, autoconf-archive
# TODO: set enableNixBackend to true, as soon as it builds
, nix, enableNixBackend ? false, boost
@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
sha256 = "02wq3jw3mkdld90irh5vdfd5bri2g1p89mhrmj56kvif1fqak46x";
};
buildInputs = [ glib polkit python gobject-introspection ]
buildInputs = [ glib polkit python3 gobject-introspection ]
++ lib.optional enableSystemd systemd
++ lib.optional enableBashCompletion bash-completion;
propagatedBuildInputs = [ sqlite nix boost ];

View File

@ -1,5 +1,5 @@
{ lib, fetchurl, stdenv, ncurses,
IOKit, python }:
IOKit, python3 }:
stdenv.mkDerivation rec {
pname = "htop";
@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
sha256 = "0mrwpb3cpn3ai7ar33m31yklj64c3pp576vh1naqff6f21pq5mnr";
};
nativeBuildInputs = [ python ];
nativeBuildInputs = [ python3 ];
buildInputs =
[ ncurses ] ++
lib.optionals stdenv.isDarwin [ IOKit ];

View File

@ -3932,7 +3932,7 @@ in {
libsavitar = callPackage ../development/python-modules/libsavitar { };
libplist = disabledIf isPy3k
(toPythonModule (pkgs.libplist.override{python2Packages=self; })).py;
(toPythonModule (pkgs.libplist.override { enablePython = true; inherit python; })).py;
libxml2 = (toPythonModule (pkgs.libxml2.override{pythonSupport=true; inherit python;})).py;