Merge pull request #227160 from treed/jinx-on-darwin
emacs.pkgs.jinx: use platform-specific library extension
This commit is contained in:
commit
1d01024c5b
2 changed files with 10 additions and 6 deletions
|
@ -106,7 +106,9 @@ self: let
|
|||
};
|
||||
});
|
||||
|
||||
jinx = super.jinx.overrideAttrs (old: {
|
||||
jinx = super.jinx.overrideAttrs (old: let
|
||||
libExt = pkgs.stdenv.targetPlatform.extensions.sharedLibrary;
|
||||
in {
|
||||
dontUnpack = false;
|
||||
|
||||
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [
|
||||
|
@ -117,12 +119,12 @@ self: let
|
|||
|
||||
postBuild = ''
|
||||
NIX_CFLAGS_COMPILE="$($PKG_CONFIG --cflags enchant-2) $NIX_CFLAGS_COMPILE"
|
||||
$CC -shared -o jinx-mod.so jinx-mod.c -lenchant-2
|
||||
$CC -shared -o jinx-mod${libExt} jinx-mod.c -lenchant-2
|
||||
'';
|
||||
|
||||
postInstall = (old.postInstall or "") + "\n" + ''
|
||||
outd=$out/share/emacs/site-lisp/elpa/jinx-*
|
||||
install -m444 -t $outd jinx-mod.so
|
||||
install -m444 -t $outd jinx-mod${libExt}
|
||||
rm $outd/jinx-mod.c $outd/emacs-module.h
|
||||
'';
|
||||
|
||||
|
|
|
@ -314,7 +314,9 @@ let
|
|||
|
||||
ivy-rtags = fix-rtags super.ivy-rtags;
|
||||
|
||||
jinx = super.jinx.overrideAttrs (old: {
|
||||
jinx = super.jinx.overrideAttrs (old: let
|
||||
libExt = pkgs.stdenv.targetPlatform.extensions.sharedLibrary;
|
||||
in {
|
||||
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [
|
||||
pkgs.pkg-config
|
||||
];
|
||||
|
@ -324,14 +326,14 @@ let
|
|||
postBuild = ''
|
||||
pushd working/jinx
|
||||
NIX_CFLAGS_COMPILE="$($PKG_CONFIG --cflags enchant-2) $NIX_CFLAGS_COMPILE"
|
||||
$CC -shared -o jinx-mod.so jinx-mod.c -lenchant-2
|
||||
$CC -shared -o jinx-mod${libExt} jinx-mod.c -lenchant-2
|
||||
popd
|
||||
'';
|
||||
|
||||
postInstall = (old.postInstall or "") + "\n" + ''
|
||||
pushd source
|
||||
outd=$(echo $out/share/emacs/site-lisp/elpa/jinx-*)
|
||||
install -m444 --target-directory=$outd jinx-mod.so
|
||||
install -m444 --target-directory=$outd jinx-mod${libExt}
|
||||
rm $outd/jinx-mod.c $outd/emacs-module.h
|
||||
popd
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue