anchor.diff:      '';
     };
   
  -in if stdenv.isDarwin
  -  then darwin
  -  else linux
  +in
  +if stdenv.isDarwin
  +then darwin
  +else linux
  
positive.code:         * Timed messages and chats
          * Synced across your phone, desktop and tablet
      '';
      homepage = https://wire.com/;
      downloadPage = https://wire.com/download/;
      license = licenses.gpl3Plus;
      maintainers = with maintainers; [ arianvp toonn worldofpeace ];
      platforms = [ "x86_64-darwin" "x86_64-linux" ];
    };
  
    linux = stdenv.mkDerivation rec {
  
negative.code: 
      src = fetchurl {
        url = "https://wire-app.wire.com/linux/debian/pool/main/"
        + "Wire-${version}_amd64.deb";
        inherit sha256;
      };
  
      desktopItem = makeDesktopItem {
        categories = "Network;InstantMessaging;Chat;VideoConference";
        comment = "Secure messenger for everyone";
        desktopName = "Wire Desktop";
        exec = "wire-desktop %U";
        genericName = "Secure messenger";
        icon = "wire-desktop";
        name = "wire-desktop";
      };
  
      dontBuild = true;
      dontConfigure = true;
      dontPatchELF = true;
      dontWrapGApps = true;
  
      nativeBuildInputs = [
        autoPatchelfHook
        dpkg
        makeWrapper
        wrapGAppsHook
      ];
  
      buildInputs = atomEnv.packages;
  
      unpackPhase = "dpkg-deb -x $src .";
  
      installPhase = ''
        mkdir -p "$out/bin"
        cp -R "opt" "$out"
        cp -R "usr/share" "$out/share"
        chmod -R g-w "$out"
  
        # Desktop file
        mkdir -p "$out/share/applications"
        cp "${desktopItem}/share/applications/"* "$out/share/applications"
      '';
  
      runtimeDependencies = [
        udev.lib
      ];
  
      postFixup = ''
        makeWrapper $out/opt/Wire/wire-desktop $out/bin/wire-desktop \
          "''${gappsWrapperArgs[@]}"
      '';
    };
  
  