Skip to content

Commit

Permalink
lowdown: 1.0.0 -> 1.0.1
Browse files Browse the repository at this point in the history
Upstream now officially supports darwin and we can drop the workaround
we shipped for <kristapsdz/lowdown#87>.

It also creates the symlink from liblowdown.so to the version shared
object for us, but we still need to fix the library extension on darwin.

https://github.com/kristapsdz/lowdown/releases/tag/VERSION_1_0_1
  • Loading branch information
sternenseemann committed May 2, 2023
1 parent 966144b commit bfe0e3f
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions pkgs/tools/typesetting/lowdown/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,15 @@

stdenv.mkDerivation rec {
pname = "lowdown";
version = "1.0.0";
version = "1.0.1";

outputs = [ "out" "lib" "dev" "man" ];

src = fetchurl {
url = "https://kristaps.bsd.lv/lowdown/snapshots/lowdown-${version}.tar.gz";
sha512 = "2izqgzk677y511kms09c0hgar2ax5cd5hspr8djsa3qykaxq0688xkgfad00bl6j0jpixna714ipvqa0gxm480iz2sma7qhdgr6bl4x";
sha512 = "2jsskdrx035vy5kyb371swcn23vj7ww1fmrsalmyp1jc3459vgh2lk4nlvrw74r93z9yyzsq9vra2sspx173cpjlr8lyyqdw5h91lms";
};

# Upstream always passes GNU-style "soname", but cctools expects "install_name".
# Whatever name is inserted will be replaced by fixDarwinDylibNames.
# https://github.com/kristapsdz/lowdown/issues/87
postPatch = lib.optionalString stdenv.isDarwin ''
substituteInPlace Makefile --replace soname install_name
'';

nativeBuildInputs = [ which ]
++ lib.optionals stdenv.isDarwin [ fixDarwinDylibNames ];

Expand Down Expand Up @@ -58,8 +51,6 @@ stdenv.mkDerivation rec {

lib.optionalString (enableShared && stdenv.isDarwin) ''
mv $lib/lib/liblowdown.{so.1,1.dylib}
'' + lib.optionalString enableShared ''
ln -s $lib/lib/liblowdown*${sharedLibrary}* $lib/lib/liblowdown${sharedLibrary}
'';

doInstallCheck = stdenv.hostPlatform == stdenv.buildPlatform;
Expand Down

0 comments on commit bfe0e3f

Please sign in to comment.