mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-06 04:53:27 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
44 lines
1.1 KiB
Nix
44 lines
1.1 KiB
Nix
{ lib, stdenv, fetchzip
|
|
, jre, makeWrapper }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "epubcheck";
|
|
version = "5.1.0";
|
|
|
|
src = fetchzip {
|
|
url = "https://github.com/w3c/epubcheck/releases/download/v${version}/epubcheck-${version}.zip";
|
|
sha256 = "sha256-gskQ02lGka3nBHSDXO3TpKSQzaoaJUQY9AvWG7L+1YM=";
|
|
};
|
|
|
|
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 lib; {
|
|
homepage = "https://github.com/w3c/epubcheck";
|
|
description = "Validation tool for EPUB";
|
|
mainProgram = "epubcheck";
|
|
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
|
license = with licenses; [ asl20 bsd3 mpl10 w3c ];
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [ eadwu ];
|
|
};
|
|
}
|