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