summaryrefslogtreecommitdiffstats
path: root/pkgs/tools/text
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2019-04-27 07:01:38 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2019-04-27 07:01:38 +0200
commit883232c00ddc5e2a804084a8cdf94ffaf4c1cb0c (patch)
tree1f6366122193b376ae045a520f4e05610ac0a7b1 /pkgs/tools/text
parent1aff8dc4074013e0018bb749fd82b771c41ea839 (diff)
parent3f46165af3f74df4eed27418377733cf237a33a0 (diff)
Merge master into staging-next
Diffstat (limited to 'pkgs/tools/text')
-rw-r--r--pkgs/tools/text/epubcheck/default.nix41
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/tools/text/epubcheck/default.nix b/pkgs/tools/text/epubcheck/default.nix
new file mode 100644
index 000000000000..d9acf106e2ea
--- /dev/null
+++ b/pkgs/tools/text/epubcheck/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, fetchzip
+, jre, makeWrapper }:
+
+stdenv.mkDerivation rec {
+ pname = "epubcheck";
+ version = "4.2.0";
+
+ src = fetchzip {
+ url = "https://github.com/w3c/epubcheck/releases/download/v${version}/epubcheck-${version}.zip";
+ sha256 = "1bf5jbzqvgpvhbkprynxj75ilk3r6zld157vjf6k7l5g21cwyn9d";
+ };
+
+ nativeBuildInputs = [ makeWrapper ];
+
+ dontBuild = true;
+
+ installPhase = ''
+ mkdir -p $out/lib
+ cp -r lib/* $out/lib
+
+ mkdir -p $out/libexec/epubcheck
+ cp epubcheck.jar $out/libexec/epubcheck
+
+ classpath=$out/libexec/epubcheck/epubcheck.jar
+ for jar in $out/lib/*.jar; do
+ classpath="$classpath:$jar"
+ done
+
+ mkdir -p $out/bin
+ makeWrapper ${jre}/bin/java $out/bin/epubcheck \
+ --add-flags "-classpath $classpath com.adobe.epubcheck.tool.Checker"
+ '';
+
+ meta = with stdenv.lib; {
+ homepage = https://github.com/w3c/epubcheck;
+ description = "Validation tool for EPUB";
+ license = with licenses; [ asl20 bsd3 mpl10 w3c ];
+ platforms = platforms.all;
+ maintainers = with maintainers; [ eadwu ];
+ };
+}