diff options
author | Frederik Rietdijk <freddyrietdijk@fridh.nl> | 2021-03-25 13:26:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-25 13:26:35 +0100 |
commit | 350f9bd822e1c5017482e6364dbafda36ff4157a (patch) | |
tree | 41f6c6c5f7ff38584f5091004c40cec14f908b00 /pkgs/tools | |
parent | c0e881852006b132236cbf0301bd1939bb50867e (diff) | |
parent | f0754b8ab8b4969ff49e2436c6c8f12120c13ad8 (diff) |
Merge pull request #117570 from FRidh/python2alias
Python: be explicit on whether it is python2 or python3 that is used
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/admin/chkcrontab/default.nix | 4 | ||||
-rw-r--r-- | pkgs/tools/compression/dtrx/default.nix | 15 | ||||
-rw-r--r-- | pkgs/tools/filesystems/cryfs/default.nix | 8 | ||||
-rw-r--r-- | pkgs/tools/graphics/blockhash/default.nix | 6 | ||||
-rw-r--r-- | pkgs/tools/graphics/escrotum/default.nix | 6 | ||||
-rw-r--r-- | pkgs/tools/misc/disper/default.nix | 6 | ||||
-rw-r--r-- | pkgs/tools/networking/bud/default.nix | 8 | ||||
-rw-r--r-- | pkgs/tools/networking/carddav-util/default.nix | 8 | ||||
-rw-r--r-- | pkgs/tools/networking/ccnet/default.nix | 6 | ||||
-rw-r--r-- | pkgs/tools/networking/dd-agent/5.nix | 6 | ||||
-rw-r--r-- | pkgs/tools/security/chipsec/default.nix | 4 | ||||
-rw-r--r-- | pkgs/tools/security/cipherscan/default.nix | 6 | ||||
-rw-r--r-- | pkgs/tools/system/evemu/default.nix | 8 | ||||
-rw-r--r-- | pkgs/tools/system/fio/default.nix | 6 | ||||
-rw-r--r-- | pkgs/tools/typesetting/biblatex-check/default.nix | 6 |
15 files changed, 66 insertions, 37 deletions
diff --git a/pkgs/tools/admin/chkcrontab/default.nix b/pkgs/tools/admin/chkcrontab/default.nix index bbf8d7eaeb1c..d91894f00063 100644 --- a/pkgs/tools/admin/chkcrontab/default.nix +++ b/pkgs/tools/admin/chkcrontab/default.nix @@ -1,6 +1,6 @@ -{ python, lib }: +{ python3, lib }: -with python.pkgs; +with python3.pkgs; buildPythonApplication rec { pname = "chkcrontab"; diff --git a/pkgs/tools/compression/dtrx/default.nix b/pkgs/tools/compression/dtrx/default.nix index 91d59a4de0f8..6c4f2f6e854e 100644 --- a/pkgs/tools/compression/dtrx/default.nix +++ b/pkgs/tools/compression/dtrx/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchurl, pythonPackages +{ lib, fetchurl, python2Packages , gnutar, unzip, lhasa, rpm, binutils, cpio, gzip, p7zip, cabextract, unrar, unshield , bzip2, xz, lzip # unzip is handled by p7zip @@ -11,7 +11,7 @@ let ++ lib.optional (unrarSupport) unrar ++ [ bzip2 xz lzip ]); -in pythonPackages.buildPythonApplication rec { +in python2Packages.buildPythonApplication rec { pname = "dtrx"; version = "7.1"; @@ -24,6 +24,17 @@ in pythonPackages.buildPythonApplication rec { wrapProgram "$out/bin/dtrx" --prefix PATH : "${archivers}" ''; + checkPhase = '' + python2 tests/compare.py + ''; + + checkInputs = with python2Packages; [ + pyyaml + ]; + + # custom test suite fails + doCheck = false; + meta = with lib; { description = "Do The Right Extraction: A tool for taking the hassle out of extracting archives"; homepage = "https://brettcsmith.org/2007/dtrx/"; diff --git a/pkgs/tools/filesystems/cryfs/default.nix b/pkgs/tools/filesystems/cryfs/default.nix index 3777c4e7cb16..eec257c44b73 100644 --- a/pkgs/tools/filesystems/cryfs/default.nix +++ b/pkgs/tools/filesystems/cryfs/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchFromGitHub, fetchpatch -, cmake, pkg-config, python, gtest +, cmake, pkg-config, python3, gtest , boost, cryptopp, curl, fuse, openssl }: @@ -44,9 +44,11 @@ stdenv.mkDerivation rec { --replace "(4.5L*1024*1024*1024)" "(0.5L*1024*1024*1024)" ''; - nativeBuildInputs = [ cmake gtest pkg-config python ]; + nativeBuildInputs = [ cmake pkg-config python3 ]; - buildInputs = [ boost cryptopp curl fuse openssl ]; + strictDeps = true; + + buildInputs = [ boost cryptopp curl fuse openssl gtest ]; cmakeFlags = [ "-DCRYFS_UPDATE_CHECKS:BOOL=FALSE" diff --git a/pkgs/tools/graphics/blockhash/default.nix b/pkgs/tools/graphics/blockhash/default.nix index a0ecdde3826c..b3426722f79f 100644 --- a/pkgs/tools/graphics/blockhash/default.nix +++ b/pkgs/tools/graphics/blockhash/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, python, pkg-config, imagemagick, wafHook }: +{ lib, stdenv, fetchFromGitHub, python2, pkg-config, imagemagick, wafHook }: stdenv.mkDerivation rec { pname = "blockhash"; @@ -11,9 +11,11 @@ stdenv.mkDerivation rec { sha256 = "0m7ikppl42iicgmwsb7baajmag7v0p1ab06xckifvrr0zm21bq9p"; }; - nativeBuildInputs = [ python pkg-config wafHook ]; + nativeBuildInputs = [ python2 pkg-config wafHook ]; buildInputs = [ imagemagick ]; + strictDeps = true; + meta = with lib; { homepage = "http://blockhash.io/"; description = '' diff --git a/pkgs/tools/graphics/escrotum/default.nix b/pkgs/tools/graphics/escrotum/default.nix index 4a887688c4f5..decb92615f97 100644 --- a/pkgs/tools/graphics/escrotum/default.nix +++ b/pkgs/tools/graphics/escrotum/default.nix @@ -1,9 +1,7 @@ -{ lib, fetchFromGitHub, buildPythonApplication -, pygtk -, numpy ? null +{ lib, python2Packages, fetchFromGitHub }: -buildPythonApplication { +with python2Packages; buildPythonApplication { name = "escrotum-2019-06-10"; src = fetchFromGitHub { diff --git a/pkgs/tools/misc/disper/default.nix b/pkgs/tools/misc/disper/default.nix index ecbf298132f6..3e78bc977324 100644 --- a/pkgs/tools/misc/disper/default.nix +++ b/pkgs/tools/misc/disper/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, python, xorg, makeWrapper }: +{ lib, stdenv, fetchFromGitHub, python2, xorg, makeWrapper }: stdenv.mkDerivation rec { pname = "disper"; @@ -13,7 +13,9 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper ]; - buildInputs = [ python ]; + strictDeps = true; + + buildInputs = [ python2 ]; preConfigure = '' export makeFlags="PREFIX=$out" diff --git a/pkgs/tools/networking/bud/default.nix b/pkgs/tools/networking/bud/default.nix index 724d25d49f93..7a4bd5adcba0 100644 --- a/pkgs/tools/networking/bud/default.nix +++ b/pkgs/tools/networking/bud/default.nix @@ -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 diff --git a/pkgs/tools/networking/carddav-util/default.nix b/pkgs/tools/networking/carddav-util/default.nix index 112a95eccc6e..300e03761a65 100644 --- a/pkgs/tools/networking/carddav-util/default.nix +++ b/pkgs/tools/networking/carddav-util/default.nix @@ -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" ''; diff --git a/pkgs/tools/networking/ccnet/default.nix b/pkgs/tools/networking/ccnet/default.nix index b8fd06798925..3293ebe25c83 100644 --- a/pkgs/tools/networking/ccnet/default.nix +++ b/pkgs/tools/networking/ccnet/default.nix @@ -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"; diff --git a/pkgs/tools/networking/dd-agent/5.nix b/pkgs/tools/networking/dd-agent/5.nix index af4ae7ed7697..f40ef295d138 100644 --- a/pkgs/tools/networking/dd-agent/5.nix +++ b/pkgs/tools/networking/dd-agent/5.nix @@ -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 diff --git a/pkgs/tools/security/chipsec/default.nix b/pkgs/tools/security/chipsec/default.nix index 45d6349af403..7e00c0b07cf7 100644 --- a/pkgs/tools/security/chipsec/default.nix +++ b/pkgs/tools/security/chipsec/default.nix @@ -1,6 +1,6 @@ -{ stdenv, lib, fetchFromGitHub, pythonPackages, nasm, libelf +{ stdenv, lib, fetchFromGitHub, python2Packages, nasm, libelf , kernel ? null, withDriver ? false }: -pythonPackages.buildPythonApplication rec { +python2Packages.buildPythonApplication rec { pname = "chipsec"; version = "1.5.1"; diff --git a/pkgs/tools/security/cipherscan/default.nix b/pkgs/tools/security/cipherscan/default.nix index eae5a5256dff..23022f92b6af 100644 --- a/pkgs/tools/security/cipherscan/default.nix +++ b/pkgs/tools/security/cipherscan/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, openssl, makeWrapper, python, coreutils }: +{ stdenv, lib, fetchFromGitHub, openssl, makeWrapper, python3, coreutils }: stdenv.mkDerivation rec { pname = "cipherscan"; @@ -12,7 +12,9 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ makeWrapper ]; - buildInputs = [ python ]; + buildInputs = [ python3 ]; + + strictDeps = true; buildPhase = '' substituteInPlace cipherscan --replace '$0' 'cipherscan' diff --git a/pkgs/tools/system/evemu/default.nix b/pkgs/tools/system/evemu/default.nix index 5b3a584bd242..c01a909668ec 100644 --- a/pkgs/tools/system/evemu/default.nix +++ b/pkgs/tools/system/evemu/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchgit, autoreconfHook, pkg-config, pythonPackages +{ lib, stdenv, fetchgit, autoreconfHook, pkg-config, python3Packages , libevdev }: @@ -14,9 +14,11 @@ stdenv.mkDerivation rec { sha256 = "1m38fxwy2s82vb2qm9aqxinws12akmqqq7q66is931lc3awqkbah"; }; - nativeBuildInputs = [ pkg-config autoreconfHook ]; + nativeBuildInputs = [ pkg-config autoreconfHook python3Packages.python ]; - buildInputs = [ pythonPackages.python pythonPackages.evdev libevdev ]; + buildInputs = [ python3Packages.evdev libevdev ]; + + strictDeps = true; meta = with lib; { description = "Records and replays device descriptions and events to emulate input devices through the kernel's input system"; diff --git a/pkgs/tools/system/fio/default.nix b/pkgs/tools/system/fio/default.nix index d34f0d4b737c..fc4ea8d6b331 100644 --- a/pkgs/tools/system/fio/default.nix +++ b/pkgs/tools/system/fio/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchFromGitHub, makeWrapper -, libaio, python, zlib +, libaio, python3, zlib , withGnuplot ? false, gnuplot ? null }: stdenv.mkDerivation rec { @@ -13,11 +13,13 @@ stdenv.mkDerivation rec { sha256 = "sha256-/Si0McndJ6Xp3ifDr+BStv89LmZyAgof95QkHGT8MGQ="; }; - buildInputs = [ python zlib ] + buildInputs = [ python3 zlib ] ++ lib.optional (!stdenv.isDarwin) libaio; nativeBuildInputs = [ makeWrapper ]; + strictDeps = true; + enableParallelBuilding = true; postPatch = '' diff --git a/pkgs/tools/typesetting/biblatex-check/default.nix b/pkgs/tools/typesetting/biblatex-check/default.nix index 606e07730e4f..63bf7cf1d71a 100644 --- a/pkgs/tools/typesetting/biblatex-check/default.nix +++ b/pkgs/tools/typesetting/biblatex-check/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, python }: +{ lib, stdenv, fetchFromGitHub, python3 }: stdenv.mkDerivation { pname = "biblatex-check"; @@ -11,7 +11,9 @@ stdenv.mkDerivation { sha256 = "1bq0yqckhssazwkivipdjmn1jpsf301i4ppyl88qhc5igx39wg25"; }; - buildInputs = [ python ]; + buildInputs = [ python3 ]; + + strictDeps = true; installPhase = '' install -Dm755 biblatex_check.py $out/bin/biblatex-check |