diff options
Diffstat (limited to 'nixpkgs/pkgs/tools/networking/dd-agent/5.nix')
-rw-r--r-- | nixpkgs/pkgs/tools/networking/dd-agent/5.nix | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/nixpkgs/pkgs/tools/networking/dd-agent/5.nix b/nixpkgs/pkgs/tools/networking/dd-agent/5.nix index c220f24046fc..f40ef295d138 100644 --- a/nixpkgs/pkgs/tools/networking/dd-agent/5.nix +++ b/nixpkgs/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}"; @@ -19,10 +19,9 @@ let requests websocket_client ipaddress - backports_ssl_match_hostname docker_pycreds uptime - ]; + ] ++ lib.optionals (self.pythonOlder "3.7") [ backports_ssl_match_hostname ]; # due to flake8 doCheck = false; @@ -51,8 +50,8 @@ in stdenv.mkDerivation rec { patches = [ ./40103-iostat-fix.patch ]; + nativeBuildInputs = [ unzip ]; buildInputs = [ - unzip makeWrapper ] ++ (with python'.pkgs; [ requests @@ -83,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 |