Unverified Commit 1a0fccf8 authored by Pascal Bach's avatar Pascal Bach Committed by GitHub
Browse files

libvirt: fix virt-secret-init-encryption (#496839)

parents c918c0b4 d699415e
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -530,7 +530,10 @@ in
          "nix-helpers"
          "nix-ovmf"
        ];
        StateDirectory = subDirs [ "dnsmasq" ];
        StateDirectory = subDirs [
          "dnsmasq"
          "secrets"
        ];
      };
    };

+19 −1
Original line number Diff line number Diff line
@@ -33,11 +33,13 @@
  python3,
  readline,
  rpcsvc-proto,
  runtimeShell,
  stdenv,
  replaceVars,
  xhtml1,
  json_c,
  writeScript,
  writeShellApplication,
  nixosTests,

  # Linux
@@ -180,7 +182,23 @@ stdenv.mkDerivation rec {
    sed -i '/libxlxml2domconfigtest/d' tests/meson.build
    substituteInPlace src/libxl/libxl_capabilities.h \
     --replace-fail /usr/lib/xen ${xen}/libexec/xen
  '';
  ''
  + lib.optionalString isLinux (
    let
      script = writeShellApplication {
        name = "virt-secret-init-encryption-sh";
        runtimeInputs = [
          coreutils
          systemd
        ];
        text = ''exec ${runtimeShell} "$@"'';
      };
    in
    ''
      substituteInPlace src/secret/virt-secret-init-encryption.service.in \
        --replace-fail /usr/bin/sh ${lib.getExe script}
    ''
  );

  strictDeps = true;