Merge pull request #117570 from FRidh/python2alias

Python: be explicit on whether it is python2 or python3 that is used
This commit is contained in:
Frederik Rietdijk
2021-03-25 13:26:35 +01:00
committed by GitHub
70 changed files with 260 additions and 170 deletions
+5 -3
View File
@@ -1,4 +1,4 @@
{ stdenv, lib, fetchgit, python, gyp, util-linux }:
{ stdenv, lib, fetchgit, python2, util-linux }:
stdenv.mkDerivation {
pname = "bud";
@@ -11,10 +11,12 @@ stdenv.mkDerivation {
sha256 = "08yr6l4lc2m6rng06253fcaznf6sq0v053wfr8bbym42c32z0xdh";
};
buildInputs = [
python gyp
nativeBuildInputs = [
python2 python2.pkgs.gyp
] ++ lib.optional stdenv.isLinux util-linux;
strictDeps = true;
buildPhase = ''
python ./gyp_bud -f make
make -C out
@@ -1,4 +1,4 @@
{ lib, stdenv, fetchgit, python, pythonPackages, makeWrapper }:
{ lib, stdenv, fetchgit, python3Packages, makeWrapper }:
stdenv.mkDerivation {
@@ -12,7 +12,9 @@ stdenv.mkDerivation {
nativeBuildInputs = [ makeWrapper ];
propagatedBuildInputs = with pythonPackages; [ requests vobject lxml ];
propagatedBuildInputs = with python3Packages; [ requests vobject lxml ];
strictDeps = true;
doCheck = false; # no test
@@ -20,7 +22,7 @@ stdenv.mkDerivation {
mkdir -p $out/bin
cp $src/carddav-util.py $out/bin
pythondir="$out/lib/${python.libPrefix}/site-packages"
pythondir="$out/lib/${python3Packages.python.sitePackages}"
mkdir -p "$pythondir"
cp $src/carddav.py "$pythondir"
'';
+4 -2
View File
@@ -1,4 +1,4 @@
{lib, stdenv, fetchurl, which, autoreconfHook, pkg-config, vala, python, libsearpc, libzdb, libuuid, libevent, sqlite, openssl}:
{lib, stdenv, fetchurl, which, autoreconfHook, pkg-config, vala, python3, libsearpc, libzdb, libuuid, libevent, sqlite, openssl}:
stdenv.mkDerivation rec {
version = "6.1.8";
@@ -10,11 +10,13 @@ stdenv.mkDerivation rec {
sha256 = "0qlpnrz30ldrqnvbj59d54qdghxpxc5lsq6kf3dw2b93jnzkcmmm";
};
nativeBuildInputs = [ pkg-config which autoreconfHook vala python ];
nativeBuildInputs = [ pkg-config which autoreconfHook vala python3 libsearpc ];
propagatedBuildInputs = [ libsearpc libzdb libuuid libevent sqlite openssl ];
configureFlags = [ "--enable-server" ];
strictDeps = true;
meta = with lib; {
homepage = "https://github.com/haiwen/ccnet";
description = "A framework for writing networked applications in C";
+3 -3
View File
@@ -1,7 +1,7 @@
{ lib, stdenv, fetchFromGitHub, python
{ lib, stdenv, fetchFromGitHub, python2
, unzip, makeWrapper }:
let
python' = python.override {
python' = python2.override {
packageOverrides = self: super: {
docker = self.buildPythonPackage rec {
name = "docker-${version}";
@@ -82,7 +82,7 @@ in stdenv.mkDerivation rec {
cat > $out/bin/dd-jmxfetch <<EOF
#!/usr/bin/env bash
exec ${python}/bin/python $out/agent/jmxfetch.py $@
exec ${python'.interpreter} $out/agent/jmxfetch.py $@
EOF
chmod a+x $out/bin/dd-jmxfetch