mirror of
https://github.com/engineer-man/piston.git
synced 2025-06-08 03:06:26 +02:00
add piston nix pkg for emacs
This commit is contained in:
parent
2f2bb862e3
commit
961b678948
7 changed files with 31 additions and 38 deletions
24
packages/emacs/27.1.0/build.sh
vendored
24
packages/emacs/27.1.0/build.sh
vendored
|
@ -1,24 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
export PATH=$PWD/bin:$PATH
|
|
||||||
|
|
||||||
PREFIX=$(realpath $(dirname $0))
|
|
||||||
|
|
||||||
mkdir -p build
|
|
||||||
|
|
||||||
cd build
|
|
||||||
|
|
||||||
# Emacs version 27.1 supports Docker builds
|
|
||||||
# Otherwise, older versions will work too, but you will have to disable `/proc/sys/kernel/randomize_va_space` which is less secure
|
|
||||||
curl -L "http://ftpmirror.gnu.org/emacs/emacs-27.1.tar.gz" -o emacs.tar.gz
|
|
||||||
tar xzf emacs.tar.gz --strip-components=1
|
|
||||||
rm emacs.tar.gz
|
|
||||||
|
|
||||||
# Building without all that X11 stuff
|
|
||||||
./configure --prefix="$PREFIX" --with-x=no --with-x-toolkit=no --with-xpm=no --with-jpeg=no --with-png=no --with-gif=no --with-tiff=no --with-gnutls=no
|
|
||||||
make -j$(nproc)
|
|
||||||
make install -j$(nproc)
|
|
||||||
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
rm -rf build
|
|
4
packages/emacs/27.1.0/environment
vendored
4
packages/emacs/27.1.0/environment
vendored
|
@ -1,4 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Put 'export' statements here for environment variables
|
|
||||||
export PATH=$PWD/bin:$PATH
|
|
5
packages/emacs/27.1.0/metadata.json
vendored
5
packages/emacs/27.1.0/metadata.json
vendored
|
@ -1,5 +0,0 @@
|
||||||
{
|
|
||||||
"language": "emacs",
|
|
||||||
"version": "27.1.0",
|
|
||||||
"aliases": ["emacs", "el", "elisp"]
|
|
||||||
}
|
|
4
packages/emacs/27.1.0/run
vendored
4
packages/emacs/27.1.0/run
vendored
|
@ -1,4 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Put instructions to run the runtime
|
|
||||||
emacs -Q --script "$@"
|
|
1
packages/emacs/27.1.0/test.el
vendored
1
packages/emacs/27.1.0/test.el
vendored
|
@ -1 +0,0 @@
|
||||||
(princ "OK")
|
|
|
@ -50,4 +50,5 @@ args: {
|
||||||
"gcc-d" = import ./gcc-d.nix args;
|
"gcc-d" = import ./gcc-d.nix args;
|
||||||
"gcc-fortran" = import ./gcc-fortran.nix args;
|
"gcc-fortran" = import ./gcc-fortran.nix args;
|
||||||
"yabasic" = import ./yabasic.nix args;
|
"yabasic" = import ./yabasic.nix args;
|
||||||
|
"emacs" = import ./emacs.nix args;
|
||||||
}
|
}
|
||||||
|
|
30
runtimes/emacs.nix
Normal file
30
runtimes/emacs.nix
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
{pkgs, piston, ...}:
|
||||||
|
let
|
||||||
|
pkg = pkgs.emacs-nox;
|
||||||
|
in piston.mkRuntime {
|
||||||
|
language = "emacs";
|
||||||
|
version = pkg.version;
|
||||||
|
|
||||||
|
aliases = [
|
||||||
|
"el"
|
||||||
|
"elisp"
|
||||||
|
];
|
||||||
|
|
||||||
|
run = ''
|
||||||
|
${pkg}/bin/emacs -Q --script "$@"
|
||||||
|
'';
|
||||||
|
|
||||||
|
tests = [
|
||||||
|
(piston.mkTest {
|
||||||
|
files = {
|
||||||
|
"test.el" = ''
|
||||||
|
(princ "OK")
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
args = [];
|
||||||
|
stdin = "";
|
||||||
|
packages = [];
|
||||||
|
main = "test.el";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue