Commit dc24509e authored by Ted Reed's avatar Ted Reed
Browse files

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

parent 496c532a
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -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
        '';

+5 −3
Original line number Diff line number Diff line
@@ -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
          '';