nixpkgs/pkgs/tools/typesetting/asciidoctor/default.nix
Matthew Bauer 290a5d916e treewide: update homepages to https where available
Based on "problems" from repology:

https://repology.org/repository/nix_unstable/problems

Mostly simple changes to reflect redirects.
2019-04-15 10:10:05 -04:00

56 lines
1.4 KiB
Nix

{ stdenv, lib, bundlerApp, ruby
# Dependencies of the 'mathematical' package
, cmake, bison, flex, glib, pkgconfig, cairo
, pango, gdk_pixbuf, libxml2, python3, patchelf
}:
bundlerApp {
inherit ruby;
pname = "asciidoctor";
gemdir = ./.;
exes = [
"asciidoctor"
"asciidoctor-bespoke"
"asciidoctor-latex"
"asciidoctor-pdf"
"asciidoctor-safe"
];
gemConfig = {
mathematical = attrs: {
buildInputs = [
cmake
bison
flex
glib
pkgconfig
cairo
pango
gdk_pixbuf
libxml2
python3
];
# The ruby build script takes care of this
dontUseCmakeConfigure = true;
# For some reason 'mathematical.so' is missing cairo and glib in its RPATH, add them explicitly here
postFixup = lib.optionalString stdenv.isLinux ''
soPath="$out/${ruby.gemPath}/gems/mathematical-${attrs.version}/lib/mathematical/mathematical.so"
${patchelf}/bin/patchelf \
--set-rpath "${lib.makeLibraryPath [ glib cairo ]}:$(${patchelf}/bin/patchelf --print-rpath "$soPath")" \
"$soPath"
'';
};
};
meta = with lib; {
description = "A faster Asciidoc processor written in Ruby";
homepage = https://asciidoctor.org/;
license = licenses.mit;
maintainers = with maintainers; [ gpyh ];
platforms = platforms.unix;
};
}