kindlegen: remove the package (closes #96439)

This commit is contained in:
Chris Martin 2021-03-09 00:55:43 -07:00 committed by github-actions[bot]
parent 807759d831
commit 5ae6e17795
6 changed files with 10 additions and 62 deletions

View file

@ -562,6 +562,11 @@ self: super:
<xref linkend="opt-services.xserver.videoDrivers" /> no longer uses the deprecated <literal>cirrus</literal> and <literal>vesa</literal> device dependent X drivers by default. It also enables both <literal>amdgpu</literal> and <literal>nouveau</literal> drivers by default now.
</para>
</listitem>
<listitem>
<para>
The <literal>kindlegen</literal> package is gone, because it is no longer supported or hosted by Amazon. Sadly, its replacement, Kindle Previewer, has no Linux support. However, there are other ways to generate MOBI files. See <link xlink:href="https://github.com/NixOS/nixpkgs/issues/96439">the discussion</link> for more info.
</para>
</listitem>
</itemizedlist>
</section>

View file

@ -1,6 +1,6 @@
{ lib, bundlerApp, makeWrapper,
# Optional dependencies, can be null
epubcheck, kindlegen,
epubcheck,
bundlerUpdateScript
}:
@ -20,8 +20,7 @@ let
postBuild = ''
wrapProgram "$out/bin/asciidoctor-epub3" \
${lib.optionalString (epubcheck != null) "--set EPUBCHECK ${epubcheck}/bin/epubcheck"} \
${lib.optionalString (kindlegen != null) "--set KINDLEGEN ${kindlegen}/bin/kindlegen"}
${lib.optionalString (epubcheck != null) "--set EPUBCHECK ${epubcheck}/bin/epubcheck"}
'';
passthru = {

View file

@ -1,52 +0,0 @@
{ fetchurl, lib, stdenv, unzip }:
let
version = "2.9";
fileVersion = builtins.replaceStrings [ "." ] [ "_" ] version;
sha256 = {
x86_64-linux = "15i20kzhdcmi94w7wfhqbl6j20v47cdakjm2mn3x8w495iddna4q";
i686-linux = "15i20kzhdcmi94w7wfhqbl6j20v47cdakjm2mn3x8w495iddna4q";
x86_64-darwin = "0zniyn0s41fxqrajbgwxbcsj5vzf9m7a6yvdz2b11mphr00kpbbs";
i686-darwin = "0zniyn0s41fxqrajbgwxbcsj5vzf9m7a6yvdz2b11mphr00kpbbs";
x86_64-cygwin = "02slfh1bbpijay4skj85cjiv7z43ha8vm5aa1lwiqjk86qbl1f3h";
i686-cygwin = "02slfh1bbpijay4skj85cjiv7z43ha8vm5aa1lwiqjk86qbl1f3h";
}.${stdenv.hostPlatform.system} or (throw "system #{stdenv.hostPlatform.system.} is not supported");
url = {
x86_64-linux = "http://kindlegen.s3.amazonaws.com/kindlegen_linux_2.6_i386_v${fileVersion}.tar.gz";
i686-linux = "http://kindlegen.s3.amazonaws.com/kindlegen_linux_2.6_i386_v${fileVersion}.tar.gz";
x86_64-darwin = "http://kindlegen.s3.amazonaws.com/KindleGen_Mac_i386_v${fileVersion}.zip";
i686-darwin = "http://kindlegen.s3.amazonaws.com/KindleGen_Mac_i386_v${fileVersion}.zip";
x86_64-cygwin = "http://kindlegen.s3.amazonaws.com/kindlegen_win32_v${fileVersion}.zip";
i686-cygwin = "http://kindlegen.s3.amazonaws.com/kindlegen_win32_v${fileVersion}.zip";
}.${stdenv.hostPlatform.system} or (throw "system #{stdenv.hostPlatform.system.} is not supported");
in stdenv.mkDerivation {
pname = "kindlegen";
inherit version;
src = fetchurl {
inherit url;
inherit sha256;
};
sourceRoot = ".";
nativeBuildInputs = lib.optional (lib.hasSuffix ".zip" url) unzip;
installPhase = ''
mkdir -p $out/bin $out/share/kindlegen/doc
install -m755 kindlegen $out/bin/kindlegen
cp -r *.txt *.html docs/* $out/share/kindlegen/doc
'';
meta = with lib; {
broken = true; # download links got removed
description = "Convert documents to .mobi for use with Amazon Kindle";
homepage = "https://www.amazon.com/gp/feature.html?docId=1000765211";
license = licenses.unfree;
maintainers = with maintainers; [ peterhoeg ];
platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" "i686-darwin" "x86_64-cygwin" "i686-cygwin" ];
};
}

View file

@ -1,6 +1,6 @@
{ lib, bundlerApp, makeWrapper,
# Optional dependencies, can be null
epubcheck, kindlegen,
epubcheck,
bundlerUpdateScript
}:
@ -17,8 +17,7 @@ let
# postBuild = ''
# wrapProgram "$out/bin/asciidoctor-epub3" \
# ${lib.optionalString (epubcheck != null) "--set EPUBCHECK ${epubcheck}/bin/epubcheck"} \
# ${lib.optionalString (kindlegen != null) "--set KINDLEGEN ${kindlegen}/bin/kindlegen"}
# ${lib.optionalString (epubcheck != null) "--set EPUBCHECK ${epubcheck}/bin/epubcheck"}
# '';
# passthru = {

View file

@ -314,6 +314,7 @@ mapAliases ({
keybase-go = keybase; # added 2016-08-24
kinetic-cpp-client = throw "kinetic-cpp-client has been removed from nixpkgs, as it's abandoned."; # 2020-04-28
kicad-with-packages3d = kicad; # added 2019-11-25
kindlegen = throw "kindlegen has been removed from nixpkgs, as it's abandoned and no longer available for download."; # 2021-03-09
krename-qt5 = krename; # added 2017-02-18
keymon = throw "keymon has been removed from nixpkgs, as it's abandoned and archived."; # 2019-12-10
kvm = qemu_kvm; # added 2018-04-25

View file

@ -2973,8 +2973,6 @@ in
});
asciidoctor = callPackage ../tools/typesetting/asciidoctor {
# kindlegen is unfree, don't enable by default
kindlegen = null;
# epubcheck pulls in Java, which is problematic on some platforms
epubcheck = null;
};
@ -5953,8 +5951,6 @@ in
jump = callPackage ../tools/system/jump {};
kindlegen = callPackage ../tools/typesetting/kindlegen { };
latex2html = callPackage ../tools/misc/latex2html { };
latexrun = callPackage ../tools/typesetting/tex/latexrun { };