anchor.diff:        patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath "$ORIGIN:$out/opt/appgate/service/:$out/opt/appgate/:${rpath}" $binary
       done
   
  +    # fail if there are missing dependencies
  +    ldd $out/opt/appgate/appgate | grep -i 'not found' && exit 1
  +    ldd $out/opt/appgate/service/appgateservice.bin | grep -i 'not found' && exit 1
  +    ldd $out/opt/appgate/appgate-driver | grep -i 'not found' && exit 1
  +
       wrapProgram $out/opt/appgate/appgate-driver --prefix PATH : ${lib.makeBinPath [ iproute2 networkmanager dnsmasq ]}
       wrapProgram $out/opt/appgate/linux/set_dns --set PYTHONPATH $PYTHONPATH
  -    wrapProgram $out/bin/appgate --prefix PATH : ${xdg-utils}/bin
  +    wrapProgram $out/bin/appgate --prefix PATH : ${lib.makeBinPath [ xdg-utils ]}
     '';
     meta = with lib; {
       description = "Appgate SDP (Software Defined Perimeter) desktop client";
  
positive.code: in
  stdenv.mkDerivation rec {
    pname = "appgate-sdp";
    version = "5.3.3";
  
    src = fetchurl {
      url = "https://bin.appgate-sdp.com/${lib.versions.majorMinor version}/client/appgate-sdp_${version}_amd64.deb";
      sha256 = "1854m93mr2crg68zhh1pgwwis0dqdv0778wqrb8dz9sdz940rza8";
    };
  
    dontConfigure = true;
  
negative.code: , libXrandr
  , libXrender
  , libXtst
  , libxkbcommon
  , libsecret
  , libuuid
  , libxcb
  