From 7c81e1d58761b599cf2e39fc59cff5c855d7b08e Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Mon, 16 Dec 2024 11:00:04 -0500 Subject: [PATCH 1/3] open-vm-tools: substituteInPlace use --replace-fail --- pkgs/by-name/op/open-vm-tools/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/op/open-vm-tools/package.nix b/pkgs/by-name/op/open-vm-tools/package.nix index ac340b7a87c5..8a039edbfba6 100644 --- a/pkgs/by-name/op/open-vm-tools/package.nix +++ b/pkgs/by-name/op/open-vm-tools/package.nix @@ -119,8 +119,8 @@ stdenv.mkDerivation (finalAttrs: { sed -i 's,/bin/fusermount3,${fuse3}/bin/fusermount3,' vmhgfs-fuse/config.c substituteInPlace services/plugins/vix/foundryToolsDaemon.c \ - --replace "/usr/bin/vmhgfs-fuse" "${placeholder "out"}/bin/vmhgfs-fuse" \ - --replace "/bin/mount" "${util-linux}/bin/mount" + --replace-fail "/usr/bin/vmhgfs-fuse" "${placeholder "out"}/bin/vmhgfs-fuse" \ + --replace-fail "/bin/mount" "${util-linux}/bin/mount" ''; configureFlags = [ @@ -145,7 +145,7 @@ stdenv.mkDerivation (finalAttrs: { which ] }" - substituteInPlace "$out/lib/udev/rules.d/99-vmware-scsi-udev.rules" --replace "/bin/sh" "${bash}/bin/sh" + substituteInPlace "$out/lib/udev/rules.d/99-vmware-scsi-udev.rules" --replace-fail "/bin/sh" "${bash}/bin/sh" ''; meta = with lib; { From fb04895bee114cc25541e5b25b8aa4fd00953d6a Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Mon, 16 Dec 2024 14:24:31 -0500 Subject: [PATCH 2/3] open-vm-tools: remove with lib --- pkgs/by-name/op/open-vm-tools/package.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/op/open-vm-tools/package.nix b/pkgs/by-name/op/open-vm-tools/package.nix index 8a039edbfba6..8ce2bd828869 100644 --- a/pkgs/by-name/op/open-vm-tools/package.nix +++ b/pkgs/by-name/op/open-vm-tools/package.nix @@ -39,6 +39,15 @@ xmlsec, withX ? true, }: +let + inherit (lib) + licenses + maintainers + makeBinPath + optional + optionals + ; +in stdenv.mkDerivation (finalAttrs: { pname = "open-vm-tools"; @@ -83,7 +92,7 @@ stdenv.mkDerivation (finalAttrs: { xercesc xmlsec ] - ++ lib.optionals withX [ + ++ optionals withX [ gdk-pixbuf-xlib gtk3 gtkmm3 @@ -127,7 +136,7 @@ stdenv.mkDerivation (finalAttrs: { "--without-kernel-modules" "--with-udev-rules-dir=${placeholder "out"}/lib/udev/rules.d" "--with-fuse=fuse3" - ] ++ lib.optional (!withX) "--without-x"; + ] ++ optional (!withX) "--without-x"; enableParallelBuilding = true; @@ -138,7 +147,7 @@ stdenv.mkDerivation (finalAttrs: { postInstall = '' wrapProgram "$out/etc/vmware-tools/scripts/vmware/network" \ --prefix PATH ':' "${ - lib.makeBinPath [ + makeBinPath [ iproute2 dbus systemd @@ -148,7 +157,7 @@ stdenv.mkDerivation (finalAttrs: { substituteInPlace "$out/lib/udev/rules.d/99-vmware-scsi-udev.rules" --replace-fail "/bin/sh" "${bash}/bin/sh" ''; - meta = with lib; { + meta = { homepage = "https://github.com/vmware/open-vm-tools"; changelog = "https://github.com/vmware/open-vm-tools/releases/tag/stable-${finalAttrs.version}"; description = "Set of tools for VMWare guests to improve host-guest interaction"; From fa24aa68b98c7d577ab2467b3090786b19c03c9d Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Mon, 16 Dec 2024 14:41:31 -0500 Subject: [PATCH 3/3] open-vm-tools: add missing license --- pkgs/by-name/op/open-vm-tools/package.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/op/open-vm-tools/package.nix b/pkgs/by-name/op/open-vm-tools/package.nix index 8ce2bd828869..aa5290520a8c 100644 --- a/pkgs/by-name/op/open-vm-tools/package.nix +++ b/pkgs/by-name/op/open-vm-tools/package.nix @@ -165,7 +165,10 @@ stdenv.mkDerivation (finalAttrs: { A set of services and modules that enable several features in VMware products for better management of, and seamless user interactions with, guests. ''; - license = licenses.gpl2; + license = with licenses; [ + gpl2 + lgpl21Only + ]; platforms = [ "x86_64-linux" "i686-linux"