nixpkgs/pkgs/tools/typesetting/lowdown/default.nix
sternenseemann b9f5c991b2 lowdown: 0.8.1 -> 0.8.2
Bug fixes for gemini and the difference engine, new lowdown-diff(1) man
page:

e1ed0e1b11/versions.xml (L1021-L1066)
2021-02-22 17:51:44 +01:00

42 lines
1.2 KiB
Nix

{ lib, stdenv, fetchurl, fixDarwinDylibNames, which }:
stdenv.mkDerivation rec {
pname = "lowdown";
version = "0.8.2";
outputs = [ "out" "lib" "dev" "man" ];
src = fetchurl {
url = "https://kristaps.bsd.lv/lowdown/snapshots/lowdown-${version}.tar.gz";
sha512 = "07xy6yjs24zkwrr06ly4ln5czvm3azw6iznx6m8gbrmzblkcp3gz1jcl9wclcyl8bs4xhgmyzkf5k67b95s0jndhyb9ap5zy6ixnias";
};
nativeBuildInputs = [ which ]
++ lib.optionals stdenv.isDarwin [ fixDarwinDylibNames ];
configurePhase = ''
runHook preConfigure
./configure PREFIX=''${!outputDev} \
BINDIR=''${!outputBin}/bin \
LIBDIR=''${!outputLib}/lib \
MANDIR=''${!outputMan}/share/man
runHook postConfigure
'';
# Fix lib extension so that fixDarwinDylibNames detects it
postInstall = lib.optionalString stdenv.isDarwin ''
mv $lib/lib/liblowdown.{so,dylib}
'';
patches = lib.optional (!stdenv.hostPlatform.isStatic) ./shared.patch;
meta = with lib; {
homepage = "https://kristaps.bsd.lv/lowdown/";
description = "Simple markdown translator";
license = licenses.isc;
maintainers = [ maintainers.sternenseemann ];
platforms = platforms.unix;
};
}