summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2021-07-16 10:14:56 +0100
committerGitHub <noreply@github.com>2021-07-16 10:14:56 +0100
commitaaaa05c78e3ad679335acedafda0a10c62798183 (patch)
tree924643fa1914668e53d8f53247cdf0981d4ac1b4 /pkgs/os-specific
parent979ac3960d14ff816bd364b0046949a182700755 (diff)
parent698bf970e11e11ff2b2dc087c87e1c9ce17f9d5e (diff)
downloadnixpkgs-aaaa05c78e3ad679335acedafda0a10c62798183.tar
nixpkgs-aaaa05c78e3ad679335acedafda0a10c62798183.tar.gz
nixpkgs-aaaa05c78e3ad679335acedafda0a10c62798183.tar.bz2
nixpkgs-aaaa05c78e3ad679335acedafda0a10c62798183.tar.lz
nixpkgs-aaaa05c78e3ad679335acedafda0a10c62798183.tar.xz
nixpkgs-aaaa05c78e3ad679335acedafda0a10c62798183.tar.zst
nixpkgs-aaaa05c78e3ad679335acedafda0a10c62798183.zip
Merge pull request #130117 from helsinki-systems/feat/hyperv-daemons-python3
hyperv-daemons: use python3 for kernels that support it
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/linux/hyperv-daemons/default.nix9
1 files changed, 3 insertions, 6 deletions
diff --git a/pkgs/os-specific/linux/hyperv-daemons/default.nix b/pkgs/os-specific/linux/hyperv-daemons/default.nix
index 2b6bf6fc63a..a659908a7a0 100644
--- a/pkgs/os-specific/linux/hyperv-daemons/default.nix
+++ b/pkgs/os-specific/linux/hyperv-daemons/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, python, kernel, makeWrapper, writeText
+{ stdenv, lib, python2, python3, kernel, makeWrapper, writeText
 , gawk, iproute2 }:
 
 let
@@ -9,6 +9,7 @@ let
     inherit (kernel) src version;
 
     nativeBuildInputs = [ makeWrapper ];
+    buildInputs = [ (if lib.versionOlder version "4.19" then python2 else python3) ];
 
     # as of 4.9 compilation will fail due to -Werror=format-security
     hardeningDisable = [ "format" ];
@@ -33,10 +34,6 @@ let
       install -Dm755 hv_get_dhcp_info.sh $out/${libexec}/hv_get_dhcp_info
       install -Dm755 hv_get_dns_info.sh  $out/${libexec}/hv_get_dns_info
 
-      # I don't know why this isn't being handled automatically by fixupPhase
-      substituteInPlace $out/bin/lsvmbus \
-        --replace '/usr/bin/env python' ${python.interpreter}
-
       runHook postInstall
     '';
 
@@ -86,7 +83,7 @@ in stdenv.mkDerivation {
     Wants=hv-fcopy.service hv-kvp.service hv-vss.service
     EOF
 
-    for f in $lib/lib/systemd/system/* ; do
+    for f in $lib/lib/systemd/system/*.service ; do
       substituteInPlace $f --replace @out@ ${daemons}/bin
     done