Unverified Commit 35b08426 authored by Ryan Omasta's avatar Ryan Omasta
Browse files

premid: drop

Archived upstream since July 2024
The browser extension is now recommended.
parent ad7953db
Loading
Loading
Loading
Loading
+0 −167
Original line number Diff line number Diff line
{
  autoPatchelfHook,
  makeDesktopItem,
  lib,
  stdenv,
  wrapGAppsHook3,
  fetchurl,
  copyDesktopItems,
  alsa-lib,
  at-spi2-atk,
  at-spi2-core,
  atk,
  cairo,
  cups,
  dbus,
  expat,
  fontconfig,
  freetype,
  gdk-pixbuf,
  glib,
  gtk3,
  libcxx,
  libdrm,
  libnotify,
  libpulseaudio,
  libuuid,
  libx11,
  libxscrnsaver,
  libxcomposite,
  libxcursor,
  libxdamage,
  libxext,
  libxfixes,
  libxi,
  libxrandr,
  libxrender,
  libxtst,
  libxcb,
  libxshmfence,
  libgbm,
  nspr,
  nss,
  pango,
  systemd,
  libappindicator-gtk3,
  libdbusmenu,
}:

stdenv.mkDerivation rec {
  pname = "premid";
  version = "2.3.4";

  src = fetchurl {
    url = "https://github.com/premid/Linux/releases/download/v${version}/${pname}.tar.gz";
    sha256 = "sha256-ime6SCxm+fhMR2wagv1RItqwLjPxvJnVziW3DZafP50=";
  };

  nativeBuildInputs = [
    autoPatchelfHook
    wrapGAppsHook3
    copyDesktopItems
  ];

  buildInputs = [
    alsa-lib
    cups
    libdrm
    libuuid
    libxdamage
    libx11
    libxscrnsaver
    libxtst
    libxcb
    libxshmfence
    libgbm
    nss
  ];

  dontWrapGApps = true;
  dontBuild = true;
  dontConfigure = true;

  libPath = lib.makeLibraryPath [
    libcxx
    systemd
    libpulseaudio
    libdrm
    libgbm
    stdenv.cc.cc
    alsa-lib
    atk
    at-spi2-atk
    at-spi2-core
    cairo
    cups
    dbus
    expat
    fontconfig
    freetype
    gdk-pixbuf
    glib
    gtk3
    libnotify
    libx11
    libxcomposite
    libuuid
    libxcursor
    libxdamage
    libxext
    libxfixes
    libxi
    libxrandr
    libxrender
    libxtst
    nspr
    nss
    libxcb
    pango
    systemd
    libxscrnsaver
    libappindicator-gtk3
    libdbusmenu
  ];

  installPhase = ''
    mkdir -p $out/{bin,opt/PreMiD,share/pixmaps}
    mv * $out/opt/PreMiD

    chmod +x $out/opt/PreMiD/${pname}
    patchelf --set-interpreter ${stdenv.cc.bintools.dynamicLinker} \
        $out/opt/PreMiD/${pname}

    wrapProgram $out/opt/PreMiD/${pname} \
        "''${gappsWrapperArgs[@]}" \
        --prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \
        --prefix LD_LIBRARY_PATH : ${libPath}:$out/opt/${pname}

    ln -s $out/opt/PreMiD/${pname} $out/bin/
  '';

  # This is the icon used by the desktop file
  postInstall = ''
    ln -s $out/opt/PreMiD/assets/appIcon.png $out/share/pixmaps/${pname}.png
  '';

  desktopItems = [
    (makeDesktopItem {
      name = pname;
      exec = "PreMiD";
      icon = pname;
      desktopName = "PreMiD";
      genericName = meta.description;
      mimeTypes = [ "x-scheme-handler/premid" ];
    })
  ];

  meta = {
    description = "Simple, configurable utility to show your web activity as playing status on Discord";
    homepage = "https://premid.app";
    downloadPage = "https://premid.app/downloads";
    sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
    license = lib.licenses.mpl20;
    maintainers = with lib.maintainers; [ natto1784 ];
    platforms = [ "x86_64-linux" ];
    mainProgram = "premid";
  };
}
+1 −0
Original line number Diff line number Diff line
@@ -1643,6 +1643,7 @@ mapAliases {
  powwow = throw "'powwow' has been removed, since it's unmaintained since 2021 and doesn't build with glibc 2.42"; # Added 2025-09-28
  prboom-plus = throw "'prboom-plus' has been removed since it is unmaintained upstream."; # Added 2025-09-14
  preload = throw "'preload' has been removed due to lack of usage and being broken since its introduction into nixpkgs"; # Added 2025-11-29
  premid = throw "'premid' has been removed, as it has been archived upstream since July 2024. Consider using the browser extension instead."; # Added 2026-04-04
  presage = throw "presage has been removed, as it has been unmaintained since 2018"; # Added 2025-06-19
  preserves-nim = throw "'preserves-nim' has been removed due to a hostile upstream moving tags and breaking src FODs"; # Added 2025-09-01
  primusLib = warnAlias "'primusLib' has been renamed to 'primus-lib'" primus-lib; # Added 2026-02-12