mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-20 12:07:53 +03:00
290a5d916e
Based on "problems" from repology: https://repology.org/repository/nix_unstable/problems Mostly simple changes to reflect redirects.
56 lines
1.4 KiB
Nix
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;
|
|
};
|
|
}
|