Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pkgs/applications/editors/emacs/build-support/melpa.nix
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,16 @@ genericBuild ({
buildPhase = ''
runHook preBuild

cd "$NIX_BUILD_TOP"
pushd "$NIX_BUILD_TOP"

emacs --batch -Q \
-L "$NIX_BUILD_TOP/package-build" \
-l "$melpa2nix" \
-f melpa2nix-build-package \
$ename $melpaVersion $commit

popd

runHook postBuild
'';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ melpaBuild {
checkPhase = ''
runHook preCheck

cd "$sourceRoot"
mkfifo test.log
cat < test.log &
HOME=$(mktemp -d) python -m test.test
Expand Down
62 changes: 15 additions & 47 deletions pkgs/applications/editors/emacs/elisp-packages/melpa-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,13 @@ let
buildInputs = old.buildInputs ++ [ pkgs.sqlite ];

postBuild = ''
cd source/sqlite
pushd sqlite
make
cd -
popd
'';

postInstall = (old.postInstall or "") + "\n" + ''
install -m=755 -D source/sqlite/emacsql-sqlite \
install -m=755 -D sqlite/emacsql-sqlite \
$out/share/emacs/site-lisp/elpa/emacsql-${old.version}/sqlite/emacsql-sqlite
'';

Expand All @@ -203,13 +203,13 @@ let
buildInputs = old.buildInputs ++ [ pkgs.sqlite ];

postBuild = ''
cd source/sqlite
pushd sqlite
make
cd -
popd
'';

postInstall = (old.postInstall or "") + "\n" + ''
install -m=755 -D source/sqlite/emacsql-sqlite \
install -m=755 -D sqlite/emacsql-sqlite \
$out/share/emacs/site-lisp/elpa/emacsql-sqlite-${old.version}/sqlite/emacsql-sqlite
'';

Expand Down Expand Up @@ -296,25 +296,25 @@ let
'';

postInstall = (old.postInstall or "") + "\n" + ''
install source/hotfuzz-module.so $out/share/emacs/site-lisp/elpa/hotfuzz-*
install hotfuzz-module.so $out/share/emacs/site-lisp/elpa/hotfuzz-*
'';
});

irony = super.irony.overrideAttrs (old: {
cmakeFlags = old.cmakeFlags or [ ] ++ [ "-DCMAKE_INSTALL_BINDIR=bin" ];
env.NIX_CFLAGS_COMPILE = "-UCLANG_RESOURCE_DIR";
preConfigure = ''
cd server
pushd server
'';
preBuild = ''
make
install -D bin/irony-server $out/bin/irony-server
cd ..
popd
'';
checkPhase = ''
cd source/server
pushd server
make check
cd ../..
popd
'';
preFixup = ''
rm -rf $out/share/emacs/site-lisp/elpa/*/server
Expand Down Expand Up @@ -343,18 +343,14 @@ let
buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.enchant2 ];

postBuild = ''
pushd working/jinx
NIX_CFLAGS_COMPILE="$($PKG_CONFIG --cflags enchant-2) $NIX_CFLAGS_COMPILE"
$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${libExt}
rm $outd/jinx-mod.c $outd/emacs-module.h
popd
'';

meta = old.meta // {
Expand All @@ -366,44 +362,20 @@ let
buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.sqlite ];

postBuild = ''
pushd working/sqlite3
make
popd
'';

postInstall = (old.postInstall or "") + "\n" + ''
pushd source
outd=$out/share/emacs/site-lisp/elpa/sqlite3-*
install -m444 -t $outd sqlite3-api.so
rm $outd/*.c $outd/*.h
popd
'';

meta = old.meta // {
maintainers = [ lib.maintainers.DamienCassou ];
};
});

libgit = super.libgit.overrideAttrs(attrs: {
nativeBuildInputs = (attrs.nativeBuildInputs or []) ++ [ pkgs.cmake ];
buildInputs = attrs.buildInputs ++ [ pkgs.libgit2 ];
dontUseCmakeBuildDir = true;
postPatch = ''
sed -i s/'add_subdirectory(libgit2)'// CMakeLists.txt
'';
postBuild = ''
pushd working/libgit
make
popd
'';
postInstall = (attrs.postInstall or "") + "\n" + ''
outd=$(echo $out/share/emacs/site-lisp/elpa/libgit-**)
mkdir $outd/build
install -m444 -t $outd/build ./source/src/libegit2.so
rm -r $outd/src $outd/Makefile $outd/CMakeLists.txt
'';
});

evil-magit = buildWithGit super.evil-magit;

eopengrok = buildWithGit super.eopengrok;
Expand Down Expand Up @@ -559,14 +531,14 @@ let
'';

postBuild = ''
cd source/server
pushd server
make
cd -
popd
'';

postInstall = (old.postInstall or "") + "\n" + ''
mkdir -p $out/bin
install -m755 -Dt $out/bin ./source/server/telega-server
install -m755 -Dt $out/bin server/telega-server
'';
});

Expand Down Expand Up @@ -696,10 +668,8 @@ let
# we need the proper out directory to exist, so we do this in the
# postInstall instead of postBuild
postInstall = (old.postInstall or "") + "\n" + ''
pushd source/build >/dev/null
make
install -m444 -t $out/share/emacs/site-lisp/elpa/vterm-** ../*.so
popd > /dev/null
rm -rf $out/share/emacs/site-lisp/elpa/vterm-**/{CMake*,build,*.c,*.h}
'';
});
Expand Down Expand Up @@ -737,9 +707,7 @@ let
buildInputs =
old.buildInputs ++
(with pkgs.darwin.apple_sdk.frameworks; [CoreServices Foundation]);
dontUnpack = false;
buildPhase = (old.buildPhase or "") + ''
cd source
postBuild = (old.postBuild or "") + ''
$CXX -O3 -framework CoreServices -framework Foundation osx-dictionary.m -o osx-dictionary-cli
'';
postInstall = (old.postInstall or "") + "\n" + ''
Expand Down