lol

Merge pull request #227160 from treed/jinx-on-darwin

emacs.pkgs.jinx: use platform-specific library extension

authored by

adisbladis and committed by
GitHub
1d01024c d72657a3

+10 -6
+5 -3
pkgs/applications/editors/emacs/elisp-packages/elpa-packages.nix
··· 106 106 }; 107 107 }); 108 108 109 - jinx = super.jinx.overrideAttrs (old: { 109 + jinx = super.jinx.overrideAttrs (old: let 110 + libExt = pkgs.stdenv.targetPlatform.extensions.sharedLibrary; 111 + in { 110 112 dontUnpack = false; 111 113 112 114 nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ ··· 117 119 118 120 postBuild = '' 119 121 NIX_CFLAGS_COMPILE="$($PKG_CONFIG --cflags enchant-2) $NIX_CFLAGS_COMPILE" 120 - $CC -shared -o jinx-mod.so jinx-mod.c -lenchant-2 122 + $CC -shared -o jinx-mod${libExt} jinx-mod.c -lenchant-2 121 123 ''; 122 124 123 125 postInstall = (old.postInstall or "") + "\n" + '' 124 126 outd=$out/share/emacs/site-lisp/elpa/jinx-* 125 - install -m444 -t $outd jinx-mod.so 127 + install -m444 -t $outd jinx-mod${libExt} 126 128 rm $outd/jinx-mod.c $outd/emacs-module.h 127 129 ''; 128 130
+5 -3
pkgs/applications/editors/emacs/elisp-packages/melpa-packages.nix
··· 314 314 315 315 ivy-rtags = fix-rtags super.ivy-rtags; 316 316 317 - jinx = super.jinx.overrideAttrs (old: { 317 + jinx = super.jinx.overrideAttrs (old: let 318 + libExt = pkgs.stdenv.targetPlatform.extensions.sharedLibrary; 319 + in { 318 320 nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ 319 321 pkgs.pkg-config 320 322 ]; ··· 324 326 postBuild = '' 325 327 pushd working/jinx 326 328 NIX_CFLAGS_COMPILE="$($PKG_CONFIG --cflags enchant-2) $NIX_CFLAGS_COMPILE" 327 - $CC -shared -o jinx-mod.so jinx-mod.c -lenchant-2 329 + $CC -shared -o jinx-mod${libExt} jinx-mod.c -lenchant-2 328 330 popd 329 331 ''; 330 332 331 333 postInstall = (old.postInstall or "") + "\n" + '' 332 334 pushd source 333 335 outd=$(echo $out/share/emacs/site-lisp/elpa/jinx-*) 334 - install -m444 --target-directory=$outd jinx-mod.so 336 + install -m444 --target-directory=$outd jinx-mod${libExt} 335 337 rm $outd/jinx-mod.c $outd/emacs-module.h 336 338 popd 337 339 '';