Unverified Commit 7dfb68eb authored by Arne Keller's avatar Arne Keller Committed by GitHub
Browse files

adobe-reader: drop (#411841)

parents 61e1e194 80d5523a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -107,7 +107,7 @@ Now that this is out of the way. To add a package to Nixpkgs:

   - XML::Simple, a Perl module: [`pkgs/top-level/perl-packages.nix`](top-level/perl-packages.nix) (search for the `XMLSimple` attribute). Most Perl modules are so simple to build that they are defined directly in `perl-packages.nix`; no need to make a separate file for them.

   - Adobe Reader: [`pkgs/applications/misc/adobe-reader/default.nix`](applications/misc/adobe-reader/default.nix). Shows how binary-only packages can be supported. In particular the `postFixup` phase uses `patchelf` to set the RUNPATH and ELF interpreter of the executables so that the right libraries are found at runtime.
   - Discord Game SDK: [`pkgs/by-name/di/discord-gamesdk/package.nix`](./by-name/di/discord-gamesdk/package.nix). Shows how binary-only packages can be supported. In particular, the `autoPatchelfHook` is used to set the RUNPATH and ELF interpreter of the executables so that the right libraries are found at runtime.

   Some notes:

+0 −99
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchurl,
  libX11,
  cups,
  zlib,
  libxml2,
  pango,
  atk,
  gtk2,
  glib,
  gdk-pixbuf,
  gdk-pixbuf-xlib,
}:

stdenv.mkDerivation rec {
  pname = "adobe-reader";
  version = "9.5.5";

  src = fetchurl {
    url = "http://ardownload.adobe.com/pub/adobe/reader/unix/9.x/${version}/enu/AdbeRdr${version}-1_i486linux_enu.tar.bz2";
    sha256 = "0h35misxrqkl5zlmmvray1bqf4ywczkm89n9qw7d9arqbg3aj3pf";
  };

  # !!! Adobe Reader contains copies of OpenSSL, libcurl, and libicu.
  # We should probably remove those and use the regular Nixpkgs versions.
  libPath = lib.makeLibraryPath [
    stdenv.cc.cc
    libX11
    zlib
    libxml2
    cups
    pango
    atk
    gtk2
    glib
    gdk-pixbuf
    gdk-pixbuf-xlib
  ];

  installPhase = ''
    p=$out/libexec/adobe-reader
    mkdir -p $out/libexec
    tar xvf COMMON.TAR -C $out
    tar xvf ILINXR.TAR -C $out
    mv $out/Adobe/Reader9 $p
    rmdir $out/Adobe

    # Disable this plugin for now (it needs LDAP).
    rm $p/Reader/intellinux/plug_ins/PPKLite.api

    # Remove unneeded files
    rm $p/bin/UNINSTALL
  '';

  postFixup = ''
    patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
        --set-rpath $libPath \
        $p/Reader/intellinux/bin/acroread

    # The "xargs -r" is to shut up a warning when Mozilla can't be found.
    substituteInPlace $p/bin/acroread \
        --replace-fail /bin/pwd $(type -P pwd) \
        --replace-fail /bin/ls $(type -P ls) \
        --replace-fail xargs "xargs -r"

    mkdir -p $out/bin
    ln -s $p/bin/acroread $out/bin/acroread

    mkdir -p $out/share/applications
    mv $p/Resource/Support/AdobeReader.desktop $out/share/applications/
    icon=$p/Resource/Icons/128x128/AdobeReader9.png
    [ -e $icon ]
    sed -i $out/share/applications/AdobeReader.desktop \
        -e "s|Icon=.*|Icon=$icon|"

    mkdir -p $out/share/mimelnk/application
    mv $p/Resource/Support/vnd*.desktop $out/share/mimelnk/application
  '';

  dontStrip = true;

  passthru.mozillaPlugin = "/libexec/adobe-reader/Browser/intellinux";

  meta = {
    description = "Adobe Reader, a viewer for PDF documents";
    homepage = "http://www.adobe.com/products/reader";
    sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
    license = lib.licenses.unfree;
    knownVulnerabilities = [
      "Numerous unresolved vulnerabilities"
      "See: https://www.cvedetails.com/product/497/Adobe-Acrobat-Reader.html?vendor_id=53"
    ];
    platforms = [ "i686-linux" ];
    maintainers = with lib.maintainers; [ onny ];
    mainProgram = "acroread";
  };
}
+1 −0
Original line number Diff line number Diff line
@@ -237,6 +237,7 @@ mapAliases {
  adminer-pematon = adminneo; # Added 2025-02-20
  adminerneo = adminneo; # Added 2025-02-27
  adtool = throw "'adtool' has been removed, as it was broken and unmaintained";
  adobe-reader = throw "'adobe-reader' has been removed, as it was broken, outdated and insecure"; # added 2025-05-31
  adom = throw "'adom' has been removed, as it was broken and unmaintained"; # added 2024-05-09
  adoptopenjdk-bin = throw "adoptopenjdk has been removed as the upstream project is deprecated. Consider using `temurin-bin`"; # Added 2024-05-09
  adoptopenjdk-bin-17-packages-darwin = throw "adoptopenjdk has been removed as the upstream project is deprecated. Consider using `temurin-bin-17`."; # Added 2024-05-09
+0 −2
Original line number Diff line number Diff line
@@ -11937,8 +11937,6 @@ with pkgs;
  activitywatch = callPackage ../applications/office/activitywatch/wrapper.nix { };
  adobe-reader = pkgsi686Linux.callPackage ../applications/misc/adobe-reader { };
  anilibria-winmaclinux = libsForQt5.callPackage ../applications/video/anilibria-winmaclinux { };
  masterpdfeditor4 = libsForQt5.callPackage ../applications/misc/masterpdfeditor4 { };