mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-11 22:54:17 +00:00
Merge pull request #227160 from treed/jinx-on-darwin
emacs.pkgs.jinx: use platform-specific library extension
This commit is contained in:
commit
1d01024c5b
@ -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;
|
dontUnpack = false;
|
||||||
|
|
||||||
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [
|
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [
|
||||||
@ -117,12 +119,12 @@ self: let
|
|||||||
|
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
NIX_CFLAGS_COMPILE="$($PKG_CONFIG --cflags enchant-2) $NIX_CFLAGS_COMPILE"
|
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" + ''
|
postInstall = (old.postInstall or "") + "\n" + ''
|
||||||
outd=$out/share/emacs/site-lisp/elpa/jinx-*
|
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
|
rm $outd/jinx-mod.c $outd/emacs-module.h
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -314,7 +314,9 @@ let
|
|||||||
|
|
||||||
ivy-rtags = fix-rtags super.ivy-rtags;
|
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 [ ]) ++ [
|
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [
|
||||||
pkgs.pkg-config
|
pkgs.pkg-config
|
||||||
];
|
];
|
||||||
@ -324,14 +326,14 @@ let
|
|||||||
postBuild = ''
|
postBuild = ''
|
||||||
pushd working/jinx
|
pushd working/jinx
|
||||||
NIX_CFLAGS_COMPILE="$($PKG_CONFIG --cflags enchant-2) $NIX_CFLAGS_COMPILE"
|
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
|
popd
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = (old.postInstall or "") + "\n" + ''
|
postInstall = (old.postInstall or "") + "\n" + ''
|
||||||
pushd source
|
pushd source
|
||||||
outd=$(echo $out/share/emacs/site-lisp/elpa/jinx-*)
|
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
|
rm $outd/jinx-mod.c $outd/emacs-module.h
|
||||||
popd
|
popd
|
||||||
'';
|
'';
|
||||||
|
Loading…
Reference in New Issue
Block a user