From f22ce20ec0ecb29e8b1f1b08170276f6fe54c589 Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Sat, 14 Oct 2017 14:42:17 +0800 Subject: Revert "hyperv-daemons: init at current linux kernel version" This reverts commit 51f1c635e679fdadead32e5aec464b28c254d099. --- pkgs/os-specific/linux/hyperv-daemons/default.nix | 109 ---------------------- 1 file changed, 109 deletions(-) delete mode 100644 pkgs/os-specific/linux/hyperv-daemons/default.nix (limited to 'pkgs/os-specific/linux/hyperv-daemons') diff --git a/pkgs/os-specific/linux/hyperv-daemons/default.nix b/pkgs/os-specific/linux/hyperv-daemons/default.nix deleted file mode 100644 index 91b3c25bd31d..000000000000 --- a/pkgs/os-specific/linux/hyperv-daemons/default.nix +++ /dev/null @@ -1,109 +0,0 @@ -{ stdenv, lib, python, kernel, makeWrapper, writeText }: - -let - daemons = stdenv.mkDerivation rec { - name = "hyperv-daemons-bin-${version}"; - inherit (kernel) src version; - - nativeBuildInputs = [ makeWrapper ]; - - # as of 4.9 compilation will fail due to -Werror=format-security - hardeningDisable = [ "format" ]; - - preConfigure = '' - cd tools/hv - ''; - - installPhase = '' - runHook preInstall - - for f in fcopy kvp vss ; do - install -Dm755 hv_''${f}_daemon -t $out/bin - done - - install -Dm755 hv_get_dns_info.sh lsvmbus -t $out/bin - - # 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 - ''; - - postFixup = '' - # kvp needs to be able to find the script(s) - wrapProgram $out/bin/hv_kvp_daemon --prefix PATH : $out/bin - ''; - }; - - service = bin: title: check: - writeText "hv-${bin}.service" '' - [Unit] - Description=Hyper-V ${title} daemon - ConditionVirtualization=microsoft - ${lib.optionalString (check != "") '' - ConditionPathExists=/dev/vmbus/${check} - ''} - [Service] - ExecStart=@out@/hv_${bin}_daemon -n - Restart=on-failure - PrivateTmp=true - Slice=hyperv.slice - - [Install] - WantedBy=hyperv-daemons.target - ''; - -in stdenv.mkDerivation rec { - name = "hyperv-daemons-${version}"; - - inherit (kernel) version; - - # we just stick the bins into out as well as it requires "out" - outputs = [ "bin" "lib" "out" ]; - - phases = [ "installPhase" ]; - - buildInputs = [ daemons ]; - - installPhase = '' - system=$lib/lib/systemd/system - - mkdir -p $system - - cp ${service "fcopy" "file copy (FCOPY)" "hv_fcopy" } $system/hv-fcopy.service - cp ${service "kvp" "key-value pair (KVP)" "" } $system/hv-kvp.service - cp ${service "vss" "volume shadow copy (VSS)" "" } $system/hv-vss.service - - cat > $system/hyperv-daemons.target <