diff --git a/pkgs/by-name/em/empty-pdf/package.nix b/pkgs/by-name/em/empty-pdf/package.nix new file mode 100644 index 000000000000..740f459efe1c --- /dev/null +++ b/pkgs/by-name/em/empty-pdf/package.nix @@ -0,0 +1,39 @@ +{ + stdenvNoCC, + imagemagick, + lib, +}: + +stdenvNoCC.mkDerivation { + name = "empty-pdf"; + __structuredAttrs = true; + + dontUnpack = true; + + nativeBuildInputs = [ imagemagick ]; + + buildPhase = '' + runHook preBuild + + magick xc:none -page Letter empty.pdf + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + mv empty.pdf $out + + runHook postInstall + ''; + + meta = { + description = "Empty PDF file intended for testing"; + maintainers = with lib.maintainers; [ + pandapip1 + thefossguy + ]; + platforms = imagemagick.meta.platforms; + }; +}