uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
31
pkgs/applications/editors/aewan/default.nix
Normal file
31
pkgs/applications/editors/aewan/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ lib, stdenv, fetchurl, fetchpatch, zlib, ncurses }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "aewan";
|
||||
version = "1.0.01";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/aewan/${pname}-${version}.tar.gz";
|
||||
sha256 = "5266dec5e185e530b792522821c97dfa5f9e3892d0dca5e881d0c30ceac21817";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Pull patch pending upstream inclusion:
|
||||
# https://sourceforge.net/p/aewan/bugs/13/
|
||||
(fetchpatch {
|
||||
url = "https://sourceforge.net/p/aewan/bugs/13/attachment/aewan-cvs-ncurses-6.3.patch";
|
||||
sha256 = "0pgpk1l3d6d5y37lvvavipwnmv9gmpfdy21jkz6baxhlkgf43r4p";
|
||||
# patch is in CVS diff format, add 'a/' prefix
|
||||
extraPrefix = "";
|
||||
})
|
||||
];
|
||||
|
||||
buildInputs = [ zlib ncurses ];
|
||||
|
||||
meta = {
|
||||
description = "Ascii-art Editor Without A Name";
|
||||
homepage = "http://aewan.sourceforge.net/";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
31
pkgs/applications/editors/amp/default.nix
Normal file
31
pkgs/applications/editors/amp/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ lib, stdenv, fetchFromGitHub, rustPlatform, openssl, pkg-config, python3, xorg, cmake, libgit2, darwin
|
||||
, curl }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "amp";
|
||||
version = "0.6.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jmacdonald";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "0l1vpcfq6jrq2dkrmsa4ghwdpp7c54f46gz3n7nk0i41b12hnigw";
|
||||
};
|
||||
|
||||
cargoSha256 = "19r3xvysragmf02zk2l5s2hjg92gxdygsh52y7za81x443lvjyvq";
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config python3 ];
|
||||
buildInputs = [ openssl xorg.libxcb libgit2 ] ++ lib.optionals stdenv.isDarwin
|
||||
(with darwin.apple_sdk.frameworks; [ curl Security AppKit ]);
|
||||
|
||||
# Tests need to write to the theme directory in HOME.
|
||||
preCheck = "export HOME=`mktemp -d`";
|
||||
|
||||
meta = with lib; {
|
||||
description = "A modern text editor inspired by Vim";
|
||||
homepage = "https://amp.rs";
|
||||
license = [ licenses.gpl3 ];
|
||||
maintainers = [ maintainers.sb0 ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
240
pkgs/applications/editors/android-studio/common.nix
Normal file
240
pkgs/applications/editors/android-studio/common.nix
Normal file
|
|
@ -0,0 +1,240 @@
|
|||
{ channel, pname, version, sha256Hash }:
|
||||
|
||||
{ alsa-lib
|
||||
, bash
|
||||
, buildFHSUserEnv
|
||||
, cacert
|
||||
, coreutils
|
||||
, dbus
|
||||
, e2fsprogs
|
||||
, expat
|
||||
, fetchurl
|
||||
, findutils
|
||||
, file
|
||||
, fontsConf
|
||||
, git
|
||||
, glxinfo
|
||||
, gnugrep
|
||||
, gnused
|
||||
, gnutar
|
||||
, gtk2, gnome_vfs, glib, GConf
|
||||
, gzip
|
||||
, fontconfig
|
||||
, freetype
|
||||
, libpulseaudio
|
||||
, libGL
|
||||
, libuuid
|
||||
, libX11
|
||||
, libxcb
|
||||
, libXcomposite
|
||||
, libXcursor
|
||||
, libXdamage
|
||||
, libXext
|
||||
, libXfixes
|
||||
, libXi
|
||||
, libXrandr
|
||||
, libXrender
|
||||
, libXtst
|
||||
, makeWrapper
|
||||
, ncurses5
|
||||
, nspr
|
||||
, nss
|
||||
, pciutils
|
||||
, pkgsi686Linux
|
||||
, ps
|
||||
, setxkbmap
|
||||
, lib
|
||||
, stdenv
|
||||
, systemd
|
||||
, unzip
|
||||
, usbutils
|
||||
, which
|
||||
, runCommand
|
||||
, xkeyboard_config
|
||||
, zlib
|
||||
, makeDesktopItem
|
||||
, tiling_wm # if we are using a tiling wm, need to set _JAVA_AWT_WM_NONREPARENTING in wrapper
|
||||
}:
|
||||
|
||||
let
|
||||
drvName = "android-studio-${channel}-${version}";
|
||||
filename = "android-studio-${version}-linux.tar.gz";
|
||||
|
||||
androidStudio = stdenv.mkDerivation {
|
||||
name = "${drvName}-unwrapped";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://dl.google.com/dl/android/studio/ide-zips/${version}/${filename}";
|
||||
sha256 = sha256Hash;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
unzip
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
# Causes the shebangs in interpreter scripts deployed to mobile devices to be patched, which Android does not understand
|
||||
dontPatchShebangs = true;
|
||||
|
||||
installPhase = ''
|
||||
cp -r . $out
|
||||
wrapProgram $out/bin/studio.sh \
|
||||
--set-default JAVA_HOME "$out/jre" \
|
||||
--set ANDROID_EMULATOR_USE_SYSTEM_LIBS 1 \
|
||||
--set QT_XKB_CONFIG_ROOT "${xkeyboard_config}/share/X11/xkb" \
|
||||
${lib.optionalString tiling_wm "--set _JAVA_AWT_WM_NONREPARENTING 1"} \
|
||||
--set FONTCONFIG_FILE ${fontsConf} \
|
||||
--prefix PATH : "${lib.makeBinPath [
|
||||
|
||||
# Checked in studio.sh
|
||||
coreutils
|
||||
findutils
|
||||
gnugrep
|
||||
which
|
||||
gnused
|
||||
|
||||
# For Android emulator
|
||||
file
|
||||
glxinfo
|
||||
pciutils
|
||||
setxkbmap
|
||||
|
||||
# Used during setup wizard
|
||||
gnutar
|
||||
gzip
|
||||
|
||||
# Runtime stuff
|
||||
git
|
||||
ps
|
||||
usbutils
|
||||
]}" \
|
||||
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [
|
||||
|
||||
# Crash at startup without these
|
||||
fontconfig
|
||||
freetype
|
||||
libXext
|
||||
libXi
|
||||
libXrender
|
||||
libXtst
|
||||
|
||||
# No crash, but attempted to load at startup
|
||||
e2fsprogs
|
||||
|
||||
# Gradle wants libstdc++.so.6
|
||||
stdenv.cc.cc.lib
|
||||
# mksdcard wants 32 bit libstdc++.so.6
|
||||
pkgsi686Linux.stdenv.cc.cc.lib
|
||||
|
||||
# aapt wants libz.so.1
|
||||
zlib
|
||||
pkgsi686Linux.zlib
|
||||
# Support multiple monitors
|
||||
libXrandr
|
||||
|
||||
# For Android emulator
|
||||
alsa-lib
|
||||
dbus
|
||||
expat
|
||||
libpulseaudio
|
||||
libuuid
|
||||
libX11
|
||||
libxcb
|
||||
libXcomposite
|
||||
libXcursor
|
||||
libXdamage
|
||||
libXfixes
|
||||
libGL
|
||||
nspr
|
||||
nss
|
||||
systemd
|
||||
|
||||
# For GTKLookAndFeel
|
||||
gtk2
|
||||
gnome_vfs
|
||||
glib
|
||||
GConf
|
||||
]}"
|
||||
|
||||
# AS launches LLDBFrontend with a custom LD_LIBRARY_PATH
|
||||
wrapProgram $(find $out -name LLDBFrontend) --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [
|
||||
ncurses5
|
||||
zlib
|
||||
]}"
|
||||
'';
|
||||
};
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
name = pname;
|
||||
exec = pname;
|
||||
icon = pname;
|
||||
desktopName = "Android Studio (${channel} channel)";
|
||||
comment = "The official Android IDE";
|
||||
categories = [ "Development" "IDE" ];
|
||||
startupNotify = true;
|
||||
startupWMClass = "jetbrains-studio";
|
||||
};
|
||||
|
||||
# Android Studio downloads prebuilt binaries as part of the SDK. These tools
|
||||
# (e.g. `mksdcard`) have `/lib/ld-linux.so.2` set as the interpreter. An FHS
|
||||
# environment is used as a work around for that.
|
||||
fhsEnv = buildFHSUserEnv {
|
||||
name = "${drvName}-fhs-env";
|
||||
multiPkgs = pkgs: [
|
||||
ncurses5
|
||||
|
||||
# Flutter can only search for certs Fedora-way.
|
||||
(runCommand "fedoracert" {}
|
||||
''
|
||||
mkdir -p $out/etc/pki/tls/
|
||||
ln -s ${cacert}/etc/ssl/certs $out/etc/pki/tls/certs
|
||||
'')
|
||||
];
|
||||
};
|
||||
in runCommand
|
||||
drvName
|
||||
{
|
||||
startScript = ''
|
||||
#!${bash}/bin/bash
|
||||
${fhsEnv}/bin/${drvName}-fhs-env ${androidStudio}/bin/studio.sh
|
||||
'';
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = false;
|
||||
passthru = {
|
||||
unwrapped = androidStudio;
|
||||
};
|
||||
meta = with lib; {
|
||||
description = "The Official IDE for Android (${channel} channel)";
|
||||
longDescription = ''
|
||||
Android Studio is the official IDE for Android app development, based on
|
||||
IntelliJ IDEA.
|
||||
'';
|
||||
homepage = if channel == "stable"
|
||||
then "https://developer.android.com/studio/index.html"
|
||||
else "https://developer.android.com/studio/preview/index.html";
|
||||
license = with licenses; [ asl20 unfree ]; # The code is under Apache-2.0, but:
|
||||
# If one selects Help -> Licenses in Android Studio, the dialog shows the following:
|
||||
# "Android Studio includes proprietary code subject to separate license,
|
||||
# including JetBrains CLion(R) (www.jetbrains.com/clion) and IntelliJ(R)
|
||||
# IDEA Community Edition (www.jetbrains.com/idea)."
|
||||
# Also: For actual development the Android SDK is required and the Google
|
||||
# binaries are also distributed as proprietary software (unlike the
|
||||
# source-code itself).
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = with maintainers; rec {
|
||||
stable = [ alapshin ];
|
||||
beta = [ alapshin ];
|
||||
canary = [ alapshin ];
|
||||
dev = canary;
|
||||
}."${channel}";
|
||||
};
|
||||
}
|
||||
''
|
||||
mkdir -p $out/{bin,share/pixmaps}
|
||||
|
||||
echo -n "$startScript" > $out/bin/${pname}
|
||||
chmod +x $out/bin/${pname}
|
||||
|
||||
ln -s ${androidStudio}/bin/studio.png $out/share/pixmaps/${pname}.png
|
||||
ln -s ${desktopItem}/share/applications $out/share/applications
|
||||
''
|
||||
46
pkgs/applications/editors/android-studio/default.nix
Normal file
46
pkgs/applications/editors/android-studio/default.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{ callPackage, makeFontsConf, gnome2, buildFHSUserEnv, tiling_wm ? false }:
|
||||
|
||||
let
|
||||
mkStudio = opts: callPackage (import ./common.nix opts) {
|
||||
fontsConf = makeFontsConf {
|
||||
fontDirectories = [];
|
||||
};
|
||||
inherit (gnome2) GConf gnome_vfs;
|
||||
inherit buildFHSUserEnv;
|
||||
inherit tiling_wm;
|
||||
};
|
||||
stableVersion = {
|
||||
version = "2021.2.1.14"; # "Android Studio Chipmunk (2021.2.1)"
|
||||
sha256Hash = "1cy7ngm160w819ikrd459kg6lnk1k16jjnjm3d0aksmlws5b12z9";
|
||||
};
|
||||
betaVersion = {
|
||||
version = "2021.2.1.11"; # "Android Studio Chipmunk (2021.2.1) Beta 4"
|
||||
sha256Hash = "0in8x6v957y9hsnz5ak845pdpvgvnvlm0s6r9y8f27zkm947vbjd";
|
||||
};
|
||||
latestVersion = { # canary & dev
|
||||
version = "2021.3.1.9"; # "Android Studio Dolphin (2021.3.1) Canary 9"
|
||||
sha256Hash = "0nx26xwy67mnbkz37m3nw354siv152sa6zx94pxrvbnxxgppigfb";
|
||||
};
|
||||
in {
|
||||
# Attributes are named by their corresponding release channels
|
||||
|
||||
stable = mkStudio (stableVersion // {
|
||||
channel = "stable";
|
||||
pname = "android-studio";
|
||||
});
|
||||
|
||||
beta = mkStudio (betaVersion // {
|
||||
channel = "beta";
|
||||
pname = "android-studio-beta";
|
||||
});
|
||||
|
||||
dev = mkStudio (latestVersion // {
|
||||
channel = "dev";
|
||||
pname = "android-studio-dev";
|
||||
});
|
||||
|
||||
canary = mkStudio (latestVersion // {
|
||||
channel = "canary";
|
||||
pname = "android-studio-canary";
|
||||
});
|
||||
}
|
||||
58
pkgs/applications/editors/apostrophe/default.nix
Normal file
58
pkgs/applications/editors/apostrophe/default.nix
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
{ lib, stdenv, fetchFromGitLab, meson, ninja
|
||||
, wrapGAppsHook, pkg-config, desktop-file-utils
|
||||
, appstream-glib, pythonPackages, glib, gobject-introspection
|
||||
, gtk3, webkitgtk, glib-networking, gnome, gspell, texlive
|
||||
, shared-mime-info, libhandy, fira, sassc
|
||||
}:
|
||||
|
||||
let
|
||||
pythonEnv = pythonPackages.python.withPackages(p: with p; [
|
||||
regex setuptools python-Levenshtein pyenchant
|
||||
pygobject3 pycairo pypandoc chardet
|
||||
]);
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "apostrophe";
|
||||
version = "2.6.3";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "World";
|
||||
repo = pname;
|
||||
domain = "gitlab.gnome.org";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-RBrrG1TO810LidIelYGNaK7PjDq84D0cA8VcMojAW3M=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ meson ninja pkg-config desktop-file-utils
|
||||
appstream-glib wrapGAppsHook sassc ];
|
||||
|
||||
buildInputs = [ glib pythonEnv gobject-introspection gtk3
|
||||
gnome.adwaita-icon-theme webkitgtk gspell texlive
|
||||
glib-networking libhandy ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace data/media/css/web/base.css \
|
||||
--replace 'url("/app/share/fonts/FiraSans-Regular.ttf") format("ttf")' \
|
||||
'url("${fira}/share/fonts/opentype/FiraSans-Regular.otf") format("otf")' \
|
||||
--replace 'url("/app/share/fonts/FiraMono-Regular.ttf") format("ttf")' \
|
||||
'url("${fira}/share/fonts/opentype/FiraMono-Regular.otf") format("otf")'
|
||||
|
||||
patchShebangs --build build-aux/meson_post_install.py
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
gappsWrapperArgs+=(
|
||||
--prefix PYTHONPATH : "$out/lib/python${pythonEnv.pythonVersion}/site-packages/"
|
||||
--prefix PATH : "${texlive}/bin"
|
||||
--prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
|
||||
)
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://gitlab.gnome.org/World/apostrophe";
|
||||
description = "A distraction free Markdown editor for GNU/Linux";
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.sternenseemann ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
diff --git a/src/she/CMakeLists.txt b/src/she/CMakeLists.txt
|
||||
index 4909ff1..02fa145 100644
|
||||
--- a/src/she/CMakeLists.txt
|
||||
+++ b/src/she/CMakeLists.txt
|
||||
@@ -23,2 +23,3 @@ if(USE_ALLEG4_BACKEND)
|
||||
add_definitions(-DUSE_MOUSE_POLLER)
|
||||
+ add_definitions(-DALLEGRO_NO_FIX_ALIASES)
|
||||
endif()
|
||||
126
pkgs/applications/editors/aseprite/default.nix
Normal file
126
pkgs/applications/editors/aseprite/default.nix
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
{ stdenv, lib, callPackage, fetchFromGitHub, fetchpatch, cmake, ninja, pkg-config
|
||||
, curl, freetype, giflib, libjpeg, libpng, libwebp, pixman, tinyxml, zlib
|
||||
, harfbuzzFull, glib, fontconfig, pcre
|
||||
, libX11, libXext, libXcursor, libXxf86vm, libGL
|
||||
, unfree ? false
|
||||
, cmark
|
||||
}:
|
||||
|
||||
# Unfree version is not redistributable:
|
||||
# https://dev.aseprite.org/2016/09/01/new-source-code-license/
|
||||
# Consider supporting the developer: https://aseprite.org/#buy
|
||||
|
||||
let
|
||||
skia = callPackage ./skia.nix {};
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "aseprite";
|
||||
version = if unfree then "1.2.16.3" else "1.1.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aseprite";
|
||||
repo = "aseprite";
|
||||
rev = "v${version}";
|
||||
fetchSubmodules = true;
|
||||
sha256 = if unfree
|
||||
then "16yn7y9xdc5jd50cq7bmsm320gv23pp71lr8hg2nmynzc8ibyda8"
|
||||
else "0gd49lns2bpzbkwax5jf9x1xmg1j8ij997kcxr2596cwiswnw4di";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake pkg-config
|
||||
] ++ lib.optionals unfree [ ninja ];
|
||||
|
||||
buildInputs = [
|
||||
curl freetype giflib libjpeg libpng libwebp pixman tinyxml zlib
|
||||
libX11 libXext libXcursor libXxf86vm
|
||||
] ++ lib.optionals unfree [
|
||||
cmark
|
||||
harfbuzzFull glib fontconfig pcre
|
||||
skia libGL
|
||||
];
|
||||
|
||||
patches = if !unfree then [
|
||||
./allegro-glibc-2.30.patch
|
||||
] else [
|
||||
(fetchpatch {
|
||||
url = "https://github.com/lfont/aseprite/commit/f1ebc47012d3fed52306ed5922787b4b98cc0a7b.patch";
|
||||
sha256 = "03xg7x6b9iv7z18vzlqxhcfphmx4v3qhs9f5rgf38ppyklca5jyw";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://github.com/orivej/aseprite/commit/ea87e65b357ad0bd65467af5529183b5a48a8c17.patch";
|
||||
sha256 = "1vwn8ivap1pzdh444sdvvkndp55iz146nhmd80xbm8cyzn3qmg91";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
sed -i src/config.h -e "s-\\(#define VERSION\\) .*-\\1 \"$version\"-"
|
||||
'';
|
||||
|
||||
cmakeFlags = [
|
||||
"-DENABLE_UPDATER=OFF"
|
||||
"-DUSE_SHARED_CURL=ON"
|
||||
"-DUSE_SHARED_FREETYPE=ON"
|
||||
"-DUSE_SHARED_GIFLIB=ON"
|
||||
"-DUSE_SHARED_JPEGLIB=ON"
|
||||
"-DUSE_SHARED_LIBPNG=ON"
|
||||
"-DUSE_SHARED_LIBWEBP=ON"
|
||||
"-DUSE_SHARED_PIXMAN=ON"
|
||||
"-DUSE_SHARED_TINYXML=ON"
|
||||
"-DUSE_SHARED_ZLIB=ON"
|
||||
"-DWITH_DESKTOP_INTEGRATION=ON"
|
||||
"-DWITH_WEBP_SUPPORT=ON"
|
||||
] ++ lib.optionals unfree [
|
||||
"-DUSE_SHARED_CMARK=ON"
|
||||
"-DUSE_SHARED_HARFBUZZ=ON"
|
||||
# Aseprite needs internal freetype headers.
|
||||
"-DUSE_SHARED_FREETYPE=OFF"
|
||||
# Disable libarchive programs.
|
||||
"-DENABLE_CAT=OFF"
|
||||
"-DENABLE_CPIO=OFF"
|
||||
"-DENABLE_TAR=OFF"
|
||||
# UI backend.
|
||||
"-DLAF_OS_BACKEND=skia"
|
||||
"-DSKIA_DIR=${skia}"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
# Install desktop icons.
|
||||
src="$out/share/aseprite/data/icons"
|
||||
for size in 16 32 48 64; do
|
||||
dst="$out"/share/icons/hicolor/"$size"x"$size"
|
||||
install -Dm644 "$src"/ase"$size".png "$dst"/apps/aseprite.png
|
||||
install -Dm644 "$src"/doc"$size".png "$dst"/mimetypes/aseprite.png
|
||||
done
|
||||
# Delete unneeded artifacts of bundled libraries.
|
||||
rm -rf "$out"/include "$out"/lib
|
||||
'';
|
||||
|
||||
passthru = { inherit skia; };
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.aseprite.org/";
|
||||
description = "Animated sprite editor & pixel art tool";
|
||||
license = if unfree then licenses.unfree else licenses.gpl2;
|
||||
longDescription =
|
||||
''Aseprite is a program to create animated sprites. Its main features are:
|
||||
|
||||
- Sprites are composed by layers & frames (as separated concepts).
|
||||
- Supported color modes: RGBA, Indexed (palettes up to 256 colors), and Grayscale.
|
||||
- Load/save sequence of PNG files and GIF animations (and FLC, FLI, JPG, BMP, PCX, TGA).
|
||||
- Export/import animations to/from Sprite Sheets.
|
||||
- Tiled drawing mode, useful to draw patterns and textures.
|
||||
- Undo/Redo for every operation.
|
||||
- Real-time animation preview.
|
||||
- Multiple editors support.
|
||||
- Pixel-art specific tools like filled Contour, Polygon, Shading mode, etc.
|
||||
- Onion skinning.
|
||||
'' + lib.optionalString unfree
|
||||
''
|
||||
This version is not redistributable: https://dev.aseprite.org/2016/09/01/new-source-code-license/
|
||||
Consider supporting the developer: https://aseprite.org/#buy
|
||||
'';
|
||||
maintainers = with maintainers; [ orivej ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
23
pkgs/applications/editors/aseprite/skia-deps.nix
Normal file
23
pkgs/applications/editors/aseprite/skia-deps.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ fetchgit }:
|
||||
{
|
||||
angle2 = fetchgit {
|
||||
url = "https://chromium.googlesource.com/angle/angle.git";
|
||||
rev = "956ab4d9fab36be9929e63829475d4d69b2c681c";
|
||||
sha256 = "0fcw04wwkn3ixr9l9k0d32n78r9g72p31ii9i5spsq2d0wlylr38";
|
||||
};
|
||||
dng_sdk = fetchgit {
|
||||
url = "https://android.googlesource.com/platform/external/dng_sdk.git";
|
||||
rev = "96443b262250c390b0caefbf3eed8463ba35ecae";
|
||||
sha256 = "1rsr7njhj7c5p87hfznj069fdc3qqhvvnq9sa2rb8c4q849rlzx6";
|
||||
};
|
||||
piex = fetchgit {
|
||||
url = "https://android.googlesource.com/platform/external/piex.git";
|
||||
rev = "bb217acdca1cc0c16b704669dd6f91a1b509c406";
|
||||
sha256 = "05ipmag6k55jmidbyvg5mkqm69zfw03gfkqhi9jnjlmlbg31y412";
|
||||
};
|
||||
sfntly = fetchgit {
|
||||
url = "https://chromium.googlesource.com/external/github.com/googlei18n/sfntly.git";
|
||||
rev = "b18b09b6114b9b7fe6fc2f96d8b15e8a72f66916";
|
||||
sha256 = "0zf1h0dibmm38ldypccg4faacvskmd42vsk6zbxlfcfwjlqm6pp4";
|
||||
};
|
||||
}
|
||||
37
pkgs/applications/editors/aseprite/skia-make-deps.sh
Executable file
37
pkgs/applications/editors/aseprite/skia-make-deps.sh
Executable file
|
|
@ -0,0 +1,37 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
FILTER=$1
|
||||
OUT=skia-deps.nix
|
||||
REVISION=89e4ca4352d05adc892f5983b108433f29b2c0c2
|
||||
DEPS=$(curl -s https://raw.githubusercontent.com/aseprite/skia/$REVISION/DEPS)
|
||||
THIRD_PARTY_DEPS=$(echo "$DEPS" | grep third_party | grep "#" -v | sed 's/"//g')
|
||||
|
||||
function write_fetch_defs ()
|
||||
{
|
||||
while read -r DEP; do
|
||||
NAME=$(echo "$DEP" | cut -d: -f1 | cut -d/ -f3 | sed 's/ //g')
|
||||
URL=$(echo "$DEP" | cut -d: -f2- | cut -d@ -f1 | sed 's/ //g')
|
||||
REV=$(echo "$DEP" | cut -d: -f2- | cut -d@ -f2 | sed 's/[ ,]//g')
|
||||
|
||||
echo "Fetching $NAME@$REV"
|
||||
PREFETCH=$(nix-prefetch-git --rev "$REV" "$URL")
|
||||
|
||||
(
|
||||
cat <<EOF
|
||||
$NAME = fetchgit {
|
||||
url = "$URL";
|
||||
rev = "$REV";
|
||||
sha256 = $(echo $PREFETCH | jq '.sha256');
|
||||
};
|
||||
EOF
|
||||
) >> "$OUT"
|
||||
|
||||
echo "----------"
|
||||
echo
|
||||
done <<< "$1"
|
||||
}
|
||||
|
||||
echo "{ fetchgit }:" > "$OUT"
|
||||
echo "{" >> "$OUT"
|
||||
write_fetch_defs "$(echo "$THIRD_PARTY_DEPS" | grep -E "$FILTER")"
|
||||
echo "}" >> "$OUT"
|
||||
85
pkgs/applications/editors/aseprite/skia.nix
Normal file
85
pkgs/applications/editors/aseprite/skia.nix
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
{ stdenv, lib, fetchFromGitHub, fetchgit, python2, gn, ninja
|
||||
, fontconfig, expat, icu58, libglvnd, libjpeg, libpng, libwebp, zlib
|
||||
, mesa, libX11
|
||||
}:
|
||||
|
||||
let
|
||||
# skia-deps.nix is generated by: ./skia-make-deps.sh 'angle2|dng_sdk|piex|sfntly'
|
||||
depSrcs = import ./skia-deps.nix { inherit fetchgit; };
|
||||
gnOld = gn.overrideAttrs (oldAttrs: rec {
|
||||
version = "20190403";
|
||||
src = fetchgit {
|
||||
url = "https://gn.googlesource.com/gn";
|
||||
rev = "64b846c96daeb3eaf08e26d8a84d8451c6cb712b";
|
||||
sha256 = "1v2kzsshhxn0ck6gd5w16gi2m3higwd9vkyylmsczxfxnw8skgpy";
|
||||
};
|
||||
});
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "skia";
|
||||
version = "aseprite-m71";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aseprite";
|
||||
repo = "skia";
|
||||
# latest commit from aseprite-m71 branch
|
||||
rev = "89e4ca4352d05adc892f5983b108433f29b2c0c2"; # TODO: Remove the gnOld override
|
||||
sha256 = "0n3vrkswvi6rib9zv2pzi18h3j5wm7flmgkgaikcm6q7iw4l2c7x";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ python2 gnOld ninja ];
|
||||
|
||||
buildInputs = [
|
||||
fontconfig expat icu58 libglvnd libjpeg libpng libwebp zlib
|
||||
mesa libX11
|
||||
];
|
||||
|
||||
preConfigure = with depSrcs; ''
|
||||
mkdir -p third_party/externals
|
||||
ln -s ${angle2} third_party/externals/angle2
|
||||
ln -s ${dng_sdk} third_party/externals/dng_sdk
|
||||
ln -s ${piex} third_party/externals/piex
|
||||
ln -s ${sfntly} third_party/externals/sfntly
|
||||
'';
|
||||
|
||||
configurePhase = ''
|
||||
runHook preConfigure
|
||||
gn gen out/Release --args="is_debug=false is_official_build=true"
|
||||
runHook postConfigure
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
ninja -C out/Release skia
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
|
||||
# Glob will match all subdirs.
|
||||
shopt -s globstar
|
||||
|
||||
# All these paths are used in some way when building aseprite.
|
||||
cp -r --parents -t $out/ \
|
||||
include/codec \
|
||||
include/config \
|
||||
include/core \
|
||||
include/effects \
|
||||
include/gpu \
|
||||
include/private \
|
||||
include/utils \
|
||||
out/Release/*.a \
|
||||
src/gpu/**/*.h \
|
||||
third_party/externals/angle2/include \
|
||||
third_party/skcms/**/*.h
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Skia is a complete 2D graphic library for drawing Text, Geometries, and Images";
|
||||
homepage = "https://skia.org/";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
95
pkgs/applications/editors/atom/default.nix
Normal file
95
pkgs/applications/editors/atom/default.nix
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
{ lib, stdenv, pkgs, fetchurl, wrapGAppsHook, glib, gtk3, atomEnv }:
|
||||
|
||||
let
|
||||
versions = {
|
||||
atom = {
|
||||
version = "1.58.0";
|
||||
sha256 = "sha256-QxDhr4gwlS9O/lk0nfqsw5sFiPckSTFL15XtRpQh0tU=";
|
||||
};
|
||||
|
||||
atom-beta = {
|
||||
version = "1.59.0";
|
||||
beta = 0;
|
||||
sha256 = "sha256-s1XHR2e4JPywdLiIcjTqMRILARDthHxBeTQOCIkhmXE=";
|
||||
broken = true;
|
||||
};
|
||||
};
|
||||
|
||||
common = pname: {version, sha256, beta ? null, broken ? false}:
|
||||
let fullVersion = version + lib.optionalString (beta != null) "-beta${toString beta}";
|
||||
name = "${pname}-${fullVersion}";
|
||||
in stdenv.mkDerivation {
|
||||
inherit name;
|
||||
version = fullVersion;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/atom/atom/releases/download/v${fullVersion}/atom-amd64.deb";
|
||||
name = "${name}.deb";
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
wrapGAppsHook # Fix error: GLib-GIO-ERROR **: No GSettings schemas are installed on the system
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gtk3 # Fix error: GLib-GIO-ERROR **: Settings schema 'org.gtk.Settings.FileChooser' is not installed
|
||||
];
|
||||
|
||||
dontBuild = true;
|
||||
dontConfigure = true;
|
||||
|
||||
unpackPhase = ''
|
||||
ar p $src data.tar.xz | tar xJ ./usr/
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out
|
||||
mv usr/bin usr/share $out
|
||||
rm -rf $out/share/lintian
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
gappsWrapperArgs+=(
|
||||
# needed for gio executable to be able to delete files
|
||||
--prefix "PATH" : "${glib.bin}/bin"
|
||||
)
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
share=$out/share/${pname}
|
||||
|
||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "${atomEnv.libPath}:$share" \
|
||||
$share/atom
|
||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "${atomEnv.libPath}" \
|
||||
$share/resources/app/apm/bin/node
|
||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
$share/resources/app.asar.unpacked/node_modules/symbols-view/vendor/ctags-linux
|
||||
|
||||
dugite=$share/resources/app.asar.unpacked/node_modules/dugite
|
||||
rm -f $dugite/git/bin/git
|
||||
ln -s ${pkgs.git}/bin/git $dugite/git/bin/git
|
||||
rm -f $dugite/git/libexec/git-core/git
|
||||
ln -s ${pkgs.git}/bin/git $dugite/git/libexec/git-core/git
|
||||
|
||||
find $share -name "*.node" -exec patchelf --set-rpath "${atomEnv.libPath}:$share" {} \;
|
||||
|
||||
sed -i -e "s|Exec=.*$|Exec=$out/bin/${pname}|" $out/share/applications/${pname}.desktop
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A hackable text editor for the 21st Century";
|
||||
homepage = "https://atom.io/";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ offline ysndr ];
|
||||
platforms = platforms.x86_64;
|
||||
inherit broken;
|
||||
};
|
||||
};
|
||||
in lib.mapAttrs common versions
|
||||
23
pkgs/applications/editors/atom/env.nix
Normal file
23
pkgs/applications/editors/atom/env.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ stdenv, lib, zlib, glib, alsa-lib, dbus, gtk3, atk, pango, freetype, fontconfig
|
||||
, gdk-pixbuf, cairo, cups, expat, libgpg-error, nspr
|
||||
, nss, xorg, libcap, systemd, libnotify, libsecret, libuuid, at-spi2-atk
|
||||
, at-spi2-core, libdbusmenu, libdrm, mesa
|
||||
}:
|
||||
|
||||
let
|
||||
packages = [
|
||||
stdenv.cc.cc zlib glib dbus gtk3 atk pango freetype
|
||||
fontconfig gdk-pixbuf cairo cups expat libgpg-error alsa-lib nspr nss
|
||||
xorg.libXrender xorg.libX11 xorg.libXext xorg.libXdamage xorg.libXtst
|
||||
xorg.libXcomposite xorg.libXi xorg.libXfixes xorg.libXrandr
|
||||
xorg.libXcursor xorg.libxkbfile xorg.libXScrnSaver libcap systemd libnotify
|
||||
xorg.libxcb libsecret libuuid at-spi2-atk at-spi2-core libdbusmenu
|
||||
libdrm
|
||||
mesa # required for libgbm
|
||||
];
|
||||
|
||||
libPathNative = lib.makeLibraryPath packages;
|
||||
libPath64 = lib.makeSearchPathOutput "lib" "lib64" packages;
|
||||
libPath = "${libPathNative}:${libPath64}";
|
||||
|
||||
in { inherit packages libPath; }
|
||||
71
pkgs/applications/editors/bless/default.nix
Normal file
71
pkgs/applications/editors/bless/default.nix
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, mono
|
||||
, meson
|
||||
, ninja
|
||||
, gtk-sharp-2_0
|
||||
, gettext
|
||||
, makeWrapper
|
||||
, glib
|
||||
, gtk2-x11
|
||||
, libxslt
|
||||
, docbook_xsl
|
||||
, python3
|
||||
, itstool
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bless";
|
||||
version = "0.6.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "afrantzis";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-rS+vJX0y9v1TiPsRfABroHiTuENQKEOxNsyKwagRuHM=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
gtk-sharp-2_0
|
||||
mono
|
||||
# runtime only deps
|
||||
glib
|
||||
gtk2-x11
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
meson
|
||||
ninja
|
||||
gettext
|
||||
makeWrapper
|
||||
libxslt
|
||||
docbook_xsl
|
||||
python3
|
||||
itstool
|
||||
];
|
||||
|
||||
mesonFlags = [
|
||||
"-Dtests=false" # requires NUnit
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs .
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
MPATH="${gtk-sharp-2_0}/lib/mono/gtk-sharp-2.0:${glib.out}/lib:${gtk2-x11}/lib:${gtk-sharp-2_0}/lib"
|
||||
wrapProgram $out/bin/bless --prefix MONO_PATH : "$MPATH" --prefix LD_LIBRARY_PATH : "$MPATH" --prefix PATH : ${lib.makeBinPath [ mono ]}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/afrantzis/bless";
|
||||
description = "Gtk# Hex Editor";
|
||||
maintainers = [ maintainers.mkg20001 ];
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
badPlatforms = [ "aarch64-linux" ];
|
||||
};
|
||||
}
|
||||
41
pkgs/applications/editors/bluefish/default.nix
Normal file
41
pkgs/applications/editors/bluefish/default.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, intltool
|
||||
, wrapGAppsHook
|
||||
, pkg-config
|
||||
, gtk
|
||||
, libxml2
|
||||
, enchant
|
||||
, gucharmap
|
||||
, python3
|
||||
, gnome
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bluefish";
|
||||
version = "2.2.12";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/bluefish/bluefish-${version}.tar.bz2";
|
||||
sha256 = "0slyjx4b4l612505q02crk00pjg9d5wi8gm5gxvcs0f6l9dr1y8d";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ intltool pkg-config wrapGAppsHook ];
|
||||
buildInputs = [
|
||||
gnome.adwaita-icon-theme
|
||||
gtk
|
||||
libxml2
|
||||
enchant
|
||||
gucharmap
|
||||
python3
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A powerful editor targeted towards programmers and webdevelopers";
|
||||
homepage = "https://bluefish.openoffice.nl/";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ vbgl ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
64
pkgs/applications/editors/bluej/default.nix
Normal file
64
pkgs/applications/editors/bluej/default.nix
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
{ lib, stdenv, fetchurl, jdk, glib, wrapGAppsHook }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bluej";
|
||||
version = "5.0.3";
|
||||
|
||||
src = fetchurl {
|
||||
# We use the deb here. First instinct might be to go for the "generic" JAR
|
||||
# download, but that is actually a graphical installer that is much harder
|
||||
# to unpack than the deb.
|
||||
url = "https://www.bluej.org/download/files/BlueJ-linux-${builtins.replaceStrings ["."] [""] version}.deb";
|
||||
sha256 = "sha256-OarqmptxZc7xEEYeoCVqHXkAvfzfSYx5nUp/iWPyoqw=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ wrapGAppsHook ];
|
||||
buildInputs = [ glib ];
|
||||
|
||||
sourceRoot = ".";
|
||||
preUnpack = ''
|
||||
unpackCmdHooks+=(_tryDebData)
|
||||
_tryDebData() {
|
||||
if ! [[ "$1" =~ \.deb$ ]]; then return 1; fi
|
||||
ar xf "$1"
|
||||
if ! [[ -e data.tar.xz ]]; then return 1; fi
|
||||
unpackFile data.tar.xz
|
||||
}
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
if [ -n "$prefix" ]; then
|
||||
mkdir -p "$prefix"
|
||||
fi
|
||||
|
||||
mkdir -p "$out"
|
||||
|
||||
if shopt -q dotglob; then dotglobOpt=$?; else dotglobOpt=$?; fi
|
||||
shopt -s dotglob
|
||||
for file in usr/*; do
|
||||
cp -R "$file" "$out"
|
||||
done
|
||||
if (( !dotglobOpt )); then shopt -u dotglob; fi
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
dontWrapGApps = true;
|
||||
|
||||
preFixup = ''
|
||||
makeWrapper ${jdk}/bin/java $out/bin/bluej \
|
||||
"''${gappsWrapperArgs[@]}" \
|
||||
--add-flags "-Djavafx.embed.singleThread=true -Dawt.useSystemAAFontSettings=on -Xmx512M -cp $out/share/bluej/bluej.jar bluej.Boot"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A simple integrated development environment for Java";
|
||||
homepage = "https://www.bluej.org/";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.gpl2ClasspathPlus;
|
||||
maintainers = with maintainers; [ chvp ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
34
pkgs/applications/editors/bonzomatic/default.nix
Normal file
34
pkgs/applications/editors/bonzomatic/default.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ lib, stdenv, fetchFromGitHub
|
||||
, cmake, makeWrapper
|
||||
, alsa-lib, fontconfig, mesa_glu, libXcursor, libXinerama, libXrandr, xorg
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bonzomatic";
|
||||
version = "2022-02-05";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Gargaj";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-y0zNluIDxms+Lpg7yBiEJNNyxx5TLaSiWBKXjqXiVJg=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake makeWrapper ];
|
||||
buildInputs = [
|
||||
alsa-lib fontconfig mesa_glu
|
||||
libXcursor libXinerama libXrandr xorg.xinput xorg.libXi xorg.libXext
|
||||
];
|
||||
|
||||
postFixup = ''
|
||||
wrapProgram $out/bin/bonzomatic --prefix LD_LIBRARY_PATH : "${alsa-lib}/lib"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Live shader coding tool and Shader Showdown workhorse";
|
||||
homepage = "https://github.com/gargaj/bonzomatic";
|
||||
license = licenses.unlicense;
|
||||
maintainers = [ maintainers.ilian ];
|
||||
platforms = [ "i686-linux" "x86_64-linux" ];
|
||||
};
|
||||
}
|
||||
21
pkgs/applications/editors/bvi/default.nix
Normal file
21
pkgs/applications/editors/bvi/default.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ lib, stdenv, fetchurl, ncurses }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bvi";
|
||||
version = "1.4.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/bvi/${pname}-${version}.src.tar.gz";
|
||||
sha256 = "0a0yl0dcyff31k3dr4dpgqmlwygp8iaslnr5gmb6814ylxf2ad9h";
|
||||
};
|
||||
|
||||
buildInputs = [ ncurses ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Hex editor with vim style keybindings";
|
||||
homepage = "http://bvi.sourceforge.net/download.html";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ pSub ];
|
||||
platforms = with platforms; linux ++ darwin;
|
||||
};
|
||||
}
|
||||
39
pkgs/applications/editors/bviplus/default.nix
Normal file
39
pkgs/applications/editors/bviplus/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ lib, stdenv, fetchurl, fetchpatch, ncurses }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bviplus";
|
||||
version = "1.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/project/bviplus/bviplus/${version}/bviplus-${version}.tgz";
|
||||
sha256 = "08q2fdyiirabbsp5qpn3v8jxp4gd85l776w6gqvrbjwqa29a8arg";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fix pending upstream inclusion for ncurses-6.3 support:
|
||||
# https://sourceforge.net/p/bviplus/bugs/7/
|
||||
(fetchpatch {
|
||||
name = "ncurses-6.3.patch";
|
||||
url = "https://sourceforge.net/p/bviplus/bugs/7/attachment/bviplus-ncurses-6.2.patch";
|
||||
sha256 = "1g3s2fdly3qliy67f3dlb12a03a21zkjbya6gap4mqxhyyjbp46x";
|
||||
# svn patch, rely on prefix added by fetchpatch:
|
||||
extraPrefix = "";
|
||||
})
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
ncurses
|
||||
];
|
||||
|
||||
makeFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
buildFlags = [ "CFLAGS=-fgnu89-inline" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Ncurses based hex editor with a vim-like interface";
|
||||
homepage = "http://bviplus.sourceforge.net";
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ cstrahan ];
|
||||
};
|
||||
}
|
||||
62
pkgs/applications/editors/code-browser/default.nix
Normal file
62
pkgs/applications/editors/code-browser/default.nix
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
{ lib, stdenv
|
||||
, fetchurl
|
||||
, copper
|
||||
, python3
|
||||
, pkg-config
|
||||
, withQt ? false, qtbase ? null, wrapQtAppsHook ? null
|
||||
, withGtk2 ? false, gtk2
|
||||
, withGtk3 ? false, gtk3
|
||||
, mkDerivation ? stdenv.mkDerivation
|
||||
}:
|
||||
let onlyOneEnabled = xs: 1 == builtins.length (builtins.filter lib.id xs);
|
||||
in assert onlyOneEnabled [ withQt withGtk2 withGtk3 ];
|
||||
mkDerivation rec {
|
||||
pname = "code-browser";
|
||||
version = "8.0";
|
||||
src = fetchurl {
|
||||
url = "https://tibleiz.net/download/code-browser-${version}-src.tar.gz";
|
||||
sha256 = "sha256-beCp4lx4MI1+hVgWp2h3piE/zu51zfwQdB5g7ImgmwY=";
|
||||
};
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile --replace "LFLAGS=-no-pie" "LFLAGS=-no-pie -L."
|
||||
patchShebangs .
|
||||
''
|
||||
+ lib.optionalString withQt ''
|
||||
substituteInPlace libs/copper-ui/Makefile --replace "moc -o" "${qtbase.dev}/bin/moc -o"
|
||||
substituteInPlace libs/copper-ui/Makefile --replace "all: qt gtk gtk2" "all: qt"
|
||||
''
|
||||
+ lib.optionalString withGtk2 ''
|
||||
substituteInPlace libs/copper-ui/Makefile --replace "all: qt gtk gtk2" "all: gtk2"
|
||||
''
|
||||
+ lib.optionalString withGtk3 ''
|
||||
substituteInPlace libs/copper-ui/Makefile --replace "all: qt gtk gtk2" "all: gtk"
|
||||
''
|
||||
;
|
||||
nativeBuildInputs = [ copper
|
||||
python3
|
||||
pkg-config
|
||||
]
|
||||
++ lib.optionals withGtk2 [ gtk2 ]
|
||||
++ lib.optionals withGtk3 [ gtk3 ]
|
||||
++ lib.optionals withQt [ qtbase wrapQtAppsHook ];
|
||||
buildInputs = lib.optionals withQt [ qtbase ]
|
||||
++ lib.optionals withGtk2 [ gtk2 ]
|
||||
++ lib.optionals withGtk3 [ gtk3 ];
|
||||
makeFlags = [
|
||||
"prefix=$(out)"
|
||||
"COPPER=${copper}/bin/copper-elf64"
|
||||
"with-local-libs"
|
||||
]
|
||||
++ lib.optionals withQt [ "QINC=${qtbase.dev}/include"
|
||||
"UI=qt"
|
||||
]
|
||||
++ lib.optionals withGtk2 [ "UI=gtk2" ]
|
||||
++ lib.optionals withGtk3 [ "UI=gtk" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Folding text editor, designed to hierarchically structure any kind of text file and especially source code";
|
||||
homepage = "https://tibleiz.net/code-browser/";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.x86_64;
|
||||
};
|
||||
}
|
||||
81
pkgs/applications/editors/codeblocks/default.nix
Normal file
81
pkgs/applications/editors/codeblocks/default.nix
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
{ lib, stdenv, fetchurl, fetchpatch, pkg-config, file, zip, wxGTK31-gtk3, gtk3
|
||||
, contribPlugins ? false, hunspell, gamin, boost, wrapGAppsHook
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "${pname}-${lib.optionalString contribPlugins "full-"}${version}";
|
||||
version = "20.03";
|
||||
pname = "codeblocks";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/codeblocks/Sources/${version}/codeblocks-${version}.tar.xz";
|
||||
sha256 = "1idaksw1vacmm83krxh5zlb12kad3dkz9ixh70glw1gaibib7vhm";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config file zip wrapGAppsHook ];
|
||||
buildInputs = [ wxGTK31-gtk3 gtk3 ]
|
||||
++ optionals contribPlugins [ hunspell gamin boost ];
|
||||
enableParallelBuilding = true;
|
||||
patches = [
|
||||
./writable-projects.patch
|
||||
./fix-clipboard-flush.patch
|
||||
# Fix build on non-x86 machines
|
||||
(fetchpatch {
|
||||
name = "remove-int3.patch";
|
||||
url = "https://github.com/arnholm/codeblocks_sfmirror/commit/d76c015c456561d2c7987935a5f4dc6c0932b0c4.patch";
|
||||
sha256 = "sha256-dpH33vGf2aNdYTeLwxglYDNbvwoY2bGSG6YFRyoGw+A=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "remove-pragmas.patch";
|
||||
url = "https://github.com/arnholm/codeblocks_sfmirror/commit/966949d5ab7f3cb86e2a2c7ef4e853ee209b5a1a.patch";
|
||||
sha256 = "sha256-XjejjGOvDk3gl1/n9R69XATGLj5n7tOZNyG8vIlwfyg=";
|
||||
})
|
||||
# Fix build with GCC 11
|
||||
(fetchpatch {
|
||||
name = "use-gcc11-openfilelist.patch";
|
||||
url = "https://github.com/arnholm/codeblocks_sfmirror/commit/a5ea6ff7ff301d739d3dc8145db1578f504ee4ca.patch";
|
||||
sha256 = "sha256-kATaLej8kJf4xm0VicHfRetOepX8O9gOhwdna0qylvQ=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "use-gcc11-ccmanager.patch";
|
||||
url = "https://github.com/arnholm/codeblocks_sfmirror/commit/04b7c50fb8c6a29b2d84579ee448d2498414d855.patch";
|
||||
sha256 = "sha256-VPy/M6IvNBxUE4hZRbLExFm0DJf4gmertrqrvsXQNz4=";
|
||||
})
|
||||
# Fix build with wxGTK 3.1.5
|
||||
(fetchpatch {
|
||||
name = "use-wxgtk315.patch";
|
||||
url = "https://github.com/arnholm/codeblocks_sfmirror/commit/2345b020b862ec855038dd32a51ebb072647f28d.patch";
|
||||
sha256 = "sha256-RRjwZA37RllnG8cJdBEnASpEd8z0+ru96fjntO42OvU=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "fix-getstring.patch";
|
||||
url = "https://github.com/arnholm/codeblocks_sfmirror/commit/dbdf5c5ea9e3161233f0588a7616b7e4fedc7870.patch";
|
||||
sha256 = "sha256-DrEMFluN8vs0LERa7ULGshl7HdejpsuvXAMjIr/K1fQ=";
|
||||
})
|
||||
];
|
||||
preConfigure = "substituteInPlace ./configure --replace /usr/bin/file ${file}/bin/file";
|
||||
postConfigure = optionalString stdenv.isLinux "substituteInPlace libtool --replace ldconfig ${stdenv.cc.libc.bin}/bin/ldconfig";
|
||||
configureFlags = [ "--enable-pch=no" ] ++ optionals contribPlugins [
|
||||
("--with-contrib-plugins" + optionalString stdenv.isDarwin "=all,-FileManager,-NassiShneiderman")
|
||||
"--with-boost-libdir=${boost}/lib"
|
||||
];
|
||||
postInstall = optionalString stdenv.isDarwin ''
|
||||
ln -s $out/lib/codeblocks/plugins $out/share/codeblocks/plugins
|
||||
'';
|
||||
|
||||
meta = {
|
||||
maintainers = [ maintainers.linquize ];
|
||||
platforms = platforms.all;
|
||||
description = "The open source, cross platform, free C, C++ and Fortran IDE";
|
||||
longDescription =
|
||||
''
|
||||
Code::Blocks is a free C, C++ and Fortran IDE built to meet the most demanding needs of its users.
|
||||
It is designed to be very extensible and fully configurable.
|
||||
Finally, an IDE with all the features you need, having a consistent look, feel and operation across platforms.
|
||||
'';
|
||||
homepage = "http://www.codeblocks.org";
|
||||
license = licenses.gpl3;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
diff --git a/src/src/app.cpp b/src/src/app.cpp
|
||||
index 81130fd..f98d37b 100644
|
||||
--- a/src/src/app.cpp
|
||||
+++ b/src/src/app.cpp
|
||||
@@ -602,7 +602,8 @@ bool CodeBlocksApp::OnInit()
|
||||
m_BatchWindowAutoClose = true;
|
||||
m_pSingleInstance = nullptr;
|
||||
|
||||
- wxTheClipboard->Flush();
|
||||
+ if (wxTheClipboard->IsOpened())
|
||||
+ wxTheClipboard->Flush();
|
||||
|
||||
wxCmdLineParser& parser = *Manager::GetCmdLineParser();
|
||||
parser.SetDesc(cmdLineDesc);
|
||||
@@ -851,7 +852,8 @@ bool CodeBlocksApp::OnInit()
|
||||
|
||||
int CodeBlocksApp::OnExit()
|
||||
{
|
||||
- wxTheClipboard->Flush();
|
||||
+ if (wxTheClipboard->IsOpened())
|
||||
+ wxTheClipboard->Flush();
|
||||
|
||||
if (g_DDEServer) delete g_DDEServer;
|
||||
|
||||
18
pkgs/applications/editors/codeblocks/writable-projects.patch
Normal file
18
pkgs/applications/editors/codeblocks/writable-projects.patch
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
diff --git a/src/plugins/scriptedwizard/wiz.cpp b/src/plugins/scriptedwizard/wiz.cpp
|
||||
index 0eb4b27..7d469fe 100644
|
||||
--- a/src/plugins/scriptedwizard/wiz.cpp
|
||||
+++ b/src/plugins/scriptedwizard/wiz.cpp
|
||||
@@ -785,6 +785,13 @@ void Wiz::CopyFiles(cbProject* theproject, const wxString& prjdir, const wxStri
|
||||
}
|
||||
}
|
||||
if (do_copy) wxCopyFile(srcfile, dstfile, true);
|
||||
+ // Noticed! Files in Nix Store are readonly, so make the copied file writable
|
||||
+ if (do_copy)
|
||||
+ {
|
||||
+ struct stat statbuf;
|
||||
+ if (!::stat(dstfile.mb_str(), &statbuf))
|
||||
+ ::chmod(dstfile.mb_str(), statbuf.st_mode | 0200);
|
||||
+ }
|
||||
|
||||
// and add it to the project
|
||||
fname.MakeRelativeTo(prjdir);
|
||||
40
pkgs/applications/editors/cpeditor/default.nix
Normal file
40
pkgs/applications/editors/cpeditor/default.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, qtbase
|
||||
, qttools
|
||||
, wrapQtAppsHook
|
||||
, cmake
|
||||
, ninja
|
||||
, python3
|
||||
, runtimeShell
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cpeditor";
|
||||
version = "6.10.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cpeditor";
|
||||
repo = "cpeditor";
|
||||
rev = version;
|
||||
sha256 = "sha256-SIREoOapaZTLtqi0Z07lKmNqF9a9qIpgGxuhqaY3yfU=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ninja pkg-config wrapQtAppsHook python3 ];
|
||||
buildInputs = [ qtbase qttools ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/Core/Runner.cpp --replace "/bin/bash" "${runtimeShell}"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "An IDE specially designed for competitive programming";
|
||||
homepage = "https://cpeditor.org";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ rewine ];
|
||||
};
|
||||
}
|
||||
117
pkgs/applications/editors/cudatext/default.nix
Normal file
117
pkgs/applications/editors/cudatext/default.nix
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, lazarus
|
||||
, fpc
|
||||
, libX11
|
||||
|
||||
# GTK2/3
|
||||
, pango
|
||||
, cairo
|
||||
, glib
|
||||
, atk
|
||||
, gtk2
|
||||
, gtk3
|
||||
, gdk-pixbuf
|
||||
, python3
|
||||
|
||||
# Qt5
|
||||
, libqt5pas
|
||||
, qt5
|
||||
|
||||
, widgetset ? "qt5"
|
||||
# See https://github.com/Alexey-T/CudaText-lexers
|
||||
, additionalLexers ? [ "Nix" ]
|
||||
}:
|
||||
|
||||
assert builtins.elem widgetset [ "gtk2" "gtk3" "qt5" ];
|
||||
|
||||
let
|
||||
deps = lib.mapAttrs
|
||||
(name: spec:
|
||||
fetchFromGitHub {
|
||||
repo = name;
|
||||
inherit (spec) owner rev sha256;
|
||||
}
|
||||
)
|
||||
(lib.importJSON ./deps.json);
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cudatext";
|
||||
version = "1.165.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Alexey-T";
|
||||
repo = "CudaText";
|
||||
rev = version;
|
||||
sha256 = "sha256-eNpU7PpzyL2KHPL6cPmxZw/49VALjCWUdavV6Ex1IQI=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace app/proc_globdata.pas \
|
||||
--replace "/usr/share/cudatext" "$out/share/cudatext" \
|
||||
--replace "libpython3.so" "${python3}/lib/libpython${python3.pythonVersion}.so" \
|
||||
--replace "AllowProgramUpdates:= true;" "AllowProgramUpdates:= false;"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ lazarus fpc ]
|
||||
++ lib.optional (widgetset == "qt5") qt5.wrapQtAppsHook;
|
||||
|
||||
buildInputs = [ libX11 ]
|
||||
++ lib.optionals (lib.hasPrefix "gtk" widgetset) [ pango cairo glib atk gdk-pixbuf ]
|
||||
++ lib.optional (widgetset == "gtk2") gtk2
|
||||
++ lib.optional (widgetset == "gtk3") gtk3
|
||||
++ lib.optional (widgetset == "qt5") libqt5pas;
|
||||
|
||||
NIX_LDFLAGS = "--as-needed -rpath ${lib.makeLibraryPath buildInputs}";
|
||||
|
||||
buildPhase = lib.concatStringsSep "\n" (lib.mapAttrsToList (name: dep: ''
|
||||
cp -r --no-preserve=mode ${dep} ${name}
|
||||
'') deps) + ''
|
||||
lazbuild --lazarusdir=${lazarus}/share/lazarus --pcp=./lazarus --ws=${widgetset} \
|
||||
bgrabitmap/bgrabitmap/bgrabitmappack.lpk \
|
||||
EncConv/encconv/encconv_package.lpk \
|
||||
ATBinHex-Lazarus/atbinhex/atbinhex_package.lpk \
|
||||
ATFlatControls/atflatcontrols/atflatcontrols_package.lpk \
|
||||
ATSynEdit/atsynedit/atsynedit_package.lpk \
|
||||
ATSynEdit_Cmp/atsynedit_cmp/atsynedit_cmp_package.lpk \
|
||||
EControl/econtrol/econtrol_package.lpk \
|
||||
ATSynEdit_Ex/atsynedit_ex/atsynedit_ex_package.lpk \
|
||||
Python-for-Lazarus/python4lazarus/python4lazarus_package.lpk \
|
||||
Emmet-Pascal/emmet/emmet_package.lpk \
|
||||
app/cudatext.lpi
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -Dm755 app/cudatext $out/bin/cudatext
|
||||
|
||||
install -dm755 $out/share/cudatext
|
||||
cp -r app/{data,py,settings_default} $out/share/cudatext
|
||||
|
||||
install -Dm644 setup/debfiles/cudatext-512.png -t $out/share/pixmaps
|
||||
install -Dm644 setup/debfiles/cudatext.desktop -t $out/share/applications
|
||||
'' + lib.concatMapStringsSep "\n" (lexer: ''
|
||||
if [ -d "CudaText-lexers/${lexer}" ]; then
|
||||
install -Dm644 CudaText-lexers/${lexer}/*.{cuda-lexmap,lcf} $out/share/cudatext/data/lexlib
|
||||
else
|
||||
echo "${lexer} lexer not found"
|
||||
exit 1
|
||||
fi
|
||||
'') additionalLexers;
|
||||
|
||||
passthru.updateScript = ./update.sh;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Cross-platform code editor";
|
||||
longDescription = ''
|
||||
Text/code editor with lite UI. Syntax highlighting for 200+ languages.
|
||||
Config system in JSON files. Multi-carets and multi-selections.
|
||||
Search and replace with RegEx. Extendable by Python plugins and themes.
|
||||
'';
|
||||
homepage = "https://cudatext.github.io/";
|
||||
changelog = "https://cudatext.github.io/history.txt";
|
||||
license = licenses.mpl20;
|
||||
maintainers = with maintainers; [ sikmir ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
57
pkgs/applications/editors/cudatext/deps.json
Normal file
57
pkgs/applications/editors/cudatext/deps.json
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
"EncConv": {
|
||||
"owner": "Alexey-T",
|
||||
"rev": "2022.04.18",
|
||||
"sha256": "sha256-UV07a9qNzd0JQWCq/eD0K9fA7kxAKj5OP7dOpECo8xw="
|
||||
},
|
||||
"ATBinHex-Lazarus": {
|
||||
"owner": "Alexey-T",
|
||||
"rev": "2022.04.16",
|
||||
"sha256": "sha256-7ye73KSpoPvvxBNwBC3uloufFE+448RDyNScumk1ViE="
|
||||
},
|
||||
"ATFlatControls": {
|
||||
"owner": "Alexey-T",
|
||||
"rev": "2022.05.06",
|
||||
"sha256": "sha256-mYZ3mgtUpQ8sry5WmdluHca/CR7RqR9GRrxIoeZFLes="
|
||||
},
|
||||
"ATSynEdit": {
|
||||
"owner": "Alexey-T",
|
||||
"rev": "2022.06.01",
|
||||
"sha256": "sha256-dilFwvtD8OLLq7QOPWSG3FeBM12Yy4ztM+CedJQAAaU="
|
||||
},
|
||||
"ATSynEdit_Cmp": {
|
||||
"owner": "Alexey-T",
|
||||
"rev": "2022.05.04",
|
||||
"sha256": "sha256-6O4RijSejPogokLSBuC6pKrOpihMi/ykS06YyV64Sak="
|
||||
},
|
||||
"EControl": {
|
||||
"owner": "Alexey-T",
|
||||
"rev": "2022.05.06",
|
||||
"sha256": "sha256-ppm8Wuxhi5N3Er0f0h9d+v2spwEMr7ksf9tz4vI42+M="
|
||||
},
|
||||
"ATSynEdit_Ex": {
|
||||
"owner": "Alexey-T",
|
||||
"rev": "2022.05.23",
|
||||
"sha256": "sha256-/PqEx2Z1TVjnxfeWR9qBZUNzdqDBttuLmSBzIEPe1MY="
|
||||
},
|
||||
"Python-for-Lazarus": {
|
||||
"owner": "Alexey-T",
|
||||
"rev": "2021.10.27",
|
||||
"sha256": "sha256-ikXdDUMJ9MxRejEVAhwUsXYVh0URVFHzEpnXuN5NGpA="
|
||||
},
|
||||
"Emmet-Pascal": {
|
||||
"owner": "Alexey-T",
|
||||
"rev": "2022.01.17",
|
||||
"sha256": "sha256-5yqxRW7xFJ4MwHjKnxYL8/HrCDLn30a1gyQRjGMx/qw="
|
||||
},
|
||||
"CudaText-lexers": {
|
||||
"owner": "Alexey-T",
|
||||
"rev": "2021.07.09",
|
||||
"sha256": "sha256-OyC85mTMi9m5kbtx8TAK2V4voL1i+J+TFoLVwxlHiD4="
|
||||
},
|
||||
"bgrabitmap": {
|
||||
"owner": "bgrabitmap",
|
||||
"rev": "v11.4",
|
||||
"sha256": "sha256-jZL8lzjua033E76IL0HIk/fihC73ifCb4LqMni7vvb0="
|
||||
}
|
||||
}
|
||||
23
pkgs/applications/editors/cudatext/update.sh
Executable file
23
pkgs/applications/editors/cudatext/update.sh
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl gnused jq nix-prefetch moreutils
|
||||
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
version=$(curl -s https://api.github.com/repos/Alexey-T/CudaText/releases/latest | jq -r '.tag_name')
|
||||
url="https://github.com/Alexey-T/CudaText/archive/refs/tags/${version}.tar.gz"
|
||||
hash=$(nix-prefetch-url --quiet --unpack --type sha256 $url)
|
||||
sriHash=$(nix hash to-sri --type sha256 $hash)
|
||||
|
||||
sed -i "s#version = \".*\"#version = \"$version\"#" default.nix
|
||||
sed -i "s#sha256 = \".*\"#sha256 = \"$sriHash\"#" default.nix
|
||||
|
||||
while IFS=$'\t' read repo owner rev; do
|
||||
latest=$(curl -s https://api.github.com/repos/${owner}/${repo}/releases/latest | jq -r '.tag_name')
|
||||
if [ "$latest" != "$rev" ]; then
|
||||
url="https://github.com/${owner}/${repo}/archive/refs/tags/${latest}.tar.gz"
|
||||
hash=$(nix-prefetch-url --quiet --unpack --type sha256 $url)
|
||||
sriHash=$(nix hash to-sri --type sha256 $hash)
|
||||
jq ".\"${repo}\".rev = \"${latest}\" | .\"${repo}\".sha256 = \"${sriHash}\"" deps.json | sponge deps.json
|
||||
fi
|
||||
done <<< $(jq -r 'to_entries[]|[.key,.value.owner,.value.rev]|@tsv' deps.json)
|
||||
43
pkgs/applications/editors/deadpixi-sam/default.nix
Normal file
43
pkgs/applications/editors/deadpixi-sam/default.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ lib, stdenv, fetchFromGitHub, freetype, libX11, libXi, libXt, libXft }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "deadpixi-sam-unstable";
|
||||
version = "2020-07-14";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "deadpixi";
|
||||
repo = "sam";
|
||||
rev = "5d8acb35d78c327d76f00a54857cbd566ed9bc11";
|
||||
sha256 = "sha256-+vRh6nDPc3UnmEdqROHRel5Te0h5m4eiaERs492xciQ=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace config.mk.def \
|
||||
--replace "/usr/include/freetype2" "${freetype.dev}/include/freetype2" \
|
||||
--replace "CC=gcc" "CC=${stdenv.cc.targetPrefix}cc" \
|
||||
--replace "RXPATH=/usr/bin/ssh" "RXPATH=ssh"
|
||||
'';
|
||||
|
||||
CFLAGS = "-D_DARWIN_C_SOURCE";
|
||||
makeFlags = [ "DESTDIR=$(out)" ];
|
||||
buildInputs = [ libX11 libXi libXt libXft ];
|
||||
# build fails when run in parallel
|
||||
enableParallelBuilding = false;
|
||||
|
||||
postInstall = ''
|
||||
substituteInPlace deadpixi-sam.desktop \
|
||||
--replace "accessories-text-editor" "$out/share/icons/hicolor/scalable/apps/sam.svg"
|
||||
mkdir -p $out/share/applications
|
||||
mkdir -p $out/share/icons/hicolor/scalable/apps
|
||||
mv deadpixi-sam.desktop $out/share/applications
|
||||
mv sam.svg $out/share/icons/hicolor/scalable/apps
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/deadpixi/sam";
|
||||
description = "Updated version of the sam text editor";
|
||||
license = licenses.lpl-102;
|
||||
maintainers = with maintainers; [ ramkromberg ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
33
pkgs/applications/editors/dhex/default.nix
Normal file
33
pkgs/applications/editors/dhex/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib, stdenv, fetchurl, ncurses }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dhex";
|
||||
version = "0.69";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.dettus.net/dhex/dhex_${version}.tar.gz";
|
||||
sha256 = "06y4lrp29f2fh303ijk1xhspa1d4x4dm6hnyw3dd8szi3k6hnwsj";
|
||||
};
|
||||
|
||||
buildInputs = [ ncurses ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
mkdir -p $out/share/man/man1
|
||||
mkdir -p $out/share/man/man5
|
||||
|
||||
cp dhex $out/bin
|
||||
cp dhex.1 $out/share/man/man1
|
||||
cp dhexrc.5 $out/share/man/man5
|
||||
cp dhex_markers.5 $out/share/man/man5
|
||||
cp dhex_searchlog.5 $out/share/man/man5
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "A themeable hex editor with diff mode";
|
||||
homepage = "http://www.dettus.net/dhex/";
|
||||
license = lib.licenses.gpl2;
|
||||
maintainers = with lib.maintainers; [qknight];
|
||||
platforms = with lib.platforms; linux;
|
||||
};
|
||||
}
|
||||
28
pkgs/applications/editors/dit/default.nix
Normal file
28
pkgs/applications/editors/dit/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ lib, fetchurl, stdenv, libiconv, ncurses, lua }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dit";
|
||||
version = "0.7";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://hisham.hm/dit/releases/${version}/${pname}-${version}.tar.gz";
|
||||
sha256 = "0cmbyzqfz2qa83cg8lpjifn34wmx34c5innw485zh4vk3c0k8wlj";
|
||||
};
|
||||
|
||||
buildInputs = [ ncurses lua ]
|
||||
++ lib.optional stdenv.isDarwin libiconv;
|
||||
|
||||
# fix paths
|
||||
prePatch = ''
|
||||
patchShebangs tools/GenHeaders
|
||||
substituteInPlace Prototypes.h --replace 'tail' "$(type -P tail)"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A console text editor for Unix that you already know how to use";
|
||||
homepage = "https://hisham.hm/dit/";
|
||||
license = licenses.gpl2;
|
||||
platforms = with platforms; linux;
|
||||
maintainers = with maintainers; [ davidak ];
|
||||
};
|
||||
}
|
||||
64
pkgs/applications/editors/eclipse/build-eclipse.nix
Normal file
64
pkgs/applications/editors/eclipse/build-eclipse.nix
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
{ lib, stdenv, makeDesktopItem, freetype, fontconfig, libX11, libXrender
|
||||
, zlib, jdk, glib, glib-networking, gtk, libXtst, libsecret, gsettings-desktop-schemas, webkitgtk
|
||||
, makeWrapper, perl, ... }:
|
||||
|
||||
{ name, src ? builtins.getAttr stdenv.hostPlatform.system sources, sources ? null, description, productVersion }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
inherit name src;
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
name = "Eclipse";
|
||||
exec = "eclipse";
|
||||
icon = "eclipse";
|
||||
comment = "Integrated Development Environment";
|
||||
desktopName = "Eclipse IDE";
|
||||
genericName = "Integrated Development Environment";
|
||||
categories = [ "Development" ];
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
fontconfig freetype glib gsettings-desktop-schemas gtk jdk libX11
|
||||
libXrender libXtst libsecret makeWrapper zlib
|
||||
] ++ lib.optional (webkitgtk != null) webkitgtk;
|
||||
|
||||
buildCommand = ''
|
||||
# Unpack tarball.
|
||||
mkdir -p $out
|
||||
tar xfvz $src -C $out
|
||||
|
||||
# Patch binaries.
|
||||
interpreter=$(echo ${stdenv.cc.libc}/lib/ld-linux*.so.2)
|
||||
libCairo=$out/eclipse/libcairo-swt.so
|
||||
patchelf --set-interpreter $interpreter $out/eclipse/eclipse
|
||||
[ -f $libCairo ] && patchelf --set-rpath ${lib.makeLibraryPath [ freetype fontconfig libX11 libXrender zlib ]} $libCairo
|
||||
|
||||
# Create wrapper script. Pass -configuration to store
|
||||
# settings in ~/.eclipse/org.eclipse.platform_<version> rather
|
||||
# than ~/.eclipse/org.eclipse.platform_<version>_<number>.
|
||||
productId=$(sed 's/id=//; t; d' $out/eclipse/.eclipseproduct)
|
||||
|
||||
makeWrapper $out/eclipse/eclipse $out/bin/eclipse \
|
||||
--prefix PATH : ${jdk}/bin \
|
||||
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath ([ glib gtk libXtst libsecret ] ++ lib.optional (webkitgtk != null) webkitgtk)} \
|
||||
--prefix GIO_EXTRA_MODULES : "${glib-networking}/lib/gio/modules" \
|
||||
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" \
|
||||
--add-flags "-configuration \$HOME/.eclipse/''${productId}_${productVersion}/configuration"
|
||||
|
||||
# Create desktop item.
|
||||
mkdir -p $out/share/applications
|
||||
cp ${desktopItem}/share/applications/* $out/share/applications
|
||||
mkdir -p $out/share/pixmaps
|
||||
ln -s $out/eclipse/icon.xpm $out/share/pixmaps/eclipse.xpm
|
||||
|
||||
# ensure eclipse.ini does not try to use a justj jvm, as those aren't compatible with nix
|
||||
${perl}/bin/perl -i -p0e 's|-vm\nplugins/org.eclipse.justj.*/jre/bin\n||' $out/eclipse/eclipse.ini
|
||||
''; # */
|
||||
|
||||
meta = {
|
||||
homepage = "http://www.eclipse.org/";
|
||||
inherit description;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
|
||||
}
|
||||
185
pkgs/applications/editors/eclipse/default.nix
Normal file
185
pkgs/applications/editors/eclipse/default.nix
Normal file
|
|
@ -0,0 +1,185 @@
|
|||
{ lib, stdenv, fetchurl, makeDesktopItem, makeWrapper
|
||||
, freetype, fontconfig, libX11, libXrender, zlib
|
||||
, glib, gtk3, gtk2, libXtst, jdk, jdk8, gsettings-desktop-schemas
|
||||
, webkitgtk ? null # for internal web browser
|
||||
, buildEnv, runCommand
|
||||
, callPackage
|
||||
}:
|
||||
|
||||
# https://download.eclipse.org/eclipse/downloads/ is the main place to
|
||||
# find the downloads needed for new versions
|
||||
#
|
||||
# to test:
|
||||
# $ for e in cpp modeling platform sdk java jee committers rcp; do nix build -f default.nix pkgs.eclipses.eclipse-${e} -o eclipse-${e}; done
|
||||
|
||||
let
|
||||
platform_major = "4";
|
||||
platform_minor = "23";
|
||||
year = "2022";
|
||||
month = "03"; #release month
|
||||
buildmonth = "03"; #sometimes differs from release month
|
||||
timestamp = "${year}${buildmonth}080310";
|
||||
gtk = gtk3;
|
||||
in rec {
|
||||
|
||||
# work around https://bugs.eclipse.org/bugs/show_bug.cgi?id=476075#c3
|
||||
buildEclipseUnversioned = callPackage ./build-eclipse.nix {
|
||||
inherit stdenv makeDesktopItem freetype fontconfig libX11 libXrender zlib
|
||||
jdk glib gtk libXtst gsettings-desktop-schemas webkitgtk
|
||||
makeWrapper;
|
||||
};
|
||||
buildEclipse = eclipseData: buildEclipseUnversioned (eclipseData // { productVersion = "${platform_major}.${platform_minor}"; });
|
||||
|
||||
### Eclipse CPP
|
||||
|
||||
eclipse-cpp = buildEclipse {
|
||||
name = "eclipse-cpp-${platform_major}.${platform_minor}";
|
||||
description = "Eclipse IDE for C/C++ Developers";
|
||||
src =
|
||||
fetchurl {
|
||||
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-cpp-${year}-${month}-R-linux-gtk-x86_64.tar.gz";
|
||||
hash = "sha512-IKoHGBH8pQ1mkdMz11exO1u5T3hCPk662nPYoFunCyrQHOVA6KDAVHzEo1dxNUSJVGvW9YHDbGlZphXniTBJHw==";
|
||||
};
|
||||
};
|
||||
|
||||
### Eclipse Modeling
|
||||
|
||||
eclipse-modeling = buildEclipse {
|
||||
name = "eclipse-modeling-${platform_major}.${platform_minor}";
|
||||
description = "Eclipse Modeling Tools";
|
||||
src =
|
||||
fetchurl {
|
||||
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-modeling-${year}-${month}-R-linux-gtk-x86_64.tar.gz";
|
||||
hash = "sha512-cG3mMEJiuNrVfFy5nNkVqC2OpMeE5C1iu26E+LKGwwIBwqPoJtFBPRhLdGVC73KwDDRK8DEyurXsiFal60dv/g==";
|
||||
};
|
||||
};
|
||||
|
||||
### Eclipse Platform
|
||||
|
||||
eclipse-platform = buildEclipse {
|
||||
name = "eclipse-platform-${platform_major}.${platform_minor}";
|
||||
description = "Eclipse Platform ${year}-${month}";
|
||||
src =
|
||||
fetchurl {
|
||||
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops${platform_major}/R-${platform_major}.${platform_minor}-${timestamp}/eclipse-platform-${platform_major}.${platform_minor}-linux-gtk-x86_64.tar.gz";
|
||||
hash = "sha512-AEGENE5AXXUmIRwv8Hp3LByfPtuG/HvipqkMoq+K4A+8Y7NZCRQM9YSf8zr42S0aYTr6rwP6VJajpFiz4ixULg==";
|
||||
};
|
||||
};
|
||||
|
||||
### Eclipse Scala SDK
|
||||
|
||||
eclipse-scala-sdk =
|
||||
buildEclipseUnversioned.override { jdk = jdk8; gtk = gtk2; } {
|
||||
name = "eclipse-scala-sdk-4.7.0";
|
||||
description = "Eclipse IDE for Scala Developers";
|
||||
productVersion = "4.7";
|
||||
src =
|
||||
fetchurl {
|
||||
url = "https://downloads.typesafe.com/scalaide-pack/4.7.0-vfinal-oxygen-212-20170929/scala-SDK-4.7.0-vfinal-2.12-linux.gtk.x86_64.tar.gz";
|
||||
sha256 = "1n5w2a7mh9ajv6fxcas1gpgwb04pdxbr9v5dzr67gsz5bhahq4ya";
|
||||
};
|
||||
};
|
||||
|
||||
### Eclipse SDK
|
||||
|
||||
eclipse-sdk = buildEclipse {
|
||||
name = "eclipse-sdk-${platform_major}.${platform_minor}";
|
||||
description = "Eclipse ${year}-${month} Classic";
|
||||
src =
|
||||
fetchurl {
|
||||
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops${platform_major}/R-${platform_major}.${platform_minor}-${timestamp}/eclipse-SDK-${platform_major}.${platform_minor}-linux-gtk-x86_64.tar.gz";
|
||||
hash = "sha512-CTSuI6Dc2wKe0RduPKAacQmXbEBtF4J7Q5b9gC1MIkXXWPLW7Yp+lL/a167TXgDHG3kqNWbonjZ2JwU2T0FRjg==";
|
||||
};
|
||||
};
|
||||
|
||||
### Eclipse Java
|
||||
|
||||
eclipse-java = buildEclipse {
|
||||
name = "eclipse-java-${platform_major}.${platform_minor}";
|
||||
description = "Eclipse IDE for Java Developers";
|
||||
src =
|
||||
fetchurl {
|
||||
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-java-${year}-${month}-R-linux-gtk-x86_64.tar.gz";
|
||||
hash = "sha512-6QOtNFYCRhdSiclEwijBcp2EODnlp8qtO56NJLuRdgwpEe+3A567L/vsZe/E72YTGZOFh9yJ7+XehIEjonfUIw==";
|
||||
};
|
||||
};
|
||||
|
||||
### Eclipse Java EE
|
||||
|
||||
eclipse-jee = buildEclipse {
|
||||
name = "eclipse-jee-${platform_major}.${platform_minor}";
|
||||
description = "Eclipse IDE for Enterprise Java and Web Developers";
|
||||
src =
|
||||
fetchurl {
|
||||
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-jee-${year}-${month}-R-linux-gtk-x86_64.tar.gz";
|
||||
hash = "sha512-bgaRM7l4WOoGA8doR/nqjV4Hnszx3N4cZANYfq/Fq5Agspocu4m1F4ofetQC4BdlLkx0o+moKSN6sm34aT5H4Q==";
|
||||
};
|
||||
};
|
||||
|
||||
### Eclipse Committers
|
||||
|
||||
eclipse-committers = buildEclipse {
|
||||
name = "eclipse-committers-${platform_major}.${platform_minor}";
|
||||
description = "Eclipse IDE for Eclipse Committers and Eclipse Platform Plugin Developers";
|
||||
src =
|
||||
fetchurl {
|
||||
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-committers-${year}-${month}-R-linux-gtk-x86_64.tar.gz";
|
||||
hash = "sha512-YyyATAL0pJVrinrLixIW3p+bz3WfD7L/WL0EGnUWgCGsiVDzF2CGoXXT8YsH34uc+6Hn8z23JCoNX4Sqdo8i7Q==";
|
||||
};
|
||||
};
|
||||
|
||||
### Eclipse IDE for RCP and RAP Developers
|
||||
|
||||
eclipse-rcp = buildEclipse {
|
||||
name = "eclipse-rcp-${platform_major}.${platform_minor}";
|
||||
description = "Eclipse IDE for RCP and RAP Developers";
|
||||
src =
|
||||
fetchurl {
|
||||
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-rcp-${year}-${month}-R-linux-gtk-x86_64.tar.gz";
|
||||
hash = "sha256-1Go3e1HDRJlba8ySYRfi0+aU6aHjKmd3fc/IgeKw18c=";
|
||||
};
|
||||
};
|
||||
|
||||
### Environments
|
||||
|
||||
# Function that assembles a complete Eclipse environment from an
|
||||
# Eclipse package and list of Eclipse plugins.
|
||||
eclipseWithPlugins = { eclipse, plugins ? [], jvmArgs ? [] }:
|
||||
let
|
||||
# Gather up the desired plugins.
|
||||
pluginEnv = buildEnv {
|
||||
name = "eclipse-plugins";
|
||||
paths =
|
||||
with lib;
|
||||
filter (x: x ? isEclipsePlugin) (closePropagation plugins);
|
||||
};
|
||||
|
||||
# Prepare the JVM arguments to add to the ini file. We here also
|
||||
# add the property indicating the plugin directory.
|
||||
dropinPropName = "org.eclipse.equinox.p2.reconciler.dropins.directory";
|
||||
dropinProp = "-D${dropinPropName}=${pluginEnv}/eclipse/dropins";
|
||||
jvmArgsText = lib.concatStringsSep "\n" (jvmArgs ++ [dropinProp]);
|
||||
|
||||
# Base the derivation name on the name of the underlying
|
||||
# Eclipse.
|
||||
name = (lib.meta.appendToName "with-plugins" eclipse).name;
|
||||
in
|
||||
runCommand name { nativeBuildInputs = [ makeWrapper ]; } ''
|
||||
mkdir -p $out/bin $out/etc
|
||||
|
||||
# Prepare an eclipse.ini with the plugin directory.
|
||||
cat ${eclipse}/eclipse/eclipse.ini - > $out/etc/eclipse.ini <<EOF
|
||||
${jvmArgsText}
|
||||
EOF
|
||||
|
||||
makeWrapper ${eclipse}/bin/eclipse $out/bin/eclipse \
|
||||
--add-flags "--launcher.ini $out/etc/eclipse.ini"
|
||||
|
||||
ln -s ${eclipse}/share $out/
|
||||
'';
|
||||
|
||||
### Plugins
|
||||
|
||||
plugins = callPackage ./plugins.nix { };
|
||||
|
||||
}
|
||||
766
pkgs/applications/editors/eclipse/plugins.nix
Normal file
766
pkgs/applications/editors/eclipse/plugins.nix
Normal file
|
|
@ -0,0 +1,766 @@
|
|||
{ lib, stdenv, fetchurl, fetchzip, unzip }:
|
||||
|
||||
rec {
|
||||
|
||||
# A primitive builder of Eclipse plugins. This function is intended
|
||||
# to be used when building more advanced builders.
|
||||
buildEclipsePluginBase = { name
|
||||
, buildInputs ? []
|
||||
, passthru ? {}
|
||||
, ... } @ attrs:
|
||||
stdenv.mkDerivation (attrs // {
|
||||
name = "eclipse-plugin-" + name;
|
||||
|
||||
buildInputs = buildInputs ++ [ unzip ];
|
||||
|
||||
passthru = {
|
||||
isEclipsePlugin = true;
|
||||
} // passthru;
|
||||
});
|
||||
|
||||
# Helper for the common case where we have separate feature and
|
||||
# plugin JARs.
|
||||
buildEclipsePlugin =
|
||||
{ name, srcFeature, srcPlugin ? null, srcPlugins ? [], ... } @ attrs:
|
||||
assert srcPlugin == null -> srcPlugins != [];
|
||||
assert srcPlugin != null -> srcPlugins == [];
|
||||
|
||||
let
|
||||
|
||||
pSrcs = if (srcPlugin != null) then [ srcPlugin ] else srcPlugins;
|
||||
|
||||
in
|
||||
|
||||
buildEclipsePluginBase (attrs // {
|
||||
srcs = [ srcFeature ] ++ pSrcs;
|
||||
|
||||
buildCommand = ''
|
||||
dropinDir="$out/eclipse/dropins/${name}"
|
||||
|
||||
mkdir -p $dropinDir/features
|
||||
unzip ${srcFeature} -d $dropinDir/features/
|
||||
|
||||
mkdir -p $dropinDir/plugins
|
||||
for plugin in ${toString pSrcs}; do
|
||||
cp -v $plugin $dropinDir/plugins/$(stripHash $plugin)
|
||||
done
|
||||
'';
|
||||
});
|
||||
|
||||
# Helper for the case where the build directory has the layout of an
|
||||
# Eclipse update site, that is, it contains the directories
|
||||
# `features` and `plugins`. All features and plugins inside these
|
||||
# directories will be installed.
|
||||
buildEclipseUpdateSite = { name, ... } @ attrs:
|
||||
buildEclipsePluginBase (attrs // {
|
||||
dontBuild = true;
|
||||
doCheck = false;
|
||||
|
||||
installPhase = ''
|
||||
dropinDir="$out/eclipse/dropins/${name}"
|
||||
|
||||
# Install features.
|
||||
cd features
|
||||
for feature in *.jar; do
|
||||
featureName=''${feature%.jar}
|
||||
mkdir -p $dropinDir/features/$featureName
|
||||
unzip $feature -d $dropinDir/features/$featureName
|
||||
done
|
||||
cd ..
|
||||
|
||||
# Install plugins.
|
||||
mkdir -p $dropinDir/plugins
|
||||
|
||||
# A bundle should be unpacked if the manifest matches this
|
||||
# pattern.
|
||||
unpackPat="Eclipse-BundleShape:\\s*dir"
|
||||
|
||||
cd plugins
|
||||
for plugin in *.jar ; do
|
||||
pluginName=''${plugin%.jar}
|
||||
manifest=$(unzip -p $plugin META-INF/MANIFEST.MF)
|
||||
|
||||
if [[ $manifest =~ $unpackPat ]] ; then
|
||||
mkdir $dropinDir/plugins/$pluginName
|
||||
unzip $plugin -d $dropinDir/plugins/$pluginName
|
||||
else
|
||||
cp -v $plugin $dropinDir/plugins/
|
||||
fi
|
||||
done
|
||||
cd ..
|
||||
'';
|
||||
});
|
||||
|
||||
acejump = buildEclipsePlugin rec {
|
||||
name = "acejump-${version}";
|
||||
version = "1.0.0.201610261941";
|
||||
|
||||
srcFeature = fetchurl {
|
||||
url = "https://tobiasmelcher.github.io/acejumpeclipse/features/acejump.feature_${version}.jar";
|
||||
sha256 = "1szswjxp9g70ibfbv3p8dlq1bngq7nc22kp657z9i9kp8309md2d";
|
||||
};
|
||||
|
||||
srcPlugin = fetchurl {
|
||||
url = "https://tobiasmelcher.github.io/acejumpeclipse/plugins/acejump_${version}.jar";
|
||||
sha256 = "1cn64xj2bm69vnn9db2xxh6kq148v83w5nx3183mrqb59ym3v9kf";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/tobiasmelcher/EclipseAceJump";
|
||||
description = "Provides fast jumps to text based on initial letter";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.mit;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
|
||||
ansi-econsole = buildEclipsePlugin rec {
|
||||
name = "ansi-econsole-${version}";
|
||||
version = "1.3.5.201612301822";
|
||||
|
||||
srcFeature = fetchurl {
|
||||
url = "https://mihnita.github.io/ansi-econsole/install/features/net.mihai-nita.ansicon_${version}.jar";
|
||||
sha256 = "086ylxpsrlpbvwv5mw7v6b44j63cwzgi8apg2mq058ydr5ak6hxs";
|
||||
};
|
||||
|
||||
srcPlugin = fetchurl {
|
||||
url = "https://mihnita.github.io/ansi-econsole/install/plugins/net.mihai-nita.ansicon.plugin_${version}.jar";
|
||||
sha256 = "1j42l0xxzs89shqkyn91lb0gia10mifzy0i73c3n7gj7sv2ddbjq";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://mihai-nita.net/java/#ePluginAEC";
|
||||
description = "Adds support for ANSI escape sequences in the Eclipse console";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
|
||||
antlr-runtime_4_5 = buildEclipsePluginBase rec {
|
||||
name = "antlr-runtime-4.5.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.antlr.org/download/${name}.jar";
|
||||
sha256 = "0lm78i2annlczlc2cg5xvby0g1dyl0sh1y5xc2pymjlmr67a1g4k";
|
||||
};
|
||||
|
||||
buildCommand = ''
|
||||
dropinDir="$out/eclipse/dropins/"
|
||||
mkdir -p $dropinDir
|
||||
cp -v $src $dropinDir/${name}.jar
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A powerful parser generator for processing structured text or binary files";
|
||||
homepage = "https://www.antlr.org/";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
|
||||
antlr-runtime_4_7 = buildEclipsePluginBase rec {
|
||||
name = "antlr-runtime-4.7.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.antlr.org/download/${name}.jar";
|
||||
sha256 = "07f91mjclacrvkl8a307w2abq5wcqp0gcsnh0jg90ddfpqcnsla3";
|
||||
};
|
||||
|
||||
buildCommand = ''
|
||||
dropinDir="$out/eclipse/dropins/"
|
||||
mkdir -p $dropinDir
|
||||
cp -v $src $dropinDir/${name}.jar
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A powerful parser generator for processing structured text or binary files";
|
||||
homepage = "https://www.antlr.org/";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
|
||||
anyedittools = buildEclipsePlugin rec {
|
||||
name = "anyedit-${version}";
|
||||
version = "2.7.1.201709201439";
|
||||
|
||||
srcFeature = fetchurl {
|
||||
url = "http://andrei.gmxhome.de/eclipse/features/AnyEditTools_${version}.jar";
|
||||
sha256 = "1wqzl7wq85m9gil8rnvly45ps0a2m0svw613pg6djs5i7amhnayh";
|
||||
};
|
||||
|
||||
srcPlugin = fetchurl {
|
||||
url = "https://github.com/iloveeclipse/anyedittools/releases/download/2.7.1/de.loskutov.anyedit.AnyEditTools_${version}.jar";
|
||||
sha256 = "03iyb6j2srq74iigmg7dk098c2svyv0ygdfql5jqr44a32n07k8q";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://andrei.gmxhome.de/anyedit/";
|
||||
description = "Adds new tools to the context menu of text-based editors";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.epl10;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
|
||||
autodetect-encoding = buildEclipsePlugin rec {
|
||||
name = "autodetect-encoding-${version}";
|
||||
version = "1.8.5.201801191359";
|
||||
|
||||
srcFeature = fetchurl {
|
||||
url = "https://github.com/cypher256/eclipse-encoding-plugin/raw/master/eclipse.encoding.updatesite.snapshot/features/eclipse.encoding.plugin.feature_${version}.jar";
|
||||
sha256 = "1m8ypsc1dwz0y6yhjgxsdi9813d38jllv7javgwvcd30g042a3kx";
|
||||
};
|
||||
|
||||
srcPlugin = fetchurl {
|
||||
url = "https://github.com/cypher256/eclipse-encoding-plugin/raw/master/eclipse.encoding.updatesite.snapshot/plugins/mergedoc.encoding_${version}.jar";
|
||||
sha256 = "1n2rzybfcwp3ss2qi0fhd8vm38vdwav8j837lqiqlfcnvzwsk86m";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/cypher256/eclipse-encoding-plugin";
|
||||
description = "Show file encoding and line ending for the active editor in the eclipse status bar";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.epl10;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
|
||||
bytecode-outline = buildEclipsePlugin rec {
|
||||
name = "bytecode-outline-${version}";
|
||||
version = "2.5.0.201711011753-5a57fdf";
|
||||
|
||||
srcFeature = fetchurl {
|
||||
url = "http://andrei.gmxhome.de/eclipse/features/de.loskutov.BytecodeOutline.feature_${version}.jar";
|
||||
sha256 = "0yciqhcq0n5i326mwy57r4ywmkz2c2jky7r4pcmznmhvks3z65ps";
|
||||
};
|
||||
|
||||
srcPlugin = fetchurl {
|
||||
url = "http://dl.bintray.com/iloveeclipse/plugins/de.loskutov.BytecodeOutline_${version}.jar";
|
||||
sha256 = "1vmsqv32jfl7anvdkw0vir342miv5sr9df7vd1w44lf1yf97vxlw";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://andrei.gmxhome.de/bytecode/";
|
||||
description = "Shows disassembled bytecode of current java editor or class file";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.bsd2;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
|
||||
cdt = buildEclipseUpdateSite rec {
|
||||
name = "cdt-${version}";
|
||||
# find current version at https://www.eclipse.org/cdt/downloads.php
|
||||
version = "10.6.0";
|
||||
|
||||
src = fetchzip {
|
||||
stripRoot = false;
|
||||
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/tools/cdt/releases/${lib.versions.majorMinor version}/${name}/${name}.zip";
|
||||
hash = "sha256-eMvZ2UvPpUq1J4DDg6f+R1g217bnRjxmr5zWUAhef/c=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://eclipse.org/cdt/";
|
||||
description = "C/C++ development tooling";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.epl10;
|
||||
platforms = platforms.all;
|
||||
maintainers = [ maintainers.bjornfor ];
|
||||
};
|
||||
};
|
||||
|
||||
checkstyle = buildEclipseUpdateSite rec {
|
||||
name = "checkstyle-${version}";
|
||||
version = "8.7.0.201801131309";
|
||||
|
||||
src = fetchzip {
|
||||
stripRoot = false;
|
||||
url = "mirror://sourceforge/project/eclipse-cs/Eclipse%20Checkstyle%20Plug-in/8.7.0/net.sf.eclipsecs-updatesite_${version}.zip";
|
||||
sha256 = "07fymk705x4mwq7vh2i6frsf67jql4bzrkdzhb4n74zb0g1dib60";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://eclipse-cs.sourceforge.net/";
|
||||
description = "Checkstyle integration into the Eclipse IDE";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.lgpl21;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
color-theme = buildEclipsePlugin rec {
|
||||
name = "color-theme-${version}";
|
||||
version = "1.0.0.201410260308";
|
||||
|
||||
srcFeature = fetchurl {
|
||||
url = "https://eclipse-color-theme.github.io/update/features/com.github.eclipsecolortheme.feature_${version}.jar";
|
||||
sha256 = "128b9b1cib5ff0w1114ns5mrbrhj2kcm358l4dpnma1s8gklm8g2";
|
||||
};
|
||||
|
||||
srcPlugin = fetchurl {
|
||||
url = "https://eclipse-color-theme.github.io/update/plugins/com.github.eclipsecolortheme_${version}.jar";
|
||||
sha256 = "0wz61909bhqwzpqwll27ia0cn3anyp81haqx3rj1iq42cbl42h0y";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://eclipsecolorthemes.org/";
|
||||
description = "Plugin to switch color themes conveniently and without side effects";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.epl10;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
|
||||
cup = buildEclipsePlugin rec {
|
||||
name = "cup-${version}";
|
||||
version = "1.1.0.201604221613";
|
||||
version_ = "1.0.0.201604221613";
|
||||
|
||||
srcFeature = fetchurl {
|
||||
url = "http://www2.in.tum.de/projects/cup/eclipse/features/CupEclipsePluginFeature_${version}.jar";
|
||||
sha256 = "13nnsf0cqg02z3af6xg45rhcgiffsibxbx6h1zahjv7igvqgkyna";
|
||||
};
|
||||
|
||||
srcPlugins = [
|
||||
(fetchurl {
|
||||
url = "http://www2.in.tum.de/projects/cup/eclipse/plugins/CupReferencedLibraries_${version_}.jar";
|
||||
sha256 = "0kif8kivrysprva1pxzajm88gi967qf7idhb6ga2xpvsdcris91j";
|
||||
})
|
||||
|
||||
(fetchurl {
|
||||
url = "http://www2.in.tum.de/projects/cup/eclipse/plugins/de.tum.in.www2.CupPlugin_${version}.jar";
|
||||
sha256 = "022phbrsny3gb8npb6sxyqqxacx138q5bd7dq3gqxh3kprx5chbl";
|
||||
})
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ zest ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://www2.cs.tum.edu/projects/cup/eclipse.php";
|
||||
description = "IDE for developing CUP based parsers";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
platforms = platforms.all;
|
||||
maintainers = [ maintainers.romildo ];
|
||||
};
|
||||
};
|
||||
|
||||
drools = buildEclipseUpdateSite rec {
|
||||
name = "drools-${version}";
|
||||
version = "7.17.0.Final";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://download.jboss.org/drools/release/${version}/droolsjbpm-tools-distribution-${version}.zip";
|
||||
sha512 = "2qzc1iszqfrfnw8xip78n3kp6hlwrvrr708vlmdk7nv525xhs0ssjaxriqdhcr0s6jripmmazxivv3763rnk2bfkh31hmbnckpx4r3m";
|
||||
postFetch = ''
|
||||
# update site is a couple levels deep, alongside some other irrelevant stuff
|
||||
cd $out;
|
||||
find . -type f -not -path ./binaries/org.drools.updatesite/\* -exec rm {} \;
|
||||
rmdir sources;
|
||||
mv binaries/org.drools.updatesite/* .;
|
||||
rmdir binaries/org.drools.updatesite binaries;
|
||||
'';
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.drools.org/";
|
||||
description = "Drools is a Business Rules Management System (BRMS) solution";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.asl20;
|
||||
};
|
||||
};
|
||||
|
||||
eclemma = buildEclipseUpdateSite rec {
|
||||
name = "eclemma-${version}";
|
||||
version = "2.3.2.201409141915";
|
||||
|
||||
src = fetchzip {
|
||||
stripRoot = false;
|
||||
url = "mirror://sourceforge/project/eclemma/01_EclEmma_Releases/2.3.2/eclemma-2.3.2.zip";
|
||||
sha256 = "0w1kwcjh45p7msv5vpc8i6dsqwrnfmjama6vavpnxlji56jd3c43";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.eclemma.org/";
|
||||
description = "EclEmma is a free Java code coverage tool for Eclipse";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.epl10;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
|
||||
findbugs = buildEclipsePlugin rec {
|
||||
name = "findbugs-${version}";
|
||||
version = "3.0.1.20150306-5afe4d1";
|
||||
|
||||
srcFeature = fetchurl {
|
||||
url = "http://findbugs.cs.umd.edu/eclipse/features/edu.umd.cs.findbugs.plugin.eclipse_${version}.jar";
|
||||
sha256 = "1m9fav2xlb9wrx2d00lpnh2sy0w5yzawynxm6xhhbfdzd0vpfr9v";
|
||||
};
|
||||
|
||||
srcPlugin = fetchurl {
|
||||
url = "http://findbugs.cs.umd.edu/eclipse/plugins/edu.umd.cs.findbugs.plugin.eclipse_${version}.jar";
|
||||
sha256 = "10p3mrbp9wi6jhlmmc23qv7frh605a23pqsc7w96569bsfb5wa8q";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://findbugs.sourceforge.net/";
|
||||
description = "Plugin that uses static analysis to look for bugs in Java code";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.epl10;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
|
||||
freemarker = buildEclipseUpdateSite rec {
|
||||
name = "freemarker-${version}";
|
||||
version = "1.5.305";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://github.com/ddekany/jbosstools-freemarker/releases/download/v${version}/freemarker.site-${version}.zip";
|
||||
sha256 = "1qrhi300vk07gi14r445wvy0bvghbjd6c4k7q09pqpaxv6raiczn";
|
||||
stripRoot = false;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/ddekany/jbosstools-freemarker";
|
||||
description = "Plugin that provides an editor for Apache FreeMarker files";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
};
|
||||
};
|
||||
|
||||
gnuarmeclipse = buildEclipseUpdateSite rec {
|
||||
name = "gnuarmeclipse-${version}";
|
||||
version = "3.1.1-201606210758";
|
||||
|
||||
src = fetchzip {
|
||||
stripRoot = false;
|
||||
url = "https://github.com/gnuarmeclipse/plug-ins/releases/download/v${version}/ilg.gnuarmeclipse.repository-${version}.zip";
|
||||
sha256 = "1g77jlhfa3csaxxps1z5lasrd9l2p5ajnddnq9ra5syw8ggkdc2h";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://gnuarmeclipse.livius.net/";
|
||||
description = "GNU ARM Eclipse Plug-ins";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.epl10;
|
||||
platforms = platforms.all;
|
||||
maintainers = [ maintainers.bjornfor ];
|
||||
};
|
||||
};
|
||||
|
||||
jsonedit = buildEclipsePlugin rec {
|
||||
name = "jsonedit-${version}";
|
||||
version = "1.1.1";
|
||||
|
||||
srcFeature = fetchurl {
|
||||
url = "https://boothen.github.io/Json-Eclipse-Plugin/features/jsonedit-feature_${version}.jar";
|
||||
sha256 = "0zkg8d8x3l5jpfxi0mz9dn62wmy4fjgpwdikj280fvsklmcw5b86";
|
||||
};
|
||||
|
||||
srcPlugins =
|
||||
let
|
||||
fetch = { n, h }:
|
||||
fetchurl {
|
||||
url = "https://boothen.github.io/Json-Eclipse-Plugin/plugins/jsonedit-${n}_${version}.jar";
|
||||
sha256 = h;
|
||||
};
|
||||
in
|
||||
map fetch [
|
||||
{ n = "core"; h = "0svs0aswnhl26cqw6bmw30cisx4cr50kc5njg272sy5c1dqjm1zq"; }
|
||||
{ n = "editor"; h = "1q62dinrbb18aywbvii4mlr7rxa20rdsxxd6grix9y8h9776q4l5"; }
|
||||
{ n = "folding"; h = "1qh4ijfb1gl9xza5ydi87v1kyima3a9sh7lncwdy1way3pdhln1y"; }
|
||||
{ n = "model"; h = "1pr6k2pdfdwx8jqs7gx7wzn3gxsql3sk6lnjha8m15lv4al6d4kj"; }
|
||||
{ n = "outline"; h = "1jgr2g16j3id8v367jbgd6kx6g2w636fbzmd8jvkvkh7y1jgjqxm"; }
|
||||
{ n = "preferences"; h = "027fhaqa5xbil6dmhvkbpha3pgw6dpmc2im3nlliyds57mdmdb1h"; }
|
||||
{ n = "text"; h = "0clywylyidrxlqs0n816nhgjmk1c3xl7sn904ki4q050amfy0wb2"; }
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ antlr-runtime_4_7 ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Adds support for JSON files to Eclipse";
|
||||
homepage = "https://github.com/boothen/Json-Eclipse-Plugin";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.epl10;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
|
||||
jdt-codemining = buildEclipsePlugin rec {
|
||||
name = "jdt-codemining-${version}";
|
||||
version = "1.0.0.201806221018";
|
||||
|
||||
srcFeature = fetchurl {
|
||||
url = "http://oss.opensagres.fr/jdt-codemining/snapshot/features/jdt-codemining-feature_${version}.jar";
|
||||
sha256 = "1vy30rsb9xifn4r1r2n84d48g6riadzli1xvhfs1mf5pkm5ljwl6";
|
||||
};
|
||||
|
||||
srcPlugin = fetchurl {
|
||||
url = "http://oss.opensagres.fr/jdt-codemining/snapshot/plugins/org.eclipse.jdt.codemining_${version}.jar";
|
||||
sha256 = "0qdzlqcjcm2i4mwhmcdml0am83z1dayrcmf37ji7vmw6iwdk1xmp";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/angelozerr/jdt-codemining";
|
||||
description = "Provides JDT Java CodeMining";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.epl10;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
|
||||
rustdt = buildEclipseUpdateSite rec {
|
||||
name = "rustdt-${version}";
|
||||
version = "0.6.2";
|
||||
owner = "RustDT";
|
||||
repo = "rustdt.github.io";
|
||||
rev = "5cbe753008c40555c493092a6f4ae1ffbff0b3ce";
|
||||
|
||||
src = fetchzip {
|
||||
stripRoot = false;
|
||||
url = "https://github.com/${owner}/${repo}/archive/${rev}.zip";
|
||||
sha256 = "1xfj4j27d1h4bdf2v7f78zi8lz4zkkj7s9kskmsqx5jcs2d459yp";
|
||||
postFetch =
|
||||
''
|
||||
mv "$out/${repo}-${rev}/releases/local-repo/"* "$out/"
|
||||
'';
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/RustDT";
|
||||
description = "Rust development tooling";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.epl10;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
|
||||
scala = buildEclipseUpdateSite rec {
|
||||
name = "scala-${version}";
|
||||
version = "4.4.1.201605041056";
|
||||
|
||||
src = fetchzip {
|
||||
url = "http://download.scala-ide.org/sdk/lithium/e44/scala211/stable/base-20160504-1321.zip";
|
||||
sha256 = "13xgx2rwlll0l4bs0g6gyvrx5gcc0125vzn501fdj0wv2fqxn5lw";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://scala-ide.org/";
|
||||
description = "The Scala IDE for Eclipse";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
|
||||
spotbugs = buildEclipseUpdateSite rec {
|
||||
name = "spotbugs-${version}";
|
||||
version = "3.1.11";
|
||||
|
||||
src = fetchzip {
|
||||
stripRoot = false;
|
||||
url = "https://github.com/spotbugs/spotbugs/releases/download/${version}/eclipsePlugin.zip";
|
||||
sha256 = "0aanqwx3gy1arpbkqd846381hiy6272lzwhfjl94x8jhfykpqqbj";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://spotbugs.github.io/";
|
||||
description = "Plugin that uses static analysis to look for bugs in Java code";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.lgpl21;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
|
||||
testng = buildEclipsePlugin rec {
|
||||
name = "testng-${version}";
|
||||
version = "6.9.13.201609291640";
|
||||
|
||||
srcFeature = fetchurl {
|
||||
url = "http://beust.com/eclipse-old/eclipse_${version}/features/org.testng.eclipse_${version}.jar";
|
||||
sha256 = "02wzcysl7ga3wnvnwp6asl8d77wgc547c5qqawixw94lw6fn1a15";
|
||||
};
|
||||
|
||||
srcPlugin = fetchurl {
|
||||
url = "http://beust.com/eclipse-old/eclipse_${version}/plugins/org.testng.eclipse_${version}.jar";
|
||||
sha256 = "1j4zw6392q3q6z3pcy803k3g0p220gk1x19fs99p0rmmdz83lc8d";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://testng.org/doc/";
|
||||
description = "Eclipse plugin for the TestNG testing framework";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
|
||||
vrapper = buildEclipseUpdateSite rec {
|
||||
name = "vrapper-${version}";
|
||||
version = "0.72.0";
|
||||
owner = "vrapper";
|
||||
repo = "vrapper";
|
||||
date = "20170311";
|
||||
|
||||
src = fetchzip {
|
||||
stripRoot = false;
|
||||
url = "https://github.com/${owner}/${repo}/releases/download/${version}/vrapper_${version}_${date}.zip";
|
||||
sha256 = "0nyirf6km97q211cxfy01kidxac20m8ba3kk9xj73ykrhsk3cxjp";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/vrapper/vrapper";
|
||||
description = "A wrapper to provide a Vim-like input scheme for moving around and editing text";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.all;
|
||||
maintainers = [ maintainers.stumoss ];
|
||||
};
|
||||
};
|
||||
|
||||
yedit = buildEclipsePlugin rec {
|
||||
name = "yedit-${version}";
|
||||
version = "1.0.20.201509041456";
|
||||
|
||||
srcFeature = fetchurl {
|
||||
url = "http://dadacoalition.org/yedit/features/org.dadacoalition.yedit.feature_${version}-RELEASE.jar";
|
||||
sha256 = "0rps73y19gwlrdr8jjrg3rhcaaagghnmri8297inxc5q2dvg0mlk";
|
||||
};
|
||||
|
||||
srcPlugin = fetchurl {
|
||||
url = "http://dadacoalition.org/yedit/plugins/org.dadacoalition.yedit_${version}-RELEASE.jar";
|
||||
sha256 = "1wpyw4z28ka60z36f8m71kz1giajcm26wb9bpv18sjiqwdgx9v0z";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/oyse/yedit";
|
||||
description = "A YAML editor plugin for Eclipse";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.epl10;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
|
||||
zest = buildEclipseUpdateSite rec {
|
||||
name = "zest-${version}";
|
||||
version = "3.9.101";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://archive.eclipse.org/tools/gef/downloads/drops/${version}/R201408150207/GEF-${name}.zip";
|
||||
sha256 = "01scn7cmcrjcp387spjm8ifgwrwwi77ypildandbisfvhj3qqs7m";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.eclipse.org/gef/zest/";
|
||||
description = "The Eclipse Visualization Toolkit";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
platforms = platforms.all;
|
||||
maintainers = [ maintainers.romildo ];
|
||||
};
|
||||
};
|
||||
|
||||
ivyde = buildEclipsePlugin rec {
|
||||
name = "ivyde-${version}";
|
||||
version = "2.2.0.final-201311091524-RELEASE";
|
||||
|
||||
srcFeature = fetchurl {
|
||||
url = "https://downloads.apache.org/ant/ivyde/updatesite/ivyde-${version}/features/org.apache.ivyde.feature_${version}.jar";
|
||||
sha1 = "c8fb6c4aab32db13db0bd81c1a148032667fff31";
|
||||
};
|
||||
|
||||
srcPlugin = fetchurl {
|
||||
url = "https://downloads.apache.org/ant/ivyde/updatesite/ivyde-${version}/plugins/org.apache.ivyde.eclipse_${version}.jar";
|
||||
sha1 = "0c80c2e228a07f18efab1c56ea026448eda70c06";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://ant.apache.org/ivy/ivyde/index.html";
|
||||
description = "A plugin which integrates Apache Ivy's dependency management";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.all;
|
||||
maintainers = [ maintainers.r3dl3g ];
|
||||
};
|
||||
};
|
||||
|
||||
ivyderv = buildEclipsePlugin rec {
|
||||
name = "ivyderv-${version}";
|
||||
version = "2.2.0.final-201311091524-RELEASE";
|
||||
|
||||
srcFeature = fetchurl {
|
||||
url = "https://downloads.apache.org/ant/ivyde/updatesite/ivyde-${version}/features/org.apache.ivyde.eclipse.resolvevisualizer.feature_${version}.jar";
|
||||
sha1 = "fb1941eaa2c0de54259de01b0da6d5a6b4a2cab1";
|
||||
};
|
||||
|
||||
srcPlugin = fetchurl {
|
||||
url = "https://downloads.apache.org/ant/ivyde/updatesite/ivyde-${version}/plugins/org.apache.ivyde.eclipse.resolvevisualizer_${version}.jar";
|
||||
sha1 = "225e0c8ccb010d622c159560638578c2fc51a67e";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://ant.apache.org/ivy/ivyde/index.html";
|
||||
description = "A graph viewer of the resolved dependencies.";
|
||||
longDescription = ''
|
||||
Apache IvyDE Resolve Visualizer is an optional dependency of Apache IvyDE since
|
||||
it requires additional plugins to be installed (Zest).
|
||||
'';
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.all;
|
||||
maintainers = [ maintainers.r3dl3g ];
|
||||
};
|
||||
};
|
||||
|
||||
ivy = buildEclipsePlugin rec {
|
||||
name = "ivy-${version}";
|
||||
version = "2.5.0.final_20191020104435";
|
||||
|
||||
srcFeature = fetchurl {
|
||||
url = "https://downloads.apache.org/ant/ivyde/updatesite/ivy-${version}/features/org.apache.ivy.eclipse.ant.feature_${version}.jar";
|
||||
sha256 = "de6134171a0edf569bb9b4c3a91639d469f196e86804d218adfdd60a5d7fa133";
|
||||
};
|
||||
|
||||
srcPlugin = fetchurl {
|
||||
url = "https://downloads.apache.org/ant/ivyde/updatesite/ivy-${version}/plugins/org.apache.ivy.eclipse.ant_${version}.jar";
|
||||
sha256 = "9e8ea20480cf73d0f0f3fb032d263c7536b24fd2eef71beb7d62af4e065f9ab5";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://ant.apache.org/ivy/index.html";
|
||||
description = "A popular dependency manager focusing on flexibility and simplicity";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.all;
|
||||
maintainers = [ maintainers.r3dl3g ];
|
||||
};
|
||||
};
|
||||
|
||||
ivyant = buildEclipsePlugin rec {
|
||||
name = "ivyant-${version}";
|
||||
version = "2.5.0.final_20191020104435";
|
||||
|
||||
srcFeature = fetchurl {
|
||||
url = "https://downloads.apache.org/ant/ivyde/updatesite/ivy-${version}/features/org.apache.ivy.eclipse.ant.feature_${version}.jar";
|
||||
sha256 = "de6134171a0edf569bb9b4c3a91639d469f196e86804d218adfdd60a5d7fa133";
|
||||
};
|
||||
|
||||
srcPlugin = fetchurl {
|
||||
url = "https://downloads.apache.org/ant/ivyde/updatesite/ivy-${version}/plugins/org.apache.ivy.eclipse.ant_${version}.jar";
|
||||
sha256 = "9e8ea20480cf73d0f0f3fb032d263c7536b24fd2eef71beb7d62af4e065f9ab5";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://ant.apache.org/ivy/ivyde/index.html";
|
||||
description = "Ant Tasks integrated into Eclipse's Ant runtime";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.all;
|
||||
maintainers = [ maintainers.r3dl3g ];
|
||||
};
|
||||
};
|
||||
}
|
||||
48
pkgs/applications/editors/ed/default.nix
Normal file
48
pkgs/applications/editors/ed/default.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{ lib, stdenv, fetchurl, lzip
|
||||
}:
|
||||
|
||||
# Note: this package is used for bootstrapping fetchurl, and thus
|
||||
# cannot use fetchpatch! All mutable patches (generated by GitHub or
|
||||
# cgit) that are needed here should be included directly in Nixpkgs as
|
||||
# files.
|
||||
|
||||
stdenv.mkDerivation (rec {
|
||||
pname = "ed";
|
||||
version = "1.18";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/ed/${pname}-${version}.tar.lz";
|
||||
sha256 = "sha256-rKjvrZgAxYdySiC5eqj8R+a1pH34Fgb+q6gxsHRGK08=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ lzip ];
|
||||
|
||||
doCheck = true; # not cross;
|
||||
|
||||
meta = {
|
||||
description = "An implementation of the standard Unix editor";
|
||||
|
||||
longDescription = ''
|
||||
GNU ed is a line-oriented text editor. It is used to create,
|
||||
display, modify and otherwise manipulate text files, both
|
||||
interactively and via shell scripts. A restricted version of ed,
|
||||
red, can only edit files in the current directory and cannot
|
||||
execute shell commands. Ed is the "standard" text editor in the
|
||||
sense that it is the original editor for Unix, and thus widely
|
||||
available. For most purposes, however, it is superseded by
|
||||
full-screen editors such as GNU Emacs or GNU Moe.
|
||||
'';
|
||||
|
||||
license = lib.licenses.gpl3Plus;
|
||||
|
||||
homepage = "https://www.gnu.org/software/ed/";
|
||||
|
||||
maintainers = [ ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
} // lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform) {
|
||||
# This may be moved above during a stdenv rebuild.
|
||||
preConfigure = ''
|
||||
configureFlagsArray+=("CC=$CC")
|
||||
'';
|
||||
})
|
||||
20
pkgs/applications/editors/edbrowse/0001-small-fixes.patch
Normal file
20
pkgs/applications/editors/edbrowse/0001-small-fixes.patch
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
diff -Naur source.old/src/makefile source/src/makefile
|
||||
--- source.old/src/makefile 1969-12-31 21:00:01.000000000 -0300
|
||||
+++ source/src/makefile 2021-06-07 18:58:48.851231787 -0300
|
||||
@@ -101,14 +101,14 @@
|
||||
|
||||
# need packages nodejs and libnode-dev
|
||||
js_hello_v8 : js_hello_v8.cpp
|
||||
- g++ -I/usr/include/v8 js_hello_v8.cpp -lv8 -lstdc++ -o js_hello_v8
|
||||
+ $(CXX) -I/usr/include/v8 js_hello_v8.cpp -lv8 -lstdc++ -o js_hello_v8
|
||||
|
||||
HELLOEXTRA = stringfile.o messages.o msg-strings.o startwindow.o ebrc.o format.o http.o isup.o fetchmail.o sendmail.o plugin.o buffers.o dbstubs.o html.o decorate.o html-tidy.o css.o
|
||||
js_hello_moz : js_hello_moz.o $(HELLOEXTRA) jseng-moz.o
|
||||
$(CC) js_hello_moz.o $(HELLOEXTRA) jseng-moz.o $(LDFLAGS) -lmozjs-$(SMV) -lstdc++ -o $@
|
||||
|
||||
js_hello_quick : js_hello_quick.c
|
||||
- gcc $(CFLAGS) js_hello_quick.c stringfile.o messages.o msg-strings.o ebrc.o format.o -o js_hello_quick -L/usr/local/lib/quickjs -lquickjs -lm -ldl -lpthread -latomic
|
||||
+ $(CC) $(CFLAGS) js_hello_quick.c stringfile.o messages.o msg-strings.o ebrc.o format.o -o js_hello_quick $(QUICKJS_LDFLAGS) -lm -lpthread
|
||||
|
||||
hello: js_hello_duk js_hello_v8 js_hello_moz js_hello_quick
|
||||
|
||||
79
pkgs/applications/editors/edbrowse/default.nix
Normal file
79
pkgs/applications/editors/edbrowse/default.nix
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, curl
|
||||
, duktape
|
||||
, html-tidy
|
||||
, openssl
|
||||
, pcre
|
||||
, perl
|
||||
, pkg-config
|
||||
, quickjs
|
||||
, readline
|
||||
, which
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "edbrowse";
|
||||
version = "3.8.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "CMB";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-ZXxzQBAmu7kM3sjqg/rDLBXNucO8sFRFKXV8UxQVQZU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
which
|
||||
];
|
||||
buildInputs = [
|
||||
curl
|
||||
duktape
|
||||
html-tidy
|
||||
openssl
|
||||
pcre
|
||||
perl
|
||||
quickjs
|
||||
readline
|
||||
];
|
||||
|
||||
patches = [
|
||||
# Fixes some small annoyances on src/makefile
|
||||
./0001-small-fixes.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/makefile --replace\
|
||||
'-L/usr/local/lib/quickjs' '-L${quickjs}/lib/quickjs'
|
||||
for i in $(find ./tools/ -type f ! -name '*.c'); do
|
||||
patchShebangs $i
|
||||
done
|
||||
'';
|
||||
|
||||
makeFlags = [
|
||||
"-C" "src"
|
||||
"PREFIX=${placeholder "out"}"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://edbrowse.org/";
|
||||
description = "Command Line Editor Browser";
|
||||
longDescription = ''
|
||||
Edbrowse is a combination editor, browser, and mail client that is 100%
|
||||
text based. The interface is similar to /bin/ed, though there are many
|
||||
more features, such as editing multiple files simultaneously, and
|
||||
rendering html. This program was originally written for blind users, but
|
||||
many sighted users have taken advantage of the unique scripting
|
||||
capabilities of this program, which can be found nowhere else. A batch
|
||||
job, or cron job, can access web pages on the internet, submit forms, and
|
||||
send email, with no human intervention whatsoever. edbrowse can also tap
|
||||
into databases through odbc. It was primarily written by Karl Dahlke.
|
||||
'';
|
||||
license = licenses.gpl1Plus;
|
||||
maintainers = with maintainers; [ schmitthenner vrthra equirosa ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
# TODO: send the patch to upstream developers
|
||||
40
pkgs/applications/editors/edit/default.nix
Normal file
40
pkgs/applications/editors/edit/default.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ lib, stdenv, fetchgit, unzip, pkg-config, ncurses, libX11, libXft, cwebbin }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "edit-nightly";
|
||||
version = "20180228";
|
||||
|
||||
src = fetchgit {
|
||||
url = "git://c9x.me/ed.git";
|
||||
rev = "77d96145b163d79186c722a7ffccfff57601157c";
|
||||
sha256 = "0rsmp7ydmrq3xx5q19566is9a2v2w5yfsphivfc7j4ljp32jlyyy";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
unzip
|
||||
pkg-config
|
||||
cwebbin
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
ncurses
|
||||
libX11
|
||||
libXft
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
ctangle *.w
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -Dm755 obj/edit -t $out/bin
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A relaxing mix of Vi and ACME";
|
||||
homepage = "https://c9x.me/edit";
|
||||
license = licenses.publicDomain;
|
||||
maintainers = [ maintainers.vrthra ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
49
pkgs/applications/editors/elvis/default.nix
Normal file
49
pkgs/applications/editors/elvis/default.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{ fetchurl, fetchpatch, lib, stdenv, ncurses }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "elvis";
|
||||
version = "2.2_0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.the-little-red-haired-girl.org/pub/elvis/elvis-${version}.tar.gz";
|
||||
sha256 = "182fj9qzyq6cjq1r849gpam6nq9smwv9f9xwaq84961p56r6d14s";
|
||||
};
|
||||
|
||||
buildInputs = [ ncurses ];
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://github.com/mbert/elvis/commit/076cf4ad5cc993be0c6195ec0d5d57e5ad8ac1eb.patch";
|
||||
sha256 = "0yzkc1mxjwg09mfmrk20ksa0vfnb2x83ndybwvawq4xjm1qkcahc";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace configure \
|
||||
--replace '-lcurses' '-lncurses'
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
mkdir -p $out/share/man/man1
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/share/elvis $out/share/elvis/doc
|
||||
cp elvis ref elvtags elvfmt $out/bin
|
||||
cp -R data/* $out/share/elvis
|
||||
cp doc/* $out/share/elvis/doc
|
||||
|
||||
mkdir -p $out/share/man/man1
|
||||
for a in doc/*.man; do
|
||||
cp $a $out/share/man/man1/`basename $a .man`.1
|
||||
done
|
||||
'';
|
||||
|
||||
configureFlags = [ "--ioctl=termios" ];
|
||||
|
||||
meta = {
|
||||
homepage = "http://elvis.the-little-red-haired-girl.org/";
|
||||
description = "A vi clone for Unix and other operating systems";
|
||||
license = lib.licenses.free;
|
||||
};
|
||||
}
|
||||
29
pkgs/applications/editors/em/default.nix
Normal file
29
pkgs/applications/editors/em/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "em";
|
||||
version = "1.0.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://pgas.freeshell.org/C/em/${pname}-${version}.tar.gz";
|
||||
hash = "sha256-ijMBkl7U1f9MTXgli9kUFB8ttMG6TMQnxfDMP9AblTQ=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://pgas.freeshell.org/C/em/";
|
||||
description = "Editor for Mortals";
|
||||
longDescription = ''
|
||||
Em is a QMC variant of the standard Unix text editor - ed. It includes all
|
||||
of ed, so the documentation for ed is fully applicable to em. Em also has
|
||||
a number of new commands and facilities designed to improve its
|
||||
interaction and increase its usefulness to users at fast vdu terminals
|
||||
(such as the ITT's at QMC).
|
||||
'';
|
||||
license = licenses.publicDomain;
|
||||
maintainers = with maintainers; [ AndersonTorres ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
5
pkgs/applications/editors/emacs/28.nix
Normal file
5
pkgs/applications/editors/emacs/28.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import ./generic.nix (rec {
|
||||
version = "28.1";
|
||||
sha256 = "sha256-D33wnlxhx0LyG9WZaQDj2II3tG0HcJdZTC4dSA3lrgY=";
|
||||
patches = _: [ ];
|
||||
})
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
{ trivialBuild
|
||||
, haskellPackages
|
||||
}:
|
||||
|
||||
trivialBuild {
|
||||
pname = "agda-input";
|
||||
|
||||
inherit (haskellPackages.Agda) src version;
|
||||
|
||||
postUnpack = ''
|
||||
mv $sourceRoot/src/data/emacs-mode/agda-input.el $sourceRoot
|
||||
'';
|
||||
|
||||
meta = {
|
||||
inherit (haskellPackages.Agda.meta) homepage license;
|
||||
description = "Standalone package providing the agda-input method without building Agda.";
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
{ trivialBuild
|
||||
, haskellPackages
|
||||
}:
|
||||
|
||||
trivialBuild rec {
|
||||
pname = "agda-mode";
|
||||
version = haskellPackages.Agda.version;
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
# already byte-compiled by Agda builder
|
||||
buildPhase = ''
|
||||
agda=`${haskellPackages.Agda}/bin/agda-mode locate`
|
||||
cp `dirname $agda`/*.el* .
|
||||
'';
|
||||
|
||||
meta = {
|
||||
inherit (haskellPackages.Agda.meta) homepage license;
|
||||
description = "Agda2-mode for Emacs extracted from Agda package";
|
||||
longDescription = ''
|
||||
Wrapper packages that liberates init.el from `agda-mode locate` magic.
|
||||
Simply add this to user profile or systemPackages and do `(require
|
||||
'agda2)` in init.el.
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, trivialBuild
|
||||
, fetchFromGitHub
|
||||
, emacs
|
||||
}:
|
||||
|
||||
trivialBuild rec {
|
||||
pname = "apheleia";
|
||||
version = "1.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "raxod502";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-yd9yhQOs0+RB8RKaXnV/kClDm8cO97RkC8yw5b8IKRo=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
emacs
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/raxod502/apheleia";
|
||||
description = "Asynchronous buffer reformat";
|
||||
longDescription = ''
|
||||
Run code formatter on buffer contents without moving point, using RCS
|
||||
patches and dynamic programming.
|
||||
'';
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ AndersonTorres leungbk ];
|
||||
inherit (emacs.meta) platforms;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
{ lib
|
||||
, trivialBuild
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
trivialBuild {
|
||||
pname = "bqn-mode";
|
||||
version = "0.pre+date=2022-01-07";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "museoa";
|
||||
repo = "bqn-mode";
|
||||
rev = "86ef8b4d32d272b2765cd4a6e6e0b70a4f3e99a2";
|
||||
hash = "sha256-6ygV/iNzzpZ77w+Dh/snHAzUxrbfaU9TxuNOtJK6pNQ=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Emacs mode for BQN programming language";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ sternenseemann AndersonTorres ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
{ stdenv
|
||||
, cedille
|
||||
, emacs
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "cedille-mode";
|
||||
|
||||
inherit (cedille) version src;
|
||||
|
||||
buildInputs = [ emacs ];
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -d $out/share/emacs/site-lisp
|
||||
install se-mode/*.el se-mode/*.elc $out/share/emacs/site-lisp
|
||||
install cedille-mode/*.el cedille-mode/*.elc $out/share/emacs/site-lisp
|
||||
install *.el *.elc $out/share/emacs/site-lisp
|
||||
substituteInPlace $out/share/emacs/site-lisp/cedille-mode.el \
|
||||
--replace /usr/bin/cedille ${cedille}/bin/cedille
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
inherit (cedille.meta)
|
||||
homepage license maintainers platforms;
|
||||
description = "Emacs major mode for Cedille";
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
{ lib
|
||||
, trivialBuild
|
||||
, fetchFromGitHub
|
||||
, emacs
|
||||
, color-theme
|
||||
}:
|
||||
|
||||
trivialBuild {
|
||||
pname = "color-theme-solarized";
|
||||
version = "0.pre+unstable=2017-10-24";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sellout";
|
||||
repo = "emacs-color-theme-solarized";
|
||||
rev = "f3ca8902ea056fb8e46cb09f09c96294e31cd4ee";
|
||||
hash = "sha256-oxX0lo6sxotEiR3nPrKPE9H01HKB3ohB/p8eEHFTp5k=";
|
||||
};
|
||||
|
||||
buildInputs = [ emacs ];
|
||||
propagatedUserEnvPkgs = [ color-theme ];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
emacs -L . -L ${color-theme}/share/emacs/site-lisp/elpa/color-theme-* \
|
||||
--batch -f batch-byte-compile *.el
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://ethanschoonover.com/solarized";
|
||||
description = "Precision colors for machines and people; Emacs implementation";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ samuelrivas AndersonTorres ];
|
||||
inherit (emacs.meta) platforms;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "control-lock";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/emacsmirror/emacswiki.org/blob/185fdc34fb1e02b43759ad933d3ee5646b0e78f8/control-lock.el";
|
||||
sha256 = "1b5xcgq2r565pr1c14dwrmn1fl05p56infapa5pqvajv2kpfla7h";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = ''
|
||||
install -d $out/share/emacs/site-lisp
|
||||
install $src $out/share/emacs/site-lisp/control-lock.el
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Like caps-lock, but for your control key. Give your pinky a rest!";
|
||||
homepage = "https://www.emacswiki.org/emacs/control-lock.el";
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
{ lib, trivialBuild, fetchurl }:
|
||||
|
||||
trivialBuild rec {
|
||||
pname = "ebuild-mode";
|
||||
version = "1.55";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://dev.gentoo.org/~ulm/emacs/${pname}-${version}.tar.xz";
|
||||
sha256 = "1bs2s5g79vrbk8544lvp388cdbig0s121kwk0h10hif4kp56ka9w";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Major modes for Gentoo package files";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ qyliss ];
|
||||
};
|
||||
}
|
||||
5314
pkgs/applications/editors/emacs/elisp-packages/elpa-generated.nix
Normal file
5314
pkgs/applications/editors/emacs/elisp-packages/elpa-generated.nix
Normal file
File diff suppressed because it is too large
Load diff
128
pkgs/applications/editors/emacs/elisp-packages/elpa-packages.nix
Normal file
128
pkgs/applications/editors/emacs/elisp-packages/elpa-packages.nix
Normal file
|
|
@ -0,0 +1,128 @@
|
|||
/*
|
||||
|
||||
# Updating
|
||||
|
||||
To update the list of packages from ELPA,
|
||||
|
||||
1. Run `./update-elpa`.
|
||||
2. Check for evaluation errors:
|
||||
# "../../../../../" points to the default.nix from root of Nixpkgs tree
|
||||
env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate ../../../../../ -A emacs.pkgs.elpaPackages
|
||||
3. Run `git commit -m "elpa-packages $(date -Idate)" -- elpa-generated.nix`
|
||||
|
||||
## Update from overlay
|
||||
|
||||
Alternatively, run the following command:
|
||||
|
||||
./update-from-overlay
|
||||
|
||||
It will update both melpa and elpa packages using
|
||||
https://github.com/nix-community/emacs-overlay. It's almost instantenous and
|
||||
formats commits for you.
|
||||
|
||||
*/
|
||||
|
||||
{ lib, stdenv, texinfo, writeText, gcc, pkgs, buildPackages }:
|
||||
|
||||
self: let
|
||||
|
||||
markBroken = pkg: pkg.override {
|
||||
elpaBuild = args: self.elpaBuild (args // {
|
||||
meta = (args.meta or {}) // { broken = true; };
|
||||
});
|
||||
};
|
||||
|
||||
elpaBuild = import ../../../../build-support/emacs/elpa.nix {
|
||||
inherit lib stdenv texinfo writeText gcc;
|
||||
inherit (self) emacs;
|
||||
};
|
||||
|
||||
# Use custom elpa url fetcher with fallback/uncompress
|
||||
fetchurl = buildPackages.callPackage ./fetchelpa.nix { };
|
||||
|
||||
generateElpa = lib.makeOverridable ({
|
||||
generated ? ./elpa-generated.nix
|
||||
}: let
|
||||
|
||||
imported = import generated {
|
||||
callPackage = pkgs: args: self.callPackage pkgs (args // {
|
||||
inherit fetchurl;
|
||||
});
|
||||
};
|
||||
|
||||
super = removeAttrs imported [ "dash" ];
|
||||
|
||||
overrides = {
|
||||
# upstream issue: Wrong type argument: arrayp, nil
|
||||
org-transclusion =
|
||||
if super.org-transclusion.version == "1.2.0"
|
||||
then markBroken super.org-transclusion
|
||||
else super.org-transclusion;
|
||||
rcirc-menu = markBroken super.rcirc-menu; # Missing file header
|
||||
cl-lib = null; # builtin
|
||||
tle = null; # builtin
|
||||
advice = null; # builtin
|
||||
seq = if lib.versionAtLeast self.emacs.version "27"
|
||||
then null
|
||||
else super.seq;
|
||||
project = if lib.versionAtLeast self.emacs.version "28"
|
||||
then null
|
||||
else super.project;
|
||||
# Compilation instructions for the Ada executables:
|
||||
# https://www.nongnu.org/ada-mode/ada-mode.html#Ada-executables
|
||||
ada-mode = super.ada-mode.overrideAttrs (old: {
|
||||
# actually unpack source of ada-mode and wisi
|
||||
# which are both needed to compile the tools
|
||||
# we need at runtime
|
||||
dontUnpack = false;
|
||||
srcs = [
|
||||
super.ada-mode.src
|
||||
self.wisi.src
|
||||
];
|
||||
|
||||
sourceRoot = "ada-mode-${self.ada-mode.version}";
|
||||
|
||||
nativeBuildInputs = [
|
||||
buildPackages.gnat
|
||||
buildPackages.gprbuild
|
||||
buildPackages.lzip
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
pkgs.gnatcoll-xref
|
||||
];
|
||||
|
||||
preInstall = ''
|
||||
./build.sh -j$NIX_BUILD_CORES
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
./install.sh --prefix=$out
|
||||
'';
|
||||
|
||||
meta = old.meta // {
|
||||
maintainers = [ lib.maintainers.sternenseemann ];
|
||||
};
|
||||
});
|
||||
|
||||
plz = super.plz.overrideAttrs (
|
||||
old: {
|
||||
dontUnpack = false;
|
||||
postPatch = old.postPatch or "" + ''
|
||||
substituteInPlace ./plz.el \
|
||||
--replace 'plz-curl-program "curl"' 'plz-curl-program "${pkgs.curl}/bin/curl"'
|
||||
'';
|
||||
preInstall = ''
|
||||
tar -cf "$pname-$version.tar" --transform "s,^,$pname-$version/," * .[!.]*
|
||||
src="$pname-$version.tar"
|
||||
'';
|
||||
}
|
||||
);
|
||||
|
||||
};
|
||||
|
||||
elpaPackages = super // overrides;
|
||||
|
||||
in elpaPackages // { inherit elpaBuild; });
|
||||
|
||||
in generateElpa { }
|
||||
24
pkgs/applications/editors/emacs/elisp-packages/emacs2nix.nix
Normal file
24
pkgs/applications/editors/emacs/elisp-packages/emacs2nix.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
let
|
||||
pkgs = import ../../../../.. { };
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "nix-community";
|
||||
repo = "emacs2nix";
|
||||
rev = "2e8d2c644397be57455ad32c2849f692eeac7797";
|
||||
sha256 = "sha256-qnOYDYHAQ+r5eegKP9GqHz5R2ig96B2W7M+uYa1ti9M=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
in
|
||||
pkgs.mkShell {
|
||||
|
||||
packages = [
|
||||
pkgs.bash
|
||||
];
|
||||
|
||||
EMACS2NIX = src;
|
||||
|
||||
shellHook = ''
|
||||
export PATH=$PATH:${src}
|
||||
'';
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, makeWrapper
|
||||
, emacs
|
||||
, tcl
|
||||
, tclx
|
||||
, espeak-ng
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "emacspeak";
|
||||
version = "54.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tvraman";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
hash= "sha256-aOZ8PmkASJKETPhXhE9WQXyJS7SPe+d97fK/piqqzqc=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
emacs
|
||||
makeWrapper
|
||||
];
|
||||
buildInputs = [
|
||||
espeak-ng
|
||||
tcl
|
||||
tclx
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
make config
|
||||
'';
|
||||
|
||||
postBuild = ''
|
||||
make -C servers/native-espeak PREFIX=$out "TCL_INCLUDE=${tcl}/include"
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
make -C servers/native-espeak PREFIX=$out install
|
||||
local d=$out/share/emacs/site-lisp/emacspeak/
|
||||
install -d -- "$d"
|
||||
cp -a . "$d"
|
||||
find "$d" \( -type d -or \( -type f -executable \) \) -execdir chmod 755 {} +
|
||||
find "$d" -type f -not -executable -execdir chmod 644 {} +
|
||||
makeWrapper ${emacs}/bin/emacs $out/bin/emacspeak \
|
||||
--set DTK_PROGRAM "${placeholder "out"}/share/emacs/site-lisp/emacspeak/servers/espeak" \
|
||||
--set TCLLIBPATH "${tclx}/lib" \
|
||||
--add-flags '-l "${placeholder "out"}/share/emacs/site-lisp/emacspeak/lisp/emacspeak-setup.elc"'
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/tvraman/emacspeak/";
|
||||
description = "Emacs extension that provides spoken output";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = [ maintainers.AndersonTorres ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
{ trivialBuild
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, curl
|
||||
, plz
|
||||
, cl-lib
|
||||
, ts
|
||||
, magit-section
|
||||
, taxy-magit-section
|
||||
, taxy
|
||||
, svg-lib
|
||||
}:
|
||||
|
||||
trivialBuild {
|
||||
pname = "ement";
|
||||
version = "unstable-2022-05-14";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "alphapapa";
|
||||
repo = "ement.el";
|
||||
rev = "961d650377f9e7440e47c36c0386e899f5b2d86b";
|
||||
sha256 = "sha256-4KTSPgso7UvzCRKNFI3YaPR1t4DUwggO4KtBYLm0W4Y=";
|
||||
};
|
||||
|
||||
packageRequires = [
|
||||
plz
|
||||
cl-lib
|
||||
ts
|
||||
magit-section
|
||||
taxy-magit-section
|
||||
taxy
|
||||
svg-lib
|
||||
];
|
||||
|
||||
patches = [
|
||||
./handle-nil-images.patch
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Ement.el is a Matrix client for Emacs";
|
||||
license = lib.licenses.gpl3Only;
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
diff --git a/ement-lib.el b/ement-lib.el
|
||||
index f0b2738..025a191 100644
|
||||
--- a/ement-lib.el
|
||||
+++ b/ement-lib.el
|
||||
@@ -644,14 +644,15 @@ can cause undesirable underlining."
|
||||
"Return a copy of IMAGE set to MAX-WIDTH and MAX-HEIGHT.
|
||||
IMAGE should be one as created by, e.g. `create-image'."
|
||||
;; It would be nice if the image library had some simple functions to do this sort of thing.
|
||||
- (let ((new-image (cl-copy-list image)))
|
||||
- (when (fboundp 'imagemagick-types)
|
||||
- ;; Only do this when ImageMagick is supported.
|
||||
- ;; FIXME: When requiring Emacs 27+, remove this (I guess?).
|
||||
- (setf (image-property new-image :type) 'imagemagick))
|
||||
- (setf (image-property new-image :max-width) max-width
|
||||
- (image-property new-image :max-height) max-height)
|
||||
- new-image))
|
||||
+ (when image
|
||||
+ (let ((new-image (cl-copy-list image)))
|
||||
+ (when (fboundp 'imagemagick-types)
|
||||
+ ;; Only do this when ImageMagick is supported.
|
||||
+ ;; FIXME: When requiring Emacs 27+, remove this (I guess?).
|
||||
+ (setf (image-property new-image :type) 'imagemagick))
|
||||
+ (setf (image-property new-image :max-width) max-width
|
||||
+ (image-property new-image :max-height) max-height)
|
||||
+ new-image)))
|
||||
|
||||
(defun ement--room-alias (room)
|
||||
"Return latest m.room.canonical_alias event in ROOM."
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
{ lib
|
||||
, trivialBuild
|
||||
, fetchFromGitHub
|
||||
, emacs
|
||||
, popup
|
||||
, ess
|
||||
}:
|
||||
|
||||
trivialBuild rec {
|
||||
pname = "ess-R-object-popup";
|
||||
version = "1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "myuhe";
|
||||
repo = "ess-R-object-popup.el";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-YN8ZLXEbwTFdFfovkV2IXV9v6y/PTgCdiRQqbpRaF2E=";
|
||||
};
|
||||
|
||||
packageRequires = [
|
||||
popup
|
||||
ess
|
||||
];
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/myuhe/ess-R-object-popup.el";
|
||||
description = "Popup descriptions of R objects";
|
||||
inherit (emacs.meta) platforms;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
{ lib
|
||||
, trivialBuild
|
||||
, fetchFromGitHub
|
||||
, emacs
|
||||
}:
|
||||
|
||||
trivialBuild rec {
|
||||
pname = "evil-markdown";
|
||||
version = "0.pre+unstable=2021-07-21";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Somelauw";
|
||||
repo = "evil-markdown";
|
||||
rev = "8e6cc68af83914b2fa9fd3a3b8472573dbcef477";
|
||||
hash = "sha256-HBBuZ1VWIn6kwK5CtGIvHM1+9eiNiKPH0GUsyvpUVN8=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
emacs
|
||||
] ++ propagatedUserEnvPkgs;
|
||||
|
||||
propagatedUserEnvPkgs = with emacs.pkgs; [
|
||||
evil
|
||||
markdown-mode
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/Somelauw/evil-markdown";
|
||||
description = "Integrates Emacs evil and markdown";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ leungbk ];
|
||||
inherit (emacs.meta) platforms;
|
||||
};
|
||||
}
|
||||
21
pkgs/applications/editors/emacs/elisp-packages/fetchelpa.nix
Normal file
21
pkgs/applications/editors/emacs/elisp-packages/fetchelpa.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# Elpa only serves the latest version of a given package uncompressed.
|
||||
# Once that release is no longer the latest & greatest it gets archived and compressed
|
||||
# meaning that both the URL and the hash changes.
|
||||
#
|
||||
# To work around this issue we fall back to the URL with the .lz suffix and if that's the
|
||||
# one we downloaded we uncompress the file to ensure the hash matches regardless of compression.
|
||||
|
||||
{ fetchurl, lzip }:
|
||||
|
||||
{ url, ... }@args: fetchurl ((removeAttrs args [ "url" ]) // {
|
||||
urls = [
|
||||
url
|
||||
(url + ".lz")
|
||||
];
|
||||
postFetch = ''
|
||||
if [[ $url == *.lz ]]; then
|
||||
${lzip}/bin/lzip -c -d $out > uncompressed
|
||||
mv uncompressed $out
|
||||
fi
|
||||
'';
|
||||
})
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
{ lib
|
||||
, fetchFromGitHub
|
||||
, trivialBuild
|
||||
}:
|
||||
|
||||
trivialBuild {
|
||||
pname = "font-lock-plus";
|
||||
version = "208+unstable=2018-01-01";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "emacsmirror";
|
||||
repo = "font-lock-plus";
|
||||
rev = "f2c1ddcd4c9d581bd32be88fad026b49f98b6541";
|
||||
hash = "sha256-lFmdVMXIIXZ9ZohAJw5rhxpTv017qIyzmpuKOWDdeJ4=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/emacsmirror/font-lock-plus";
|
||||
description = "Enhancements to standard library font-lock.el";
|
||||
license = licenses.gpl2Plus;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, emacs
|
||||
, trivialBuild
|
||||
}:
|
||||
|
||||
trivialBuild {
|
||||
pname = "git-undo";
|
||||
version = "0.pre+unstable=2019-12-21";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jwiegley";
|
||||
repo = "git-undo-el";
|
||||
rev = "cf31e38e7889e6ade7d2d2b9f8719fd44f52feb5";
|
||||
sha256 = "sha256-cVkK9EF6qQyVV3uVqnBEjF8e9nEx/8ixnM8PvxqCyYE=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/jwiegley/git-undo-el";
|
||||
description = "Revert region to most recent Git-historical version";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ leungbk ];
|
||||
inherit (emacs.meta) platforms;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
{ trivialBuild
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
trivialBuild {
|
||||
pname = "header-file-mode";
|
||||
version = "unstable-2022-05-25";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aidalgol";
|
||||
repo = "header-file-mode";
|
||||
rev = "cf6ce33b436ae9631aece1cd30a459cb0f89d1cd";
|
||||
sha256 = "sha256-+TDJubmBc0Hl+2ms58rnOf3hTaQE3ayrIpGWl4j39GQ=";
|
||||
};
|
||||
|
||||
postUnpack = ''
|
||||
sourceRoot="$sourceRoot/lisp"
|
||||
'';
|
||||
|
||||
postBuild = ''
|
||||
emacs -L . --batch -l package --eval '(package-generate-autoloads "header-file" ".")'
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = ''
|
||||
A major mode that, when associated with the .h file extension, will put
|
||||
those file into the major mode of their corresponding implementation file.
|
||||
'';
|
||||
license = lib.licenses.gpl3Plus;
|
||||
platforms = lib.platforms.all;
|
||||
maintainers = with lib.maintainers; [ aidalgol ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
{ lib
|
||||
, trivialBuild
|
||||
, fetchFromGitHub
|
||||
, dictionary
|
||||
, emacs
|
||||
, helm
|
||||
}:
|
||||
|
||||
trivialBuild rec {
|
||||
pname = "helm-words";
|
||||
version = "0.pre+unstable=2019-03-12";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "emacsmirror";
|
||||
repo = pname;
|
||||
rev = "e6387ece1940a06695b9d910de3d90252efb8d29";
|
||||
hash = "sha256-rh8YKDLZZCUE6JnnRnFyDDyUjK+35+M2dkawR/+qwNM=";
|
||||
};
|
||||
|
||||
packageRequires = [ helm dictionary ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/emacsmirror/helm-words";
|
||||
description = "Helm extension for looking up words in dictionaries and thesauri";
|
||||
license = licenses.gpl3Plus;
|
||||
inherit (emacs.meta) platforms;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
{ lib, stdenv, fetchurl, emacs }:
|
||||
|
||||
# this package installs the emacs-mode which
|
||||
# resides in the hsc3 sources.
|
||||
|
||||
let version = "0.15";
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
pname = "hsc3-mode";
|
||||
inherit version;
|
||||
src = fetchurl {
|
||||
url = "mirror://hackage/hsc3-0.15/hsc3-0.15.tar.gz";
|
||||
sha256 = "2f3b15655419cf8ebe25ab1c6ec22993b2589b4ffca7c3a75ce478ca78a0bde6";
|
||||
};
|
||||
|
||||
buildInputs = [ emacs ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out/share/emacs/site-lisp"
|
||||
cp "emacs/hsc3.el" "$out/share/emacs/site-lisp"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "http://rd.slavepianos.org/?t=hsc3";
|
||||
description = "hsc3 mode package for Emacs";
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
{ lib
|
||||
, trivialBuild
|
||||
, fetchFromGitHub
|
||||
, emacs
|
||||
}:
|
||||
|
||||
trivialBuild {
|
||||
pname = "isearch-plus";
|
||||
version = "3434+unstable=2021-08-23";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "emacsmirror";
|
||||
repo = "isearch-plus";
|
||||
rev = "93088ea0ac4d51bdb76c4c32ea53172f6c435852";
|
||||
hash = "sha256-kD+Fyps3fc5YK6ATU1nrkKHazGMYJnU2gRcpQZf6A1E=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.emacswiki.org/emacs/IsearchPlus";
|
||||
description = "Extensions to isearch";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ leungbk AndersonTorres ];
|
||||
inherit (emacs.meta) platforms;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, trivialBuild
|
||||
, emacs
|
||||
}:
|
||||
|
||||
trivialBuild {
|
||||
pname = "isearch-prop";
|
||||
version = "0.pre+unstable=2019-05-01";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "emacsmirror";
|
||||
repo = "isearch-prop";
|
||||
rev = "4a2765f835dd115d472142da05215c4c748809f4";
|
||||
hash = "sha256-A1Kt4nm7iRV9J5yaLupwiNL5g7ddZvQs79dggmqZ7Rk=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.emacswiki.org/emacs/IsearchPlus";
|
||||
description = "Search text- or overlay-property contexts";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ leungbk ];
|
||||
inherit (emacs.meta) platforms;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
{ lib
|
||||
, trivialBuild
|
||||
, fetchurl
|
||||
}:
|
||||
|
||||
trivialBuild rec {
|
||||
pname = "jam-mode";
|
||||
version = "0.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://dev.gentoo.org/~ulm/distfiles/${pname}-${version}.el.xz";
|
||||
hash = "sha256-0IlYqbPa4AAwOpjdd20k8hqtvDhZmcz1WHa/LHx8kMk=";
|
||||
};
|
||||
|
||||
unpackPhase = ''
|
||||
runHook preUnpack
|
||||
|
||||
xz -cd $src > jam-mode.el
|
||||
|
||||
runHook postUnpack
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "An Emacs major mode for editing Jam files";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ qyliss ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
lib: self:
|
||||
|
||||
let
|
||||
|
||||
fetcherGenerators = { repo ? null
|
||||
, url ? null
|
||||
, ... }:
|
||||
{ sha256
|
||||
, commit
|
||||
, ...}: {
|
||||
github = self.callPackage ({ fetchFromGitHub }:
|
||||
fetchFromGitHub {
|
||||
owner = lib.head (lib.splitString "/" repo);
|
||||
repo = lib.head (lib.tail (lib.splitString "/" repo));
|
||||
rev = commit;
|
||||
inherit sha256;
|
||||
}
|
||||
) {};
|
||||
gitlab = self.callPackage ({ fetchFromGitLab }:
|
||||
fetchFromGitLab {
|
||||
owner = lib.head (lib.splitString "/" repo);
|
||||
repo = lib.head (lib.tail (lib.splitString "/" repo));
|
||||
rev = commit;
|
||||
inherit sha256;
|
||||
}
|
||||
) {};
|
||||
git = self.callPackage ({ fetchgit }:
|
||||
(fetchgit {
|
||||
rev = commit;
|
||||
inherit sha256 url;
|
||||
}).overrideAttrs(_: {
|
||||
GIT_SSL_NO_VERIFY = true;
|
||||
})
|
||||
) {};
|
||||
bitbucket = self.callPackage ({ fetchhg }:
|
||||
fetchhg {
|
||||
rev = commit;
|
||||
url = "https://bitbucket.com/${repo}";
|
||||
inherit sha256;
|
||||
}
|
||||
) {};
|
||||
hg = self.callPackage ({ fetchhg }:
|
||||
fetchhg {
|
||||
rev = commit;
|
||||
inherit sha256 url;
|
||||
}
|
||||
) {};
|
||||
};
|
||||
|
||||
in {
|
||||
|
||||
melpaDerivation = variant:
|
||||
{ ename, fetcher
|
||||
, commit ? null
|
||||
, sha256 ? null
|
||||
, ... }@args:
|
||||
let
|
||||
sourceArgs = args.${variant};
|
||||
version = sourceArgs.version or null;
|
||||
deps = sourceArgs.deps or null;
|
||||
error = sourceArgs.error or args.error or null;
|
||||
hasSource = lib.hasAttr variant args;
|
||||
pname = builtins.replaceStrings [ "@" ] [ "at" ] ename;
|
||||
broken = ! isNull error;
|
||||
in
|
||||
if hasSource then
|
||||
lib.nameValuePair ename (
|
||||
self.callPackage ({ melpaBuild, fetchurl, ... }@pkgargs:
|
||||
melpaBuild {
|
||||
inherit pname ename commit;
|
||||
version = if isNull version then "" else
|
||||
lib.concatStringsSep "." (map toString
|
||||
# Hack: Melpa archives contains versions with parse errors such as [ 4 4 -4 413 ] which should be 4.4-413
|
||||
# This filter method is still technically wrong, but it's computationally cheap enough and tapers over the issue
|
||||
(builtins.filter (n: n >= 0) version));
|
||||
# TODO: Broken should not result in src being null (hack to avoid eval errors)
|
||||
src = if (isNull sha256 || broken) then null else
|
||||
lib.getAttr fetcher (fetcherGenerators args sourceArgs);
|
||||
recipe = if isNull commit then null else
|
||||
fetchurl {
|
||||
name = pname + "-recipe";
|
||||
url = "https://raw.githubusercontent.com/melpa/melpa/${commit}/recipes/${ename}";
|
||||
inherit sha256;
|
||||
};
|
||||
packageRequires = lib.optionals (! isNull deps)
|
||||
(map (dep: pkgargs.${dep} or self.${dep} or null)
|
||||
deps);
|
||||
meta = (sourceArgs.meta or {}) // {
|
||||
inherit broken;
|
||||
};
|
||||
}
|
||||
) {}
|
||||
)
|
||||
else
|
||||
null;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
{ trivialBuild
|
||||
, llvmPackages
|
||||
}:
|
||||
|
||||
trivialBuild {
|
||||
pname = "llvm-mode";
|
||||
inherit (llvmPackages.llvm) src version;
|
||||
|
||||
postUnpack = ''
|
||||
sourceRoot="$sourceRoot/utils/emacs"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
inherit (llvmPackages.llvm.meta) homepage license;
|
||||
description = "Major mode for the LLVM assembler language";
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,254 @@
|
|||
{ lib, pkgs }: self: with self; with lib.licenses; {
|
||||
|
||||
elisp-ffi = let
|
||||
rev = "da37c516a0e59bdce63fb2dc006a231dee62a1d9";
|
||||
in melpaBuild {
|
||||
pname = "elisp-ffi";
|
||||
version = "20170518.0";
|
||||
|
||||
commit = rev;
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "skeeto";
|
||||
repo = "elisp-ffi";
|
||||
inherit rev;
|
||||
sha256 = "sha256-StOezQEnNTjRmjY02ub5FRh59aL6gWfw+qgboz0wF94=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgs.pkg-config ];
|
||||
|
||||
buildInputs = [ pkgs.libffi ];
|
||||
|
||||
preBuild = ''
|
||||
mv ffi.el elisp-ffi.el
|
||||
make
|
||||
'';
|
||||
|
||||
recipe = pkgs.writeText "recipe" ''
|
||||
(elisp-ffi
|
||||
:repo "skeeto/elisp-ffi"
|
||||
:fetcher github)
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Emacs Lisp Foreign Function Interface";
|
||||
longDescription = ''
|
||||
This library provides an FFI for Emacs Lisp so that Emacs
|
||||
programs can invoke functions in native libraries. It works by
|
||||
driving a subprocess to do the heavy lifting, passing result
|
||||
values on to Emacs.
|
||||
'';
|
||||
license = publicDomain;
|
||||
};
|
||||
};
|
||||
|
||||
ghc-mod = melpaBuild {
|
||||
pname = "ghc";
|
||||
version = pkgs.haskellPackages.ghc-mod.version;
|
||||
|
||||
src = pkgs.haskellPackages.ghc-mod.src;
|
||||
|
||||
packageRequires = [ haskell-mode ];
|
||||
|
||||
propagatedUserEnvPkgs = [ pkgs.haskellPackages.ghc-mod ];
|
||||
|
||||
recipe = pkgs.writeText "recipe" ''
|
||||
(ghc-mod :repo "DanielG/ghc-mod" :fetcher github :files ("elisp/*.el"))
|
||||
'';
|
||||
|
||||
fileSpecs = [ "elisp/*.el" ];
|
||||
|
||||
meta = {
|
||||
description = "An extension of haskell-mode that provides completion of symbols and documentation browsing";
|
||||
license = bsd3;
|
||||
};
|
||||
};
|
||||
|
||||
haskell-unicode-input-method = let
|
||||
rev = "d8d168148c187ed19350bb7a1a190217c2915a63";
|
||||
in melpaBuild {
|
||||
pname = "haskell-unicode-input-method";
|
||||
version = "20110905.2307";
|
||||
|
||||
commit = rev;
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "roelvandijk";
|
||||
repo = "emacs-haskell-unicode-input-method";
|
||||
inherit rev;
|
||||
sha256 = "09b7bg2s9aa4s8f2kdqs4xps3jxkq5wsvbi87ih8b6id38blhf78";
|
||||
};
|
||||
|
||||
recipe = pkgs.writeText "recipe" ''
|
||||
(haskell-unicode-input-method
|
||||
:repo "roelvandijk/emacs-haskell-unicode-input-method"
|
||||
:fetcher github)
|
||||
'';
|
||||
|
||||
packageRequires = [];
|
||||
|
||||
meta = {
|
||||
homepage = "https://melpa.org/#haskell-unicode-input-method/";
|
||||
license = lib.licenses.free;
|
||||
};
|
||||
};
|
||||
|
||||
matrix-client = let
|
||||
rev = "d2ac55293c96d4c95971ed8e2a3f6f354565c5ed";
|
||||
in melpaBuild
|
||||
{
|
||||
pname = "matrix-client";
|
||||
version = "0.3.0";
|
||||
|
||||
commit = rev;
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "alphapapa";
|
||||
repo = "matrix-client.el";
|
||||
inherit rev;
|
||||
sha256 = "1scfv1502yg7x4bsl253cpr6plml1j4d437vci2ggs764sh3rcqq";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fix: avatar loading when imagemagick support is not available
|
||||
(pkgs.fetchpatch {
|
||||
url = "https://github.com/alphapapa/matrix-client.el/commit/5f49e615c7cf2872f48882d3ee5c4a2bff117d07.patch";
|
||||
sha256 = "07bvid7s1nv1377p5n61q46yww3m1w6bw4vnd4iyayw3fby1lxbm";
|
||||
})
|
||||
];
|
||||
|
||||
packageRequires = [
|
||||
anaphora
|
||||
cl-lib
|
||||
self.map
|
||||
dash-functional
|
||||
esxml
|
||||
f
|
||||
ov
|
||||
tracking
|
||||
rainbow-identifiers
|
||||
dash
|
||||
s
|
||||
request
|
||||
frame-purpose
|
||||
a
|
||||
ht
|
||||
];
|
||||
|
||||
recipe = pkgs.writeText "recipe" ''
|
||||
(matrix-client
|
||||
:repo "alphapapa/matrix-client.el"
|
||||
:fetcher github)
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "A chat client and API wrapper for Matrix.org";
|
||||
license = gpl3Plus;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
agda2-mode = callPackage ./agda2-mode { };
|
||||
|
||||
agda-input = callPackage ./agda-input{ };
|
||||
|
||||
bqn-mode = callPackage ./bqn-mode { };
|
||||
|
||||
llvm-mode = callPackage ./llvm-mode { };
|
||||
|
||||
ott-mode = callPackage ./ott-mode { };
|
||||
|
||||
urweb-mode = callPackage ./urweb-mode { };
|
||||
|
||||
# Packages made the classical callPackage way
|
||||
|
||||
apheleia = callPackage ./apheleia { };
|
||||
|
||||
ebuild-mode = callPackage ./ebuild-mode { };
|
||||
|
||||
evil-markdown = callPackage ./evil-markdown { };
|
||||
|
||||
emacspeak = callPackage ./emacspeak { };
|
||||
|
||||
ement = callPackage ./ement { };
|
||||
|
||||
ess-R-object-popup = callPackage ./ess-R-object-popup { };
|
||||
|
||||
font-lock-plus = callPackage ./font-lock-plus { };
|
||||
|
||||
git-undo = callPackage ./git-undo { };
|
||||
|
||||
header-file-mode = callPackage ./header-file-mode { };
|
||||
|
||||
helm-words = callPackage ./helm-words { };
|
||||
|
||||
isearch-plus = callPackage ./isearch-plus { };
|
||||
|
||||
isearch-prop = callPackage ./isearch-prop { };
|
||||
|
||||
jam-mode = callPackage ./jam-mode { };
|
||||
|
||||
nano-theme = callPackage ./nano-theme { };
|
||||
|
||||
perl-completion = callPackage ./perl-completion { };
|
||||
|
||||
control-lock = callPackage ./control-lock { };
|
||||
|
||||
pod-mode = callPackage ./pod-mode { };
|
||||
|
||||
power-mode = callPackage ./power-mode { };
|
||||
|
||||
prisma-mode = let
|
||||
rev = "5283ca7403bcb21ca0cac8ecb063600752dfd9d4";
|
||||
in melpaBuild {
|
||||
pname = "prisma-mode";
|
||||
version = "20211207.0";
|
||||
|
||||
commit = rev;
|
||||
|
||||
packageRequires = [ js2-mode ];
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "pimeys";
|
||||
repo = "emacs-prisma-mode";
|
||||
inherit rev;
|
||||
sha256 = "sha256-DJJfjbu27Gi7Nzsa1cdi8nIQowKH8ZxgQBwfXLB0Q/I=";
|
||||
};
|
||||
|
||||
recipe = pkgs.writeText "recipe" ''
|
||||
(prisma-mode
|
||||
:repo "pimeys/emacs-prisma-mode"
|
||||
:fetcher github)
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Major mode for Prisma Schema Language";
|
||||
license = gpl2Only;
|
||||
};
|
||||
};
|
||||
|
||||
structured-haskell-mode = self.shm;
|
||||
|
||||
sv-kalender = callPackage ./sv-kalender { };
|
||||
|
||||
tree-sitter-langs = callPackage ./tree-sitter-langs { final = self; };
|
||||
tsc = callPackage ./tsc { };
|
||||
|
||||
youtube-dl = callPackage ./youtube-dl { };
|
||||
|
||||
# From old emacsPackages (pre emacsPackagesNg)
|
||||
cedille = callPackage ./cedille { cedille = pkgs.cedille; };
|
||||
color-theme-solarized = callPackage ./color-theme-solarized { };
|
||||
session-management-for-emacs = callPackage ./session-management-for-emacs { };
|
||||
hsc3-mode = callPackage ./hsc3 { };
|
||||
prolog-mode = callPackage ./prolog { };
|
||||
rect-mark = callPackage ./rect-mark { };
|
||||
sunrise-commander = callPackage ./sunrise-commander { };
|
||||
|
||||
# camelCase aliases for some of the kebab-case expressions above
|
||||
colorThemeSolarized = color-theme-solarized;
|
||||
emacsSessionManagement = session-management-for-emacs;
|
||||
rectMark = rect-mark;
|
||||
sunriseCommander = sunrise-commander;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,568 @@
|
|||
/*
|
||||
|
||||
# Updating
|
||||
|
||||
To update the list of packages from MELPA,
|
||||
|
||||
1. Run `./update-melpa`
|
||||
2. Check for evaluation errors:
|
||||
# "../../../../../" points to the default.nix from root of Nixpkgs tree
|
||||
env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../../ -A emacs.pkgs.melpaStablePackages
|
||||
env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../../ -A emacs.pkgs.melpaPackages
|
||||
3. Run `git commit -m "melpa-packages $(date -Idate)" recipes-archive-melpa.json`
|
||||
|
||||
## Update from overlay
|
||||
|
||||
Alternatively, run the following command:
|
||||
|
||||
./update-from-overlay
|
||||
|
||||
It will update both melpa and elpa packages using
|
||||
https://github.com/nix-community/emacs-overlay. It's almost instantenous and
|
||||
formats commits for you.
|
||||
|
||||
*/
|
||||
|
||||
{ lib, pkgs }: variant: self:
|
||||
let
|
||||
dontConfigure = pkg:
|
||||
if pkg != null then pkg.override (args: {
|
||||
melpaBuild = drv: args.melpaBuild (drv // {
|
||||
dontConfigure = true;
|
||||
});
|
||||
}) else null;
|
||||
|
||||
markBroken = pkg:
|
||||
if pkg != null then pkg.override (args: {
|
||||
melpaBuild = drv: args.melpaBuild (drv // {
|
||||
meta = (drv.meta or { }) // { broken = true; };
|
||||
});
|
||||
}) else null;
|
||||
|
||||
externalSrc = pkg: epkg:
|
||||
if pkg != null then pkg.override (args: {
|
||||
melpaBuild = drv: args.melpaBuild (drv // {
|
||||
inherit (epkg) src version;
|
||||
|
||||
propagatedUserEnvPkgs = [ epkg ];
|
||||
});
|
||||
}) else null;
|
||||
|
||||
buildWithGit = pkg: pkg.overrideAttrs (attrs: {
|
||||
nativeBuildInputs =
|
||||
(attrs.nativeBuildInputs or [ ]) ++ [ pkgs.git ];
|
||||
});
|
||||
|
||||
fix-rtags = pkg:
|
||||
if pkg != null then dontConfigure (externalSrc pkg pkgs.rtags)
|
||||
else null;
|
||||
|
||||
generateMelpa = lib.makeOverridable ({ archiveJson ? ./recipes-archive-melpa.json
|
||||
}:
|
||||
let
|
||||
inherit (import ./libgenerated.nix lib self) melpaDerivation;
|
||||
super = (
|
||||
lib.listToAttrs (builtins.filter
|
||||
(s: s != null)
|
||||
(map
|
||||
(melpaDerivation variant)
|
||||
(lib.importJSON archiveJson)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
overrides = lib.optionalAttrs (variant == "stable") {
|
||||
|
||||
# upstream issue: missing file header
|
||||
abridge-diff =
|
||||
if super.abridge-diff.version == "0.1"
|
||||
then markBroken super.abridge-diff
|
||||
else super.abridge-diff;
|
||||
|
||||
# upstream issue: missing file header
|
||||
bufshow = markBroken super.bufshow;
|
||||
|
||||
# upstream issue: missing file header
|
||||
speech-tagger = markBroken super.speech-tagger;
|
||||
|
||||
# upstream issue: missing file header
|
||||
textmate = markBroken super.textmate;
|
||||
|
||||
# upstream issue: missing file header
|
||||
window-numbering = markBroken super.window-numbering;
|
||||
|
||||
# upstream issue: missing file header
|
||||
voca-builder = markBroken super.voca-builder;
|
||||
|
||||
# upstream issue: missing file header
|
||||
initsplit = markBroken super.initsplit;
|
||||
|
||||
# upstream issue: missing file header
|
||||
jsfmt = markBroken super.jsfmt;
|
||||
|
||||
# upstream issue: missing file header
|
||||
maxframe = markBroken super.maxframe;
|
||||
|
||||
# upstream issue: missing file header
|
||||
connection = markBroken super.connection;
|
||||
|
||||
# upstream issue: missing file header
|
||||
dictionary = markBroken super.dictionary;
|
||||
|
||||
# upstream issue: missing file header
|
||||
fold-dwim =
|
||||
if super.fold-dwim.version == "1.2"
|
||||
then markBroken super.fold-dwim
|
||||
else super.fold-dwim;
|
||||
|
||||
# upstream issue: missing file header
|
||||
gl-conf-mode =
|
||||
if super.gl-conf-mode.version == "0.3"
|
||||
then markBroken super.gl-conf-mode
|
||||
else super.gl-conf-mode;
|
||||
|
||||
# upstream issue: missing file header
|
||||
ligo-mode =
|
||||
if super.ligo-mode.version == "0.3"
|
||||
then markBroken super.ligo-mode
|
||||
else super.ligo-mode;
|
||||
|
||||
# upstream issue: missing file header
|
||||
link = markBroken super.link;
|
||||
|
||||
# upstream issue: missing file header
|
||||
org-dp =
|
||||
if super.org-dp.version == "1"
|
||||
then markBroken super.org-dp
|
||||
else super.org-dp;
|
||||
|
||||
# upstream issue: missing file header
|
||||
revbufs =
|
||||
if super.revbufs.version == "1.2"
|
||||
then markBroken super.revbufs
|
||||
else super.revbufs;
|
||||
|
||||
# upstream issue: missing file header
|
||||
elmine = markBroken super.elmine;
|
||||
|
||||
# upstream issue: missing file header
|
||||
ido-complete-space-or-hyphen = markBroken super.ido-complete-space-or-hyphen;
|
||||
|
||||
} // {
|
||||
# Expects bash to be at /bin/bash
|
||||
ac-rtags = fix-rtags super.ac-rtags;
|
||||
|
||||
airline-themes = super.airline-themes.override {
|
||||
inherit (self.melpaPackages) powerline;
|
||||
};
|
||||
|
||||
auto-complete-clang-async = super.auto-complete-clang-async.overrideAttrs (old: {
|
||||
buildInputs = old.buildInputs ++ [ pkgs.llvmPackages.llvm ];
|
||||
CFLAGS = "-I${pkgs.llvmPackages.libclang.lib}/include";
|
||||
LDFLAGS = "-L${pkgs.llvmPackages.libclang.lib}/lib";
|
||||
});
|
||||
|
||||
# part of a larger package
|
||||
caml = dontConfigure super.caml;
|
||||
|
||||
# part of a larger package
|
||||
# upstream issue: missing package version
|
||||
cmake-mode = dontConfigure super.cmake-mode;
|
||||
|
||||
company-rtags = fix-rtags super.company-rtags;
|
||||
|
||||
easy-kill-extras = super.easy-kill-extras.override {
|
||||
inherit (self.melpaPackages) easy-kill;
|
||||
};
|
||||
|
||||
dune = dontConfigure super.dune;
|
||||
|
||||
emacsql-sqlite = super.emacsql-sqlite.overrideAttrs (old: {
|
||||
buildInputs = old.buildInputs ++ [ pkgs.sqlite ];
|
||||
|
||||
postBuild = ''
|
||||
cd source/sqlite
|
||||
make
|
||||
cd -
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
install -m=755 -D source/sqlite/emacsql-sqlite \
|
||||
$out/share/emacs/site-lisp/elpa/emacsql-sqlite-${old.version}/sqlite/emacsql-sqlite
|
||||
'';
|
||||
|
||||
stripDebugList = [ "share" ];
|
||||
});
|
||||
|
||||
erlang = super.erlang.overrideAttrs (attrs: {
|
||||
buildInputs = attrs.buildInputs ++ [
|
||||
pkgs.perl
|
||||
pkgs.ncurses
|
||||
];
|
||||
});
|
||||
|
||||
# https://github.com/syl20bnr/evil-escape/pull/86
|
||||
evil-escape = super.evil-escape.overrideAttrs (attrs: {
|
||||
postPatch = ''
|
||||
substituteInPlace evil-escape.el \
|
||||
--replace ' ;;; evil' ';;; evil'
|
||||
'';
|
||||
packageRequires = with self; [ evil ];
|
||||
});
|
||||
|
||||
ess-R-data-view = super.ess-R-data-view.override {
|
||||
inherit (self.melpaPackages) ess ctable popup;
|
||||
};
|
||||
|
||||
flycheck-rtags = fix-rtags super.flycheck-rtags;
|
||||
|
||||
pdf-tools = super.pdf-tools.overrideAttrs (old: {
|
||||
# Temporary work around for:
|
||||
# - https://github.com/vedang/pdf-tools/issues/102
|
||||
# - https://github.com/vedang/pdf-tools/issues/103
|
||||
# - https://github.com/vedang/pdf-tools/issues/109
|
||||
CXXFLAGS = "-std=c++17";
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkgs.autoconf
|
||||
pkgs.automake
|
||||
pkgs.pkg-config
|
||||
pkgs.removeReferencesTo
|
||||
];
|
||||
buildInputs = old.buildInputs ++ [ pkgs.libpng pkgs.zlib pkgs.poppler ];
|
||||
preBuild = ''
|
||||
make server/epdfinfo
|
||||
remove-references-to ${lib.concatStringsSep " " (
|
||||
map (output: "-t " + output) (
|
||||
[
|
||||
pkgs.glib.dev
|
||||
pkgs.libpng.dev
|
||||
pkgs.poppler.dev
|
||||
pkgs.zlib.dev
|
||||
pkgs.cairo.dev
|
||||
]
|
||||
++ lib.optional pkgs.stdenv.isLinux pkgs.stdenv.cc.libc.dev
|
||||
)
|
||||
)} server/epdfinfo
|
||||
'';
|
||||
recipe = pkgs.writeText "recipe" ''
|
||||
(pdf-tools
|
||||
:repo "politza/pdf-tools" :fetcher github
|
||||
:files ("lisp/pdf-*.el" "server/epdfinfo"))
|
||||
'';
|
||||
});
|
||||
|
||||
# Build same version as Haskell package
|
||||
hindent = (externalSrc super.hindent pkgs.haskellPackages.hindent).overrideAttrs (attrs: {
|
||||
packageRequires = [ self.haskell-mode ];
|
||||
});
|
||||
|
||||
irony = super.irony.overrideAttrs (old: {
|
||||
cmakeFlags = old.cmakeFlags or [ ] ++ [ "-DCMAKE_INSTALL_BINDIR=bin" ];
|
||||
NIX_CFLAGS_COMPILE = "-UCLANG_RESOURCE_DIR";
|
||||
preConfigure = ''
|
||||
cd server
|
||||
'';
|
||||
preBuild = ''
|
||||
make
|
||||
install -D bin/irony-server $out/bin/irony-server
|
||||
cd ..
|
||||
'';
|
||||
checkPhase = ''
|
||||
cd source/server
|
||||
make check
|
||||
cd ../..
|
||||
'';
|
||||
preFixup = ''
|
||||
rm -rf $out/share/emacs/site-lisp/elpa/*/server
|
||||
'';
|
||||
dontUseCmakeBuildDir = true;
|
||||
doCheck = true;
|
||||
packageRequires = [ self.emacs ];
|
||||
nativeBuildInputs = [ pkgs.cmake pkgs.llvmPackages.llvm pkgs.llvmPackages.libclang ];
|
||||
});
|
||||
|
||||
# tries to write a log file to $HOME
|
||||
insert-shebang = super.insert-shebang.overrideAttrs (attrs: {
|
||||
HOME = "/tmp";
|
||||
});
|
||||
|
||||
ivy-rtags = fix-rtags super.ivy-rtags;
|
||||
|
||||
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 = ''
|
||||
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;
|
||||
|
||||
forge = buildWithGit super.forge;
|
||||
|
||||
magit = buildWithGit super.magit;
|
||||
|
||||
magit-find-file = buildWithGit super.magit-find-file;
|
||||
|
||||
magit-gh-pulls = buildWithGit super.magit-gh-pulls;
|
||||
|
||||
magit-imerge = buildWithGit super.magit-imerge;
|
||||
|
||||
magit-lfs = buildWithGit super.magit-lfs;
|
||||
|
||||
magit-org-todos = buildWithGit super.magit-org-todos;
|
||||
|
||||
magit-tbdiff = buildWithGit super.magit-tbdiff;
|
||||
|
||||
magit-topgit = buildWithGit super.magit-topgit;
|
||||
|
||||
magit-vcsh = buildWithGit super.magit-vcsh;
|
||||
|
||||
magit-gerrit = buildWithGit super.magit-gerrit;
|
||||
|
||||
magit-annex = buildWithGit super.magit-annex;
|
||||
|
||||
magit-todos = buildWithGit super.magit-todos;
|
||||
|
||||
magit-filenotify = buildWithGit super.magit-filenotify;
|
||||
|
||||
magit-gitflow = buildWithGit super.magit-gitflow;
|
||||
|
||||
magithub = buildWithGit super.magithub;
|
||||
|
||||
magit-svn = buildWithGit super.magit-svn;
|
||||
|
||||
kubernetes = buildWithGit super.kubernetes;
|
||||
|
||||
kubernetes-evil = buildWithGit super.kubernetes-evil;
|
||||
|
||||
egg = buildWithGit super.egg;
|
||||
|
||||
kapacitor = buildWithGit super.kapacitor;
|
||||
|
||||
gerrit = buildWithGit super.gerrit;
|
||||
|
||||
gerrit-download = buildWithGit super.gerrit-download;
|
||||
|
||||
github-pullrequest = buildWithGit super.github-pullrequest;
|
||||
|
||||
jist = buildWithGit super.jist;
|
||||
|
||||
mandoku = buildWithGit super.mandoku;
|
||||
|
||||
mandoku-tls = buildWithGit super.mandoku-tls;
|
||||
|
||||
magit-p4 = buildWithGit super.magit-p4;
|
||||
|
||||
magit-rbr = buildWithGit super.magit-rbr;
|
||||
|
||||
magit-diff-flycheck = buildWithGit super.magit-diff-flycheck;
|
||||
|
||||
magit-reviewboard = buildWithGit super.magit-reviewboard;
|
||||
|
||||
magit-patch-changelog = buildWithGit super.magit-patch-changelog;
|
||||
|
||||
magit-circleci = buildWithGit super.magit-circleci;
|
||||
|
||||
magit-delta = buildWithGit super.magit-delta;
|
||||
|
||||
orgit = buildWithGit super.orgit;
|
||||
|
||||
orgit-forge = buildWithGit super.orgit-forge;
|
||||
|
||||
# upstream issue: missing file header
|
||||
mhc = super.mhc.override {
|
||||
inherit (self.melpaPackages) calfw;
|
||||
};
|
||||
|
||||
# missing .NET
|
||||
nemerle = markBroken super.nemerle;
|
||||
|
||||
# part of a larger package
|
||||
notmuch = dontConfigure super.notmuch;
|
||||
|
||||
rtags = dontConfigure (externalSrc super.rtags pkgs.rtags);
|
||||
|
||||
rtags-xref = dontConfigure super.rtags;
|
||||
|
||||
shm = super.shm.overrideAttrs (attrs: {
|
||||
propagatedUserEnvPkgs = [ pkgs.haskellPackages.structured-haskell-mode ];
|
||||
});
|
||||
|
||||
# Telega has a server portion for it's network protocol
|
||||
telega = super.telega.overrideAttrs (old: {
|
||||
buildInputs = old.buildInputs ++ [ pkgs.tdlib ];
|
||||
nativeBuildInputs = [ pkgs.pkg-config ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace telega-customize.el \
|
||||
--replace 'defcustom telega-server-command "telega-server"' \
|
||||
"defcustom telega-server-command \"$out/bin/telega-server\""
|
||||
|
||||
substituteInPlace telega-sticker.el --replace '"dwebp' '"${pkgs.libwebp}/bin/dwebp'
|
||||
substituteInPlace telega-sticker.el --replace '"ffmpeg' '"${pkgs.ffmpeg}/bin/ffmpeg'
|
||||
|
||||
substituteInPlace telega-vvnote.el --replace '"ffmpeg' '"${pkgs.ffmpeg}/bin/ffmpeg'
|
||||
'';
|
||||
|
||||
postBuild = ''
|
||||
cd source/server
|
||||
make
|
||||
cd -
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/bin
|
||||
install -m755 -Dt $out/bin ./source/server/telega-server
|
||||
'';
|
||||
});
|
||||
|
||||
treemacs-magit = super.treemacs-magit.overrideAttrs (attrs: {
|
||||
# searches for Git at build time
|
||||
nativeBuildInputs =
|
||||
(attrs.nativeBuildInputs or [ ]) ++ [ pkgs.git ];
|
||||
});
|
||||
|
||||
vdiff-magit = super.vdiff-magit.overrideAttrs (attrs: {
|
||||
nativeBuildInputs =
|
||||
(attrs.nativeBuildInputs or [ ]) ++ [ pkgs.git ];
|
||||
});
|
||||
|
||||
zmq = super.zmq.overrideAttrs (old: {
|
||||
stripDebugList = [ "share" ];
|
||||
preBuild = ''
|
||||
export EZMQ_LIBDIR=$(mktemp -d)
|
||||
make
|
||||
'';
|
||||
nativeBuildInputs = [
|
||||
pkgs.autoconf
|
||||
pkgs.automake
|
||||
pkgs.pkg-config
|
||||
pkgs.libtool
|
||||
(pkgs.zeromq.override { enableDrafts = true; })
|
||||
];
|
||||
postInstall = ''
|
||||
mv $EZMQ_LIBDIR/emacs-zmq.* $out/share/emacs/site-lisp/elpa/zmq-*
|
||||
rm -r $out/share/emacs/site-lisp/elpa/zmq-*/src
|
||||
rm $out/share/emacs/site-lisp/elpa/zmq-*/Makefile
|
||||
'';
|
||||
});
|
||||
|
||||
# Map legacy renames from emacs2nix since code generation was ported to emacs lisp
|
||||
_0blayout = super."0blayout";
|
||||
desktop-plus = super."desktop+";
|
||||
ghub-plus = super."ghub+";
|
||||
git-gutter-plus = super."git-gutter+";
|
||||
git-gutter-fringe-plus = super."git-gutter-fringe+";
|
||||
ido-completing-read-plus = super."ido-completing-read+";
|
||||
image-plus = super."image+";
|
||||
image-dired-plus = super."image-dired+";
|
||||
markdown-mode-plus = super."markdown-mode+";
|
||||
package-plus = super."package+";
|
||||
rect-plus = super."rect+";
|
||||
|
||||
# upstream issue: missing file header
|
||||
instapaper = markBroken super.instapaper;
|
||||
|
||||
# upstream issue: doesn't build
|
||||
magit-stgit = markBroken super.magit-stgit;
|
||||
|
||||
# upstream issue: missing file header
|
||||
melancholy-theme = markBroken super.melancholy-theme;
|
||||
|
||||
# upstream issue: doesn't build
|
||||
eterm-256color = markBroken super.eterm-256color;
|
||||
|
||||
# upstream issue: doesn't build
|
||||
per-buffer-theme = markBroken super.per-buffer-theme;
|
||||
|
||||
# upstream issue: missing file header
|
||||
qiita = markBroken super.qiita;
|
||||
|
||||
# upstream issue: missing file header
|
||||
sql-presto = markBroken super.sql-presto;
|
||||
|
||||
editorconfig = super.editorconfig.overrideAttrs (attrs: {
|
||||
propagatedUserEnvPkgs = [ pkgs.editorconfig-core-c ];
|
||||
});
|
||||
|
||||
# missing dependencies
|
||||
evil-search-highlight-persist = super.evil-search-highlight-persist.overrideAttrs (attrs: {
|
||||
packageRequires = with self; [ evil highlight ];
|
||||
});
|
||||
|
||||
helm-rtags = fix-rtags super.helm-rtags;
|
||||
|
||||
# tries to write to $HOME
|
||||
php-auto-yasnippets = super.php-auto-yasnippets.overrideAttrs (attrs: {
|
||||
HOME = "/tmp";
|
||||
});
|
||||
|
||||
racer = super.racer.overrideAttrs (attrs: {
|
||||
postPatch = attrs.postPatch or "" + ''
|
||||
substituteInPlace racer.el \
|
||||
--replace /usr/local/src/rust/src ${pkgs.rustPlatform.rustcSrc}
|
||||
'';
|
||||
});
|
||||
|
||||
spaceline = super.spaceline.override {
|
||||
inherit (self.melpaPackages) powerline;
|
||||
};
|
||||
|
||||
vterm = super.vterm.overrideAttrs (old: {
|
||||
nativeBuildInputs = [ pkgs.cmake ];
|
||||
buildInputs = old.buildInputs ++ [ self.emacs pkgs.libvterm-neovim ];
|
||||
cmakeFlags = [
|
||||
"-DEMACS_SOURCE=${self.emacs.src}"
|
||||
"-DUSE_SYSTEM_LIBVTERM=ON"
|
||||
];
|
||||
# we need the proper out directory to exist, so we do this in the
|
||||
# postInstall instead of postBuild
|
||||
postInstall = ''
|
||||
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}
|
||||
'';
|
||||
});
|
||||
|
||||
w3m = super.w3m.override (args: {
|
||||
melpaBuild = drv: args.melpaBuild (drv // {
|
||||
prePatch =
|
||||
let w3m = "${lib.getBin pkgs.w3m}/bin/w3m"; in
|
||||
''
|
||||
substituteInPlace w3m.el \
|
||||
--replace 'defcustom w3m-command nil' \
|
||||
'defcustom w3m-command "${w3m}"'
|
||||
'';
|
||||
});
|
||||
});
|
||||
|
||||
mozc = super.mozc.overrideAttrs (attrs: {
|
||||
postPatch = attrs.postPatch or "" + ''
|
||||
substituteInPlace src/unix/emacs/mozc.el \
|
||||
--replace '"mozc_emacs_helper"' '"${pkgs.ibus-engines.mozc}/lib/mozc/mozc_emacs_helper"'
|
||||
'';
|
||||
});
|
||||
};
|
||||
|
||||
in lib.mapAttrs (n: v: if lib.hasAttr n overrides then overrides.${n} else v) super);
|
||||
|
||||
in
|
||||
generateMelpa { }
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
{ lib
|
||||
, trivialBuild
|
||||
, fetchFromGitHub
|
||||
, emacs
|
||||
}:
|
||||
|
||||
trivialBuild rec {
|
||||
pname = "nano-theme";
|
||||
version = "0.pre+unstable=2021-06-29";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rougier";
|
||||
repo = pname;
|
||||
rev = "4a231787a32b3019f9f0abb3511a112fd54bf685";
|
||||
hash = "sha256-eco9BMKLhPuwFJb5QesbM6g3cZv3FdVvQ9fXq6D3Ifc=";
|
||||
};
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/rougier/nano-theme";
|
||||
description = "GNU Emacs / N Λ N O Theme";
|
||||
inherit (emacs.meta) platforms;
|
||||
};
|
||||
}
|
||||
2426
pkgs/applications/editors/emacs/elisp-packages/nongnu-generated.nix
Normal file
2426
pkgs/applications/editors/emacs/elisp-packages/nongnu-generated.nix
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
|
||||
# Updating
|
||||
|
||||
To update the list of packages from nongnu (ELPA),
|
||||
|
||||
1. Run `./update-nongnu`.
|
||||
2. Check for evaluation errors:
|
||||
# "../../../../../" points to the default.nix from root of Nixpkgs tree
|
||||
env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate ../../../../../ -A emacs.pkgs.nongnuPackages
|
||||
3. Run `git commit -m "nongnu-packages $(date -Idate)" -- nongnu-generated.nix`
|
||||
|
||||
*/
|
||||
|
||||
{ lib, buildPackages }:
|
||||
|
||||
self: let
|
||||
|
||||
generateNongnu = lib.makeOverridable ({
|
||||
generated ? ./nongnu-generated.nix
|
||||
}: let
|
||||
|
||||
imported = import generated {
|
||||
callPackage = pkgs: args: self.callPackage pkgs (args // {
|
||||
# Use custom elpa url fetcher with fallback/uncompress
|
||||
fetchurl = buildPackages.callPackage ./fetchelpa.nix { };
|
||||
});
|
||||
};
|
||||
|
||||
super = imported;
|
||||
|
||||
overrides = {
|
||||
};
|
||||
|
||||
in super // overrides);
|
||||
|
||||
in generateNongnu { }
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
{ trivialBuild
|
||||
, ott
|
||||
, haskellPackages
|
||||
}:
|
||||
|
||||
trivialBuild {
|
||||
pname = "ott-mode";
|
||||
|
||||
inherit (ott) src version;
|
||||
|
||||
postUnpack = ''
|
||||
mv $sourceRoot/emacs/ott-mode.el $sourceRoot
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Emacs ott mode (from ott sources)";
|
||||
inherit (haskellPackages.Agda.meta) homepage license;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "perl-completion";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://emacswiki.org/emacs/download/perl-completion.el";
|
||||
sha256 = "0x6qsgs4hm87k0z9q3g4p6508kc3y123j5jayll3jf3lcl2vm6ks";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = ''
|
||||
install -d $out/share/emacs/site-lisp
|
||||
install $src $out/share/emacs/site-lisp/perl-completion.el
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Minor mode provides useful features for editing perl codes";
|
||||
homepage = "http://emacswiki.org/emacs/PerlCompletion";
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
{ trivialBuild, lib, fetchurl }:
|
||||
|
||||
trivialBuild rec {
|
||||
pname = "pod-mode";
|
||||
version = "1.04";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://cpan/authors/id/F/FL/FLORA/pod-mode-${version}.tar.gz";
|
||||
sha256 = "1wr0khymkaa65blrc5nya607c1a3sjsww49bbf8f0a6176as71sv";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Major mode for editing .pod-files";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ qyliss ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
{ lib
|
||||
, trivialBuild
|
||||
, fetchFromGitHub
|
||||
, emacs
|
||||
}:
|
||||
|
||||
trivialBuild rec {
|
||||
pname = "power-mode";
|
||||
version = "0.pre+unstable=2021-06-06";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "elizagamedev";
|
||||
repo = "power-mode.el";
|
||||
rev = "940e0aa36220f863e8f43840b4ed634b464fbdbb";
|
||||
hash = "sha256-Wy8o9QTWqvH9cP7xsTpF5QSd4mWNIPXJTadoADKeHWY=";
|
||||
};
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/elizagamedev/power-mode.el";
|
||||
description = "Imbue Emacs with power!";
|
||||
inherit (emacs.meta) platforms;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "prolog-mode";
|
||||
version = "1.28";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://bruda.ca/_media/emacs/prolog.el";
|
||||
sha256 = "ZzIDFQWPq1vI9z3btgsHgn0axN6uRQn9Tt8TnqGybOk=";
|
||||
};
|
||||
|
||||
buildCommand = ''
|
||||
mkdir -p $out/share/emacs/site-lisp/
|
||||
cp $src $out/share/emacs/site-lisp/prolog.el
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://bruda.ca/emacs/prolog_mode_for_emacs/";
|
||||
description = "Prolog mode for Emacs";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
};
|
||||
}
|
||||
118764
pkgs/applications/editors/emacs/elisp-packages/recipes-archive-melpa.json
Normal file
118764
pkgs/applications/editors/emacs/elisp-packages/recipes-archive-melpa.json
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,26 @@
|
|||
{ lib
|
||||
, trivialBuild
|
||||
, fetchFromGitHub
|
||||
, emacs
|
||||
}:
|
||||
|
||||
trivialBuild rec {
|
||||
pname = "rect-mark";
|
||||
version = "1.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "emacsmirror";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
hash = "sha256-/8T1VTYkKUxlNWXuuS54S5jpl4UxJBbgSuWc17a/VyM=";
|
||||
};
|
||||
|
||||
buildInputs = [ emacs ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://emacswiki.org/emacs/RectangleMark";
|
||||
description = "Mark a rectangle of text with highlighting";
|
||||
license = licenses.gpl2Plus;
|
||||
inherit (emacs.meta) platforms;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
{ stdenv, fetchurl, emacs, lib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "session-management-for-emacs";
|
||||
version = "2.2a";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/emacs-session/session-${version}.tar.gz";
|
||||
sha256 = "37dfba7420b5164eab90dafa9e8bf9a2c8f76505fe2fefa14a64e81fa76d0144";
|
||||
};
|
||||
|
||||
buildInputs = [ emacs ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out/share/emacs/site-lisp"
|
||||
cp lisp/*.el "$out/share/emacs/site-lisp/"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
/* installation: add to your ~/.emacs
|
||||
(require 'session)
|
||||
(add-hook 'after-init-hook 'session-initialize)
|
||||
*/
|
||||
description = "Small session management for emacs";
|
||||
homepage = "http://emacs-session.sourceforge.net/";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
{ lib
|
||||
, trivialBuild
|
||||
, fetchFromGitHub
|
||||
, emacs
|
||||
}:
|
||||
|
||||
trivialBuild rec {
|
||||
pname = "sunrise-commander";
|
||||
version = "0.pre+unstable=2021-09-27";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = "16e6df7e86c7a383fb4400fae94af32baf9cb24e";
|
||||
hash = "sha256-D36qiRi5OTZrBtJ/bD/javAWizZ8NLlC/YP4rdLCSsw=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
emacs
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/sunrise-commander/sunrise-commander/";
|
||||
description = "Orthodox (two-pane) file manager for Emacs";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = [ maintainers.AndersonTorres ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
{ fetchurl, lib, trivialBuild }:
|
||||
|
||||
trivialBuild {
|
||||
pname = "sv-kalender";
|
||||
version = "1.11";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://bigwalter.net/daniel/elisp/sv-kalender.el";
|
||||
sha256 = "0mcx7g1pg6kfp0i4b9rh3q9csgdf3054ijswy368bxwdxsjgfz2m";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Swedish calendar for Emacs";
|
||||
homepage = "http://bigwalter.net/daniel/elisp/sv-kalender.el";
|
||||
platforms = platforms.all;
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = [ maintainers.rycee ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
[
|
||||
"tree-sitter-agda",
|
||||
"tree-sitter-bash",
|
||||
"tree-sitter-c",
|
||||
"tree-sitter-c-sharp",
|
||||
"tree-sitter-cpp",
|
||||
"tree-sitter-css",
|
||||
"tree-sitter-elixir",
|
||||
"tree-sitter-elm",
|
||||
"tree-sitter-fluent",
|
||||
"tree-sitter-go",
|
||||
"tree-sitter-haskell",
|
||||
"tree-sitter-hcl",
|
||||
"tree-sitter-html",
|
||||
"tree-sitter-java",
|
||||
"tree-sitter-javascript",
|
||||
"tree-sitter-jsdoc",
|
||||
"tree-sitter-json",
|
||||
"tree-sitter-julia",
|
||||
"tree-sitter-nix",
|
||||
"tree-sitter-ocaml",
|
||||
"tree-sitter-php",
|
||||
"tree-sitter-prisma",
|
||||
"tree-sitter-python",
|
||||
"tree-sitter-ruby",
|
||||
"tree-sitter-rust",
|
||||
"tree-sitter-scala",
|
||||
"tree-sitter-typescript",
|
||||
"tree-sitter-verilog",
|
||||
"tree-sitter-zig"
|
||||
]
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
{ lib
|
||||
, pkgs
|
||||
, symlinkJoin
|
||||
, fetchzip
|
||||
, melpaBuild
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, writeText
|
||||
, melpaStablePackages
|
||||
, runCommand
|
||||
, tree-sitter-grammars
|
||||
, plugins ? map (g: tree-sitter-grammars.${g}) (lib.importJSON ./default-grammars.json)
|
||||
, final
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (melpaStablePackages) tree-sitter-langs;
|
||||
|
||||
libSuffix = if stdenv.isDarwin then "dylib" else "so";
|
||||
soName = g: lib.removeSuffix "-grammar" (lib.removePrefix "tree-sitter-" g.pname) + "." + libSuffix;
|
||||
|
||||
grammarDir = runCommand "emacs-tree-sitter-grammars" {
|
||||
# Fake same version number as upstream language bundle to prevent triggering runtime downloads
|
||||
inherit (tree-sitter-langs) version;
|
||||
} (''
|
||||
install -d $out/langs/bin
|
||||
echo -n $version > $out/langs/bin/BUNDLE-VERSION
|
||||
'' + lib.concatStringsSep "\n" (map (
|
||||
g: "ln -s ${g}/parser $out/langs/bin/${soName g}") plugins
|
||||
));
|
||||
|
||||
in
|
||||
melpaStablePackages.tree-sitter-langs.overrideAttrs(old: {
|
||||
postPatch = old.postPatch or "" + ''
|
||||
substituteInPlace ./tree-sitter-langs-build.el \
|
||||
--replace "tree-sitter-langs-grammar-dir tree-sitter-langs--dir" "tree-sitter-langs-grammar-dir \"${grammarDir}/langs\""
|
||||
'';
|
||||
|
||||
passthru = old.passthru or {} // {
|
||||
inherit plugins;
|
||||
withPlugins = fn: final.tree-sitter-langs.override { plugins = fn tree-sitter-grammars; };
|
||||
};
|
||||
|
||||
})
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell ../../../../../../. -i python3 -p python3 -p nix
|
||||
from os.path import (
|
||||
dirname,
|
||||
abspath,
|
||||
join,
|
||||
)
|
||||
from typing import (
|
||||
List,
|
||||
Any,
|
||||
)
|
||||
import subprocess
|
||||
import json
|
||||
import sys
|
||||
import os
|
||||
|
||||
|
||||
def fmt_grammar(grammar: str) -> str:
|
||||
return "tree-sitter-" + grammar
|
||||
|
||||
|
||||
def eval_expr(nixpkgs: str, expr: str) -> Any:
|
||||
p = subprocess.run(
|
||||
[
|
||||
"nix-instantiate",
|
||||
"--json",
|
||||
"--eval",
|
||||
"--expr",
|
||||
("with import %s {}; %s" % (nixpkgs, expr)),
|
||||
],
|
||||
check=True,
|
||||
stdout=subprocess.PIPE,
|
||||
)
|
||||
return json.loads(p.stdout)
|
||||
|
||||
|
||||
def check_grammar_exists(nixpkgs: str, grammar: str) -> bool:
|
||||
return eval_expr(
|
||||
nixpkgs, f'lib.hasAttr "{fmt_grammar(grammar)}" tree-sitter-grammars'
|
||||
)
|
||||
|
||||
|
||||
def build_attr(nixpkgs, attr: str) -> str:
|
||||
return (
|
||||
subprocess.run(
|
||||
["nix-build", "--no-out-link", nixpkgs, "-A", attr],
|
||||
check=True,
|
||||
stdout=subprocess.PIPE,
|
||||
)
|
||||
.stdout.decode()
|
||||
.strip()
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
cwd = dirname(abspath(__file__))
|
||||
nixpkgs = abspath(join(cwd, "../../../../../.."))
|
||||
|
||||
src_dir = build_attr(nixpkgs, "emacs.pkgs.tree-sitter-langs.src")
|
||||
|
||||
existing: List[str] = []
|
||||
|
||||
grammars = os.listdir(join(src_dir, "repos"))
|
||||
for g in grammars:
|
||||
exists = check_grammar_exists(nixpkgs, g)
|
||||
if exists:
|
||||
existing.append(fmt_grammar(g))
|
||||
else:
|
||||
sys.stderr.write("Missing grammar: " + fmt_grammar(g) + "\n")
|
||||
sys.stderr.flush()
|
||||
|
||||
with open(join(cwd, "default-grammars.json"), mode="w") as f:
|
||||
json.dump(sorted(existing), f, indent=2)
|
||||
f.write("\n")
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
{ lib
|
||||
, symlinkJoin
|
||||
, melpaBuild
|
||||
, fetchFromGitHub
|
||||
, rustPlatform
|
||||
, writeText
|
||||
, clang
|
||||
, llvmPackages
|
||||
|
||||
, runtimeShell
|
||||
, writeScript
|
||||
, python3
|
||||
, nix-prefetch-github
|
||||
, nix
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
srcMeta = lib.importJSON ./src.json;
|
||||
inherit (srcMeta) version;
|
||||
|
||||
src = fetchFromGitHub srcMeta.src;
|
||||
|
||||
tsc = melpaBuild {
|
||||
inherit src;
|
||||
inherit version;
|
||||
|
||||
pname = "tsc";
|
||||
commit = version;
|
||||
|
||||
sourceRoot = "source/core";
|
||||
|
||||
recipe = writeText "recipe" ''
|
||||
(tsc
|
||||
:repo "emacs-tree-sitter/elisp-tree-sitter"
|
||||
:fetcher github)
|
||||
'';
|
||||
};
|
||||
|
||||
tsc-dyn = rustPlatform.buildRustPackage {
|
||||
inherit version;
|
||||
inherit src;
|
||||
|
||||
pname = "tsc-dyn";
|
||||
|
||||
nativeBuildInputs = [ clang ];
|
||||
sourceRoot = "source/core";
|
||||
|
||||
configurePhase = ''
|
||||
export LIBCLANG_PATH="${llvmPackages.libclang.lib}/lib"
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
LIB=($out/lib/libtsc_dyn.*)
|
||||
TSC_PATH=$out/share/emacs/site-lisp/elpa/tsc-${version}
|
||||
install -d $TSC_PATH
|
||||
install -m444 $out/lib/libtsc_dyn.* $TSC_PATH/''${LIB/*libtsc_/tsc-}
|
||||
echo -n $version > $TSC_PATH/DYN-VERSION
|
||||
rm -r $out/lib
|
||||
'';
|
||||
|
||||
inherit (srcMeta) cargoSha256;
|
||||
};
|
||||
|
||||
in symlinkJoin {
|
||||
name = "tsc-${version}";
|
||||
paths = [ tsc tsc-dyn ];
|
||||
|
||||
passthru = {
|
||||
updateScript = let
|
||||
pythonEnv = python3.withPackages(ps: [ ps.requests ]);
|
||||
in writeScript "tsc-update" ''
|
||||
#!${runtimeShell}
|
||||
set -euo pipefail
|
||||
export PATH=${lib.makeBinPath [
|
||||
nix-prefetch-github
|
||||
nix
|
||||
pythonEnv
|
||||
]}:$PATH
|
||||
exec python3 ${builtins.toString ./update.py} ${builtins.toString ./.}
|
||||
'';
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "The core APIs of the Emacs binding for tree-sitter.";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ pimeys ];
|
||||
};
|
||||
}
|
||||
10
pkgs/applications/editors/emacs/elisp-packages/tsc/src.json
Normal file
10
pkgs/applications/editors/emacs/elisp-packages/tsc/src.json
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"src": {
|
||||
"owner": "emacs-tree-sitter",
|
||||
"repo": "elisp-tree-sitter",
|
||||
"rev": "909717c685ff5a2327fa2ca8fb8a25216129361c",
|
||||
"sha256": "LrakDpP3ZhRQqz47dPcyoQnu5lROdaNlxGaQfQT6u+k="
|
||||
},
|
||||
"version": "0.18.0",
|
||||
"cargoSha256": "sha256-IRCZqszBkGF8anF/kpcPOzHdOP4lAtJBAp6FS5tAOx8="
|
||||
}
|
||||
122
pkgs/applications/editors/emacs/elisp-packages/tsc/update.py
Normal file
122
pkgs/applications/editors/emacs/elisp-packages/tsc/update.py
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
#!/usr/bin/env python3
|
||||
from textwrap import dedent
|
||||
from os.path import (
|
||||
abspath,
|
||||
dirname,
|
||||
join,
|
||||
)
|
||||
from typing import (
|
||||
Dict,
|
||||
Any,
|
||||
)
|
||||
import subprocess
|
||||
import tempfile
|
||||
import json
|
||||
import sys
|
||||
import re
|
||||
|
||||
import requests
|
||||
|
||||
|
||||
def eval_drv(nixpkgs: str, expr: str) -> Any:
|
||||
expr = "\n".join(
|
||||
(
|
||||
"with (import %s {});" % nixpkgs,
|
||||
expr,
|
||||
)
|
||||
)
|
||||
|
||||
with tempfile.NamedTemporaryFile(mode="w") as f:
|
||||
f.write(dedent(expr))
|
||||
f.flush()
|
||||
p = subprocess.run(
|
||||
["nix-instantiate", "--json", f.name], stdout=subprocess.PIPE, check=True
|
||||
)
|
||||
|
||||
return p.stdout.decode().strip()
|
||||
|
||||
|
||||
def get_src(tag_name: str) -> Dict[str, str]:
|
||||
p = subprocess.run(
|
||||
[
|
||||
"nix-prefetch-github",
|
||||
"--rev",
|
||||
tag_name,
|
||||
"--json",
|
||||
"emacs-tree-sitter",
|
||||
"elisp-tree-sitter",
|
||||
],
|
||||
stdout=subprocess.PIPE,
|
||||
check=True,
|
||||
)
|
||||
src = json.loads(p.stdout)
|
||||
|
||||
fields = ["owner", "repo", "rev", "sha256"]
|
||||
|
||||
return {f: src[f] for f in fields}
|
||||
|
||||
|
||||
def get_cargo_sha256(drv_path: str):
|
||||
# Note: No check=True since we expect this command to fail
|
||||
p = subprocess.run(["nix-store", "-r", drv_path], stderr=subprocess.PIPE)
|
||||
|
||||
stderr = p.stderr.decode()
|
||||
lines = iter(stderr.split("\n"))
|
||||
|
||||
for l in lines:
|
||||
if l.startswith("error: hash mismatch in fixed-output derivation"):
|
||||
break
|
||||
else:
|
||||
raise ValueError("Did not find expected hash mismatch message")
|
||||
|
||||
for l in lines:
|
||||
m = re.match(r"\s+got:\s+(.+)$", l)
|
||||
if m:
|
||||
return m.group(1)
|
||||
|
||||
raise ValueError("Could not extract actual sha256 hash: ", stderr)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
cwd = sys.argv[1]
|
||||
|
||||
nixpkgs = abspath(join(cwd, "../../../../../.."))
|
||||
|
||||
tag_name = requests.get(
|
||||
"https://api.github.com/repos/emacs-tree-sitter/elisp-tree-sitter/releases/latest"
|
||||
).json()["tag_name"]
|
||||
|
||||
src = get_src(tag_name)
|
||||
|
||||
with tempfile.NamedTemporaryFile(mode="w") as f:
|
||||
json.dump(src, f)
|
||||
f.flush()
|
||||
|
||||
drv_path = eval_drv(
|
||||
nixpkgs,
|
||||
"""
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = "tsc-dyn";
|
||||
version = "%s";
|
||||
nativeBuildInputs = [ clang ];
|
||||
src = fetchFromGitHub (lib.importJSON %s);
|
||||
sourceRoot = "source/core";
|
||||
cargoSha256 = lib.fakeSha256;
|
||||
}
|
||||
"""
|
||||
% (tag_name, f.name),
|
||||
)
|
||||
|
||||
cargo_sha256 = get_cargo_sha256(drv_path)
|
||||
|
||||
with open(join(cwd, "src.json"), mode="w") as f:
|
||||
json.dump(
|
||||
{
|
||||
"src": src,
|
||||
"version": tag_name,
|
||||
"cargoSha256": cargo_sha256,
|
||||
},
|
||||
f,
|
||||
indent=2,
|
||||
)
|
||||
f.write("\n")
|
||||
10
pkgs/applications/editors/emacs/elisp-packages/update
Executable file
10
pkgs/applications/editors/emacs/elisp-packages/update
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$( cd "$(dirname "$0")" ; pwd -P )"
|
||||
cd "$SCRIPT_DIR"
|
||||
|
||||
./update-from-overlay
|
||||
|
||||
./update-manual
|
||||
git commit -m "emacs.pkgs.manualPackages: $(date --iso)" -- .
|
||||
4
pkgs/applications/editors/emacs/elisp-packages/update-elpa
Executable file
4
pkgs/applications/editors/emacs/elisp-packages/update-elpa
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell --show-trace ./emacs2nix.nix -i bash
|
||||
|
||||
exec elpa-packages.sh --names $EMACS2NIX/names.nix -o elpa-generated.nix
|
||||
17
pkgs/applications/editors/emacs/elisp-packages/update-from-overlay
Executable file
17
pkgs/applications/editors/emacs/elisp-packages/update-from-overlay
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p curl nix
|
||||
set -euxo pipefail
|
||||
|
||||
export NIXPKGS_ALLOW_BROKEN=1
|
||||
|
||||
# This script piggybacks on the automatic code generation done by the nix-community emacs overlay
|
||||
# You can use this to avoid running lengthy code generation jobs locally
|
||||
|
||||
curl -s -O https://raw.githubusercontent.com/nix-community/emacs-overlay/master/repos/elpa/elpa-generated.nix
|
||||
nix-instantiate ../../../../../ -A emacs.pkgs.elpaPackages --show-trace
|
||||
git diff --exit-code elpa-generated.nix > /dev/null || git commit -m "emacs.pkgs.elpa-packages: $(date --iso)" -- elpa-generated.nix
|
||||
|
||||
curl -s -O https://raw.githubusercontent.com/nix-community/emacs-overlay/master/repos/melpa/recipes-archive-melpa.json
|
||||
nix-instantiate --show-trace ../../../../../ -A emacs.pkgs.melpaStablePackages
|
||||
nix-instantiate --show-trace ../../../../../ -A emacs.pkgs.melpaPackages
|
||||
git diff --exit-code recipes-archive-melpa.json > /dev/null || git commit -m "emacs.pkgs.melpa-packages: $(date --iso)" -- recipes-archive-melpa.json
|
||||
7
pkgs/applications/editors/emacs/elisp-packages/update-manual
Executable file
7
pkgs/applications/editors/emacs/elisp-packages/update-manual
Executable file
|
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$( cd "$(dirname "$0")" ; pwd -P )"
|
||||
cd "$SCRIPT_DIR"
|
||||
|
||||
nix-build --no-out-link update-manual.nix | xargs -n 1 -P $(nproc) bash -c
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
let
|
||||
pkgs = import ../../../../../. {
|
||||
config.allowBroken = true;
|
||||
};
|
||||
inherit (pkgs) lib emacs;
|
||||
inherit (lib) isDerivation hasAttr filterAttrs mapAttrs attrValues;
|
||||
|
||||
# Extract updateScript's from manually package emacs packages
|
||||
hasScript = filterAttrs (_: v: isDerivation v && hasAttr "updateScript" v) emacs.pkgs.manualPackages;
|
||||
|
||||
in attrValues (mapAttrs (_: v: v.updateScript) hasScript)
|
||||
6
pkgs/applications/editors/emacs/elisp-packages/update-melpa
Executable file
6
pkgs/applications/editors/emacs/elisp-packages/update-melpa
Executable file
|
|
@ -0,0 +1,6 @@
|
|||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell --show-trace ./updater-emacs.nix -i bash
|
||||
|
||||
SCRIPT_DIR="$( cd "$(dirname "$0")" ; pwd -P )"
|
||||
|
||||
exec emacs --fg-daemon=updater --quick -l $SCRIPT_DIR/update-melpa.el -f run-updater "$@"
|
||||
437
pkgs/applications/editors/emacs/elisp-packages/update-melpa.el
Normal file
437
pkgs/applications/editors/emacs/elisp-packages/update-melpa.el
Normal file
|
|
@ -0,0 +1,437 @@
|
|||
;; -*- lexical-binding: t -*-
|
||||
|
||||
;; This is the updater for recipes-archive-melpa.json
|
||||
|
||||
(require 'promise)
|
||||
(require 'semaphore-promise)
|
||||
(require 'url)
|
||||
(require 'json)
|
||||
(require 'cl)
|
||||
(require 'subr-x)
|
||||
(require 'seq)
|
||||
|
||||
;; # Lib
|
||||
|
||||
(defun alist-set (key value alist)
|
||||
(cons
|
||||
(cons key value)
|
||||
(assq-delete-all
|
||||
key alist)))
|
||||
|
||||
(defun alist-update (key f alist)
|
||||
(let ((value (alist-get key alist)))
|
||||
(cons
|
||||
(cons key (funcall f value))
|
||||
(assq-delete-all
|
||||
key alist))))
|
||||
|
||||
|
||||
(defun process-promise (semaphore program &rest args)
|
||||
"Generate an asynchronous process and
|
||||
return Promise to resolve in that process."
|
||||
(promise-then
|
||||
(semaphore-promise-gated
|
||||
semaphore
|
||||
(lambda (resolve reject)
|
||||
(funcall resolve (apply #'promise:make-process program args))))
|
||||
#'car))
|
||||
|
||||
(defun mangle-name (s)
|
||||
(if (string-match "^[a-zA-Z].*" s)
|
||||
s
|
||||
(concat "_" s)))
|
||||
|
||||
;; ## Shell promise + env
|
||||
|
||||
(defun as-string (o)
|
||||
(with-output-to-string (princ o)))
|
||||
|
||||
(defun assocenv (env &rest namevals)
|
||||
(let ((process-environment (copy-sequence env)))
|
||||
(mapc (lambda (e)
|
||||
(setenv (as-string (car e))
|
||||
(cadr e)))
|
||||
(seq-partition namevals 2))
|
||||
process-environment))
|
||||
|
||||
(defun shell-promise (semaphore env script)
|
||||
(semaphore-promise-gated
|
||||
semaphore
|
||||
(lambda (resolve reject)
|
||||
(let ((process-environment env))
|
||||
(funcall resolve (promise:make-shell-command script))))))
|
||||
|
||||
;; # Updater
|
||||
|
||||
;; ## Previous Archive Reader
|
||||
|
||||
(defun previous-commit (index ename variant)
|
||||
(when-let (pdesc (and index (gethash ename index)))
|
||||
(when-let (desc (and pdesc (gethash variant pdesc)))
|
||||
(gethash 'commit desc))))
|
||||
|
||||
(defun previous-sha256 (index ename variant)
|
||||
(when-let (pdesc (and index (gethash ename index)))
|
||||
(when-let (desc (and pdesc (gethash variant pdesc)))
|
||||
(gethash 'sha256 desc))))
|
||||
|
||||
(defun parse-previous-archive (filename)
|
||||
(let ((idx (make-hash-table :test 'equal)))
|
||||
(loop for desc in
|
||||
(let ((json-object-type 'hash-table)
|
||||
(json-array-type 'list)
|
||||
(json-key-type 'symbol))
|
||||
(json-read-file filename))
|
||||
do (puthash (gethash 'ename desc)
|
||||
desc idx))
|
||||
idx))
|
||||
|
||||
;; ## Prefetcher
|
||||
|
||||
;; (defun latest-git-revision (url)
|
||||
;; (process-promise "git" "ls-remote" url))
|
||||
|
||||
(defun prefetch (semaphore fetcher repo commit)
|
||||
(promise-then
|
||||
(apply 'process-promise
|
||||
semaphore
|
||||
(pcase fetcher
|
||||
("github" (list "nix-prefetch-url"
|
||||
"--unpack" (concat "https://github.com/" repo "/archive/" commit ".tar.gz")))
|
||||
("gitlab" (list "nix-prefetch-url"
|
||||
"--unpack" (concat "https://gitlab.com/api/v4/projects/"
|
||||
(url-hexify-string repo)
|
||||
"/repository/archive.tar.gz?ref="
|
||||
commit)))
|
||||
("bitbucket" (list "nix-prefetch-hg"
|
||||
(concat "https://bitbucket.com/" repo) commit))
|
||||
("hg" (list "nix-prefetch-hg"
|
||||
repo commit))
|
||||
("git" (list "nix-prefetch-git"
|
||||
"--fetch-submodules"
|
||||
"--url" repo
|
||||
"--rev" commit))
|
||||
(_ (throw 'unknown-fetcher fetcher))))
|
||||
(lambda (res)
|
||||
(pcase fetcher
|
||||
("git" (alist-get 'sha256 (json-read-from-string res)))
|
||||
(_ (car (split-string res)))))))
|
||||
|
||||
(defun source-sha (semaphore ename eprops aprops previous variant)
|
||||
(let* ((fetcher (alist-get 'fetcher eprops))
|
||||
(url (alist-get 'url eprops))
|
||||
(repo (alist-get 'repo eprops))
|
||||
(commit (gethash 'commit aprops))
|
||||
(prev-commit (previous-commit previous ename variant))
|
||||
(prev-sha256 (previous-sha256 previous ename variant)))
|
||||
(if (and commit prev-sha256
|
||||
(equal prev-commit commit))
|
||||
(progn
|
||||
(message "INFO: %s: re-using %s %s" ename prev-commit prev-sha256)
|
||||
(promise-resolve `((sha256 . ,prev-sha256))))
|
||||
(if (and commit (or repo url))
|
||||
(promise-then
|
||||
(prefetch semaphore fetcher (or repo url) commit)
|
||||
(lambda (sha256)
|
||||
(message "INFO: %s: prefetched repository %s %s" ename commit sha256)
|
||||
`((sha256 . ,sha256)))
|
||||
(lambda (err)
|
||||
(message "ERROR: %s: during prefetch %s" ename err)
|
||||
(promise-resolve
|
||||
`((error . ,err)))))
|
||||
(progn
|
||||
(message "ERROR: %s: no commit information" ename)
|
||||
(promise-resolve
|
||||
`((error . "No commit information"))))))))
|
||||
|
||||
(defun source-info (recipe archive source-sha)
|
||||
(let* ((esym (car recipe))
|
||||
(ename (symbol-name esym))
|
||||
(eprops (cdr recipe))
|
||||
(aentry (gethash esym archive))
|
||||
(version (and aentry (gethash 'ver aentry)))
|
||||
(deps (when-let (deps (gethash 'deps aentry))
|
||||
(remove 'emacs (hash-table-keys deps))))
|
||||
(aprops (and aentry (gethash 'props aentry)))
|
||||
(commit (gethash 'commit aprops)))
|
||||
(append `((version . ,version))
|
||||
(when (< 0 (length deps))
|
||||
`((deps . ,(sort deps 'string<))))
|
||||
`((commit . ,commit))
|
||||
source-sha)))
|
||||
|
||||
(defun recipe-info (recipe-index ename)
|
||||
(if-let (desc (gethash ename recipe-index))
|
||||
(destructuring-bind (rcp-commit . rcp-sha256) desc
|
||||
`((commit . ,rcp-commit)
|
||||
(sha256 . ,rcp-sha256)))
|
||||
`((error . "No recipe info"))))
|
||||
|
||||
(defun start-fetch (semaphore recipe-index-promise recipes unstable-archive stable-archive previous)
|
||||
(promise-all
|
||||
(mapcar (lambda (entry)
|
||||
(let* ((esym (car entry))
|
||||
(ename (symbol-name esym))
|
||||
(eprops (cdr entry))
|
||||
(fetcher (alist-get 'fetcher eprops))
|
||||
(url (alist-get 'url eprops))
|
||||
(repo (alist-get 'repo eprops))
|
||||
|
||||
(unstable-aentry (gethash esym unstable-archive))
|
||||
(unstable-aprops (and unstable-aentry (gethash 'props unstable-aentry)))
|
||||
(unstable-commit (and unstable-aprops (gethash 'commit unstable-aprops)))
|
||||
|
||||
(stable-aentry (gethash esym stable-archive))
|
||||
(stable-aprops (and stable-aentry (gethash 'props stable-aentry)))
|
||||
(stable-commit (and stable-aprops (gethash 'commit stable-aprops)))
|
||||
|
||||
(unstable-shap (if unstable-aprops
|
||||
(source-sha semaphore ename eprops unstable-aprops previous 'unstable)
|
||||
(promise-resolve nil)))
|
||||
(stable-shap (if (equal unstable-commit stable-commit)
|
||||
unstable-shap
|
||||
(if stable-aprops
|
||||
(source-sha semaphore ename eprops stable-aprops previous 'stable)
|
||||
(promise-resolve nil)))))
|
||||
|
||||
(promise-then
|
||||
(promise-all (list recipe-index-promise unstable-shap stable-shap))
|
||||
(lambda (res)
|
||||
(seq-let [recipe-index unstable-sha stable-sha] res
|
||||
(append `((ename . ,ename))
|
||||
(if-let (desc (gethash ename recipe-index))
|
||||
(destructuring-bind (rcp-commit . rcp-sha256) desc
|
||||
(append `((commit . ,rcp-commit)
|
||||
(sha256 . ,rcp-sha256))
|
||||
(when (not unstable-aprops)
|
||||
(message "ERROR: %s: not in archive" ename)
|
||||
`((error . "Not in archive")))))
|
||||
`((error . "No recipe info")))
|
||||
`((fetcher . ,fetcher))
|
||||
(if (or (equal "github" fetcher)
|
||||
(equal "bitbucket" fetcher)
|
||||
(equal "gitlab" fetcher))
|
||||
`((repo . ,repo))
|
||||
`((url . ,url)))
|
||||
(when unstable-aprops `((unstable . ,(source-info entry unstable-archive unstable-sha))))
|
||||
(when stable-aprops `((stable . ,(source-info entry stable-archive stable-sha))))))))))
|
||||
recipes)))
|
||||
|
||||
;; ## Emitter
|
||||
|
||||
(defun emit-json (prefetch-semaphore recipe-index-promise recipes archive stable-archive previous)
|
||||
(promise-then
|
||||
(start-fetch
|
||||
prefetch-semaphore
|
||||
recipe-index-promise
|
||||
(sort recipes (lambda (a b)
|
||||
(string-lessp
|
||||
(symbol-name (car a))
|
||||
(symbol-name (car b)))))
|
||||
archive stable-archive
|
||||
previous)
|
||||
(lambda (descriptors)
|
||||
(message "Finished downloading %d descriptors" (length descriptors))
|
||||
(let ((buf (generate-new-buffer "*recipes-archive*")))
|
||||
(with-current-buffer buf
|
||||
;; (switch-to-buffer buf)
|
||||
;; (json-mode)
|
||||
(insert
|
||||
(let ((json-encoding-pretty-print t)
|
||||
(json-encoding-default-indentation " "))
|
||||
(json-encode descriptors)))
|
||||
buf)))))
|
||||
|
||||
;; ## Recipe indexer
|
||||
|
||||
(defun http-get (url parser)
|
||||
(promise-new
|
||||
(lambda (resolve reject)
|
||||
(url-retrieve
|
||||
url (lambda (status)
|
||||
(funcall resolve (condition-case err
|
||||
(progn
|
||||
(goto-char (point-min))
|
||||
(search-forward "\n\n")
|
||||
(message (buffer-substring (point-min) (point)))
|
||||
(delete-region (point-min) (point))
|
||||
(funcall parser))
|
||||
(funcall reject err))))))))
|
||||
|
||||
(defun json-read-buffer (buffer)
|
||||
(with-current-buffer buffer
|
||||
(save-excursion
|
||||
(mark-whole-buffer)
|
||||
(json-read))))
|
||||
|
||||
(defun error-count (recipes-archive)
|
||||
(length
|
||||
(seq-filter
|
||||
(lambda (desc)
|
||||
(alist-get 'error desc))
|
||||
recipes-archive)))
|
||||
|
||||
;; (error-count (json-read-buffer "recipes-archive-melpa.json"))
|
||||
|
||||
(defun latest-recipe-commit (semaphore repo base-rev recipe)
|
||||
(shell-promise
|
||||
semaphore (assocenv process-environment
|
||||
"GIT_DIR" repo
|
||||
"BASE_REV" base-rev
|
||||
"RECIPE" recipe)
|
||||
"exec git log --first-parent -n1 --pretty=format:%H $BASE_REV -- recipes/$RECIPE"))
|
||||
|
||||
(defun latest-recipe-sha256 (semaphore repo base-rev recipe)
|
||||
(promise-then
|
||||
(shell-promise
|
||||
semaphore (assocenv process-environment
|
||||
"GIT_DIR" repo
|
||||
"BASE_REV" base-rev
|
||||
"RECIPE" recipe)
|
||||
"exec nix-hash --flat --type sha256 --base32 <(
|
||||
git cat-file blob $(
|
||||
git ls-tree $BASE_REV recipes/$RECIPE | cut -f1 | cut -d' ' -f3
|
||||
)
|
||||
)")
|
||||
(lambda (res)
|
||||
(car
|
||||
(split-string res)))))
|
||||
|
||||
(defun index-recipe-commits (semaphore repo base-rev recipes)
|
||||
(promise-then
|
||||
(promise-all
|
||||
(mapcar (lambda (recipe)
|
||||
(promise-then
|
||||
(latest-recipe-commit semaphore repo base-rev recipe)
|
||||
(let ((sha256p (latest-recipe-sha256 semaphore repo base-rev recipe)))
|
||||
(lambda (commit)
|
||||
(promise-then sha256p
|
||||
(lambda (sha256)
|
||||
(message "Indexed Recipe %s %s %s" recipe commit sha256)
|
||||
(cons recipe (cons commit sha256))))))))
|
||||
recipes))
|
||||
(lambda (rcp-commits)
|
||||
(let ((idx (make-hash-table :test 'equal)))
|
||||
(mapc (lambda (rcpc)
|
||||
(puthash (car rcpc) (cdr rcpc) idx))
|
||||
rcp-commits)
|
||||
idx))))
|
||||
|
||||
(defun with-melpa-checkout (resolve)
|
||||
(let ((tmpdir (make-temp-file "melpa-" t)))
|
||||
(promise-finally
|
||||
(promise-then
|
||||
(shell-promise
|
||||
(semaphore-create 1 "dummy")
|
||||
(assocenv process-environment "MELPA_DIR" tmpdir)
|
||||
"cd $MELPA_DIR
|
||||
(git init --bare
|
||||
git remote add origin https://github.com/melpa/melpa.git
|
||||
git fetch origin) 1>&2
|
||||
echo -n $MELPA_DIR")
|
||||
(lambda (dir)
|
||||
(message "Created melpa checkout %s" dir)
|
||||
(funcall resolve dir)))
|
||||
(lambda ()
|
||||
(delete-directory tmpdir t)
|
||||
(message "Deleted melpa checkout %s" tmpdir)))))
|
||||
|
||||
(defun list-recipes (repo base-rev)
|
||||
(promise-then
|
||||
(shell-promise nil (assocenv process-environment
|
||||
"GIT_DIR" repo
|
||||
"BASE_REV" base-rev)
|
||||
"git ls-tree --name-only $BASE_REV recipes/")
|
||||
(lambda (s)
|
||||
(mapcar (lambda (n)
|
||||
(substring n 8))
|
||||
(split-string s)))))
|
||||
|
||||
;; ## Main runner
|
||||
|
||||
(defvar recipe-indexp)
|
||||
(defvar archivep)
|
||||
|
||||
(defun run-updater ()
|
||||
(message "Turning off logging to *Message* buffer")
|
||||
(setq message-log-max nil)
|
||||
(setenv "GIT_ASKPASS")
|
||||
(setenv "SSH_ASKPASS")
|
||||
(setq process-adaptive-read-buffering nil)
|
||||
|
||||
;; Indexer and Prefetcher run in parallel
|
||||
|
||||
;; Recipe Indexer
|
||||
(setq recipe-indexp
|
||||
(with-melpa-checkout
|
||||
(lambda (repo)
|
||||
(promise-then
|
||||
(promise-then
|
||||
(list-recipes repo "origin/master")
|
||||
(lambda (recipe-names)
|
||||
(promise:make-thread #'index-recipe-commits
|
||||
;; The indexer runs on a local git repository,
|
||||
;; so it is CPU bound.
|
||||
;; Adjust for core count + 2
|
||||
(semaphore-create 6 "local-indexer")
|
||||
repo "origin/master"
|
||||
;; (seq-take recipe-names 20)
|
||||
recipe-names)))
|
||||
(lambda (res)
|
||||
(message "Indexed Recipes: %d" (hash-table-count res))
|
||||
(defvar recipe-index res)
|
||||
res)
|
||||
(lambda (err)
|
||||
(message "ERROR: %s" err))))))
|
||||
|
||||
;; Prefetcher + Emitter
|
||||
(setq archivep
|
||||
(promise-then
|
||||
(promise-then (promise-all
|
||||
(list (http-get "https://melpa.org/recipes.json"
|
||||
(lambda ()
|
||||
(let ((json-object-type 'alist)
|
||||
(json-array-type 'list)
|
||||
(json-key-type 'symbol))
|
||||
(json-read))))
|
||||
(http-get "https://melpa.org/archive.json"
|
||||
(lambda ()
|
||||
(let ((json-object-type 'hash-table)
|
||||
(json-array-type 'list)
|
||||
(json-key-type 'symbol))
|
||||
(json-read))))
|
||||
(http-get "https://stable.melpa.org/archive.json"
|
||||
(lambda ()
|
||||
(let ((json-object-type 'hash-table)
|
||||
(json-array-type 'list)
|
||||
(json-key-type 'symbol))
|
||||
(json-read))))))
|
||||
(lambda (resolved)
|
||||
(message "Finished download")
|
||||
(seq-let [recipes-content archive-content stable-archive-content] resolved
|
||||
;; The prefetcher is network bound, so 64 seems a good estimate
|
||||
;; for parallel network connections
|
||||
(promise:make-thread #'emit-json (semaphore-create 64 "prefetch-pool")
|
||||
recipe-indexp
|
||||
recipes-content
|
||||
archive-content
|
||||
stable-archive-content
|
||||
(parse-previous-archive "recipes-archive-melpa.json")))))
|
||||
(lambda (buf)
|
||||
(with-current-buffer buf
|
||||
(write-file "recipes-archive-melpa.json")))
|
||||
(lambda (err)
|
||||
(message "ERROR: %s" err))))
|
||||
|
||||
;; Shutdown routine
|
||||
(make-thread
|
||||
(lambda ()
|
||||
(promise-finally archivep
|
||||
(lambda ()
|
||||
;; (message "Joining threads %s" (all-threads))
|
||||
;; (mapc (lambda (thr)
|
||||
;; (when (not (eq thr (current-thread)))
|
||||
;; (thread-join thr)))
|
||||
;; (all-threads))
|
||||
|
||||
(kill-emacs 0))))))
|
||||
4
pkgs/applications/editors/emacs/elisp-packages/update-nongnu
Executable file
4
pkgs/applications/editors/emacs/elisp-packages/update-nongnu
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell --show-trace ./emacs2nix.nix -i bash
|
||||
|
||||
exec nongnu-packages.sh --names $EMACS2NIX/names.nix -o nongnu-generated.nix
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
let
|
||||
pkgs = import ../../../../.. {};
|
||||
|
||||
emacsEnv = pkgs.emacs.pkgs.withPackages (epkgs: let
|
||||
|
||||
promise = epkgs.trivialBuild {
|
||||
pname = "promise";
|
||||
version = "1";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "bendlas";
|
||||
repo = "emacs-promise";
|
||||
rev = "4da97087c5babbd8429b5ce62a8323b9b03c6022";
|
||||
sha256 = "0yin7kj69g4zxs30pvk47cnfygxlaw7jc7chr3b36lz51yqczjsy";
|
||||
};
|
||||
};
|
||||
|
||||
semaphore = epkgs.trivialBuild {
|
||||
pname = "semaphore";
|
||||
version = "1";
|
||||
packageRequires = [ promise ];
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "webnf";
|
||||
repo = "semaphore.el";
|
||||
rev = "93802cb093073bc6a6ccd797328dafffcef248e0";
|
||||
sha256 = "09pfyp27m35sv340xarhld7xx2vv5fs5xj4418709iw6l6hpk853";
|
||||
};
|
||||
};
|
||||
|
||||
in [ promise semaphore ]);
|
||||
|
||||
in pkgs.mkShell {
|
||||
packages = [
|
||||
pkgs.git
|
||||
pkgs.nix
|
||||
pkgs.bash
|
||||
pkgs.nix-prefetch-git
|
||||
pkgs.nix-prefetch-hg
|
||||
emacsEnv
|
||||
];
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
{ lib
|
||||
, trivialBuild
|
||||
, urweb
|
||||
, cl-lib
|
||||
, flycheck
|
||||
}:
|
||||
|
||||
trivialBuild {
|
||||
pname = "urweb-mode";
|
||||
|
||||
inherit (urweb) src version;
|
||||
|
||||
packageRequires = [
|
||||
cl-lib
|
||||
flycheck
|
||||
];
|
||||
|
||||
postUnpack = ''
|
||||
sourceRoot=$sourceRoot/src/elisp
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Major mode for editing Ur/Web";
|
||||
inherit (urweb.meta) license homepage;
|
||||
maintainers = [ lib.maintainers.sternenseemann ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, trivialBuild
|
||||
, emacs
|
||||
}:
|
||||
|
||||
trivialBuild {
|
||||
pname = "youtube-dl";
|
||||
version = "0.pre+unstable=2018-10-12";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "skeeto";
|
||||
repo = "youtube-dl-emacs";
|
||||
rev = "af877b5bc4f01c04fccfa7d47a2c328926f20ef4";
|
||||
sha256 = "sha256-Etl95rcoRACDPjcTPQqYK2L+w8OZbOrTrRT0JadMdH4=";
|
||||
};
|
||||
|
||||
buildInputs = [ emacs ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Emacs youtube-dl download manager";
|
||||
homepage = "https://github.com/skeeto/youtube-dl-emacs";
|
||||
license = licenses.unlicense;
|
||||
maintainers = with maintainers; [ leungbk ];
|
||||
inherit (emacs.meta) platforms;
|
||||
};
|
||||
}
|
||||
248
pkgs/applications/editors/emacs/generic.nix
Normal file
248
pkgs/applications/editors/emacs/generic.nix
Normal file
|
|
@ -0,0 +1,248 @@
|
|||
{
|
||||
version
|
||||
, sha256
|
||||
, versionModifier ? ""
|
||||
, pname ? "emacs"
|
||||
, name ? "emacs-${version}${versionModifier}"
|
||||
, patches ? [ ]
|
||||
}:
|
||||
{ stdenv, lib, fetchurl, fetchpatch, ncurses, xlibsWrapper, libXaw, libXpm
|
||||
, Xaw3d, libXcursor, pkg-config, gettext, libXft, dbus, libpng, libjpeg, giflib
|
||||
, libtiff, librsvg, libwebp, gconf, libxml2, imagemagick, gnutls, libselinux
|
||||
, alsa-lib, cairo, acl, gpm, AppKit, GSS, ImageIO, m17n_lib, libotf
|
||||
, sigtool, jansson, harfbuzz, sqlite, nixosTests
|
||||
, dontRecurseIntoAttrs, emacsPackagesFor
|
||||
, libgccjit, targetPlatform, makeWrapper # native-comp params
|
||||
, fetchFromSavannah
|
||||
, systemd ? null
|
||||
, withX ? !stdenv.isDarwin
|
||||
, withNS ? stdenv.isDarwin
|
||||
, withGTK2 ? false, gtk2-x11 ? null
|
||||
, withGTK3 ? true, gtk3-x11 ? null, gsettings-desktop-schemas ? null
|
||||
, withXwidgets ? false, webkitgtk ? null, wrapGAppsHook ? null, glib-networking ? null
|
||||
, withMotif ? false, motif ? null
|
||||
, withSQLite3 ? false
|
||||
, withCsrc ? true
|
||||
, withWebP ? false
|
||||
, srcRepo ? true, autoreconfHook ? null, texinfo ? null
|
||||
, siteStart ? ./site-start.el
|
||||
, nativeComp ? false
|
||||
, withAthena ? false
|
||||
, withToolkitScrollBars ? true
|
||||
, withPgtk ? false
|
||||
, withXinput2 ? false
|
||||
, withImageMagick ? lib.versionOlder version "27" && (withX || withNS)
|
||||
, toolkit ? (
|
||||
if withGTK2 then "gtk2"
|
||||
else if withGTK3 then "gtk3"
|
||||
else if withMotif then "motif"
|
||||
else if withAthena then "athena"
|
||||
else "lucid")
|
||||
}:
|
||||
|
||||
assert (libXft != null) -> libpng != null; # probably a bug
|
||||
assert stdenv.isDarwin -> libXaw != null; # fails to link otherwise
|
||||
assert withNS -> !withX;
|
||||
assert withNS -> stdenv.isDarwin;
|
||||
assert (withGTK2 && !withNS) -> withX;
|
||||
assert (withGTK3 && !withNS) -> withX;
|
||||
assert withGTK2 -> !withGTK3 && gtk2-x11 != null;
|
||||
assert withGTK3 -> !withGTK2 && gtk3-x11 != null;
|
||||
assert withXwidgets -> withGTK3 && webkitgtk != null;
|
||||
|
||||
|
||||
let emacs = stdenv.mkDerivation (lib.optionalAttrs nativeComp {
|
||||
NATIVE_FULL_AOT = "1";
|
||||
LIBRARY_PATH = "${lib.getLib stdenv.cc.libc}/lib";
|
||||
} // {
|
||||
pname = pname + lib.optionalString ( !withX && !withNS && !withGTK2 && !withGTK3 ) "-nox";
|
||||
inherit version;
|
||||
|
||||
patches = patches fetchpatch;
|
||||
|
||||
src = fetchFromSavannah {
|
||||
repo = "emacs";
|
||||
rev = version;
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postPatch = lib.concatStringsSep "\n" [
|
||||
(lib.optionalString srcRepo ''
|
||||
rm -fr .git
|
||||
'')
|
||||
|
||||
# Add the name of the wrapped gvfsd
|
||||
# This used to be carried as a patch but it often got out of sync with upstream
|
||||
# and was hard to maintain for emacs-overlay.
|
||||
(lib.concatStrings (map (fn: ''
|
||||
sed -i 's#(${fn} "gvfs-fuse-daemon")#(${fn} "gvfs-fuse-daemon") (${fn} ".gvfsd-fuse-wrapped")#' lisp/net/tramp-gvfs.el
|
||||
'') [
|
||||
"tramp-compat-process-running-p"
|
||||
"tramp-process-running-p"
|
||||
]))
|
||||
|
||||
# Reduce closure size by cleaning the environment of the emacs dumper
|
||||
''
|
||||
substituteInPlace src/Makefile.in \
|
||||
--replace 'RUN_TEMACS = ./temacs' 'RUN_TEMACS = env -i ./temacs'
|
||||
''
|
||||
|
||||
''
|
||||
substituteInPlace lisp/international/mule-cmds.el \
|
||||
--replace /usr/share/locale ${gettext}/share/locale
|
||||
|
||||
for makefile_in in $(find . -name Makefile.in -print); do
|
||||
substituteInPlace $makefile_in --replace /bin/pwd pwd
|
||||
done
|
||||
''
|
||||
|
||||
# Make native compilation work both inside and outside of nix build
|
||||
(lib.optionalString nativeComp (let
|
||||
backendPath = (lib.concatStringsSep " "
|
||||
(builtins.map (x: ''\"-B${x}\"'') [
|
||||
# Paths necessary so the JIT compiler finds its libraries:
|
||||
"${lib.getLib libgccjit}/lib"
|
||||
"${lib.getLib libgccjit}/lib/gcc"
|
||||
"${lib.getLib stdenv.cc.libc}/lib"
|
||||
|
||||
# Executable paths necessary for compilation (ld, as):
|
||||
"${lib.getBin stdenv.cc.cc}/bin"
|
||||
"${lib.getBin stdenv.cc.bintools}/bin"
|
||||
"${lib.getBin stdenv.cc.bintools.bintools}/bin"
|
||||
]));
|
||||
in ''
|
||||
substituteInPlace lisp/emacs-lisp/comp.el --replace \
|
||||
"(defcustom native-comp-driver-options nil" \
|
||||
"(defcustom native-comp-driver-options '(${backendPath})"
|
||||
''))
|
||||
""
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ pkg-config makeWrapper ]
|
||||
++ lib.optionals srcRepo [ autoreconfHook texinfo ]
|
||||
++ lib.optional (withX && (withGTK3 || withXwidgets)) wrapGAppsHook;
|
||||
|
||||
buildInputs =
|
||||
[ ncurses gconf libxml2 gnutls alsa-lib acl gpm gettext jansson harfbuzz.dev ]
|
||||
++ lib.optionals stdenv.isLinux [ dbus libselinux systemd ]
|
||||
++ lib.optionals withX
|
||||
[ xlibsWrapper libXaw Xaw3d libXpm libpng libjpeg giflib libtiff libXft
|
||||
gconf cairo ]
|
||||
++ lib.optionals (withX || withNS) [ librsvg ]
|
||||
++ lib.optionals withImageMagick [ imagemagick ]
|
||||
++ lib.optionals (stdenv.isLinux && withX) [ m17n_lib libotf ]
|
||||
++ lib.optional (withX && withGTK2) gtk2-x11
|
||||
++ lib.optionals (withX && withGTK3) [ gtk3-x11 gsettings-desktop-schemas ]
|
||||
++ lib.optional (withX && withMotif) motif
|
||||
++ lib.optional withSQLite3 sqlite
|
||||
++ lib.optional withWebP libwebp
|
||||
++ lib.optionals (withX && withXwidgets) [ webkitgtk glib-networking ]
|
||||
++ lib.optionals withNS [ AppKit GSS ImageIO ]
|
||||
++ lib.optionals stdenv.isDarwin [ sigtool ]
|
||||
++ lib.optionals nativeComp [ libgccjit ];
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
configureFlags = [
|
||||
"--disable-build-details" # for a (more) reproducible build
|
||||
"--with-modules"
|
||||
] ++
|
||||
(lib.optional stdenv.isDarwin
|
||||
(lib.withFeature withNS "ns")) ++
|
||||
(if withNS
|
||||
then [ "--disable-ns-self-contained" ]
|
||||
else if withX
|
||||
then [ "--with-x-toolkit=${toolkit}" "--with-xft" "--with-cairo" ]
|
||||
else [ "--with-x=no" "--with-xpm=no" "--with-jpeg=no" "--with-png=no"
|
||||
"--with-gif=no" "--with-tiff=no" ])
|
||||
++ lib.optional withXwidgets "--with-xwidgets"
|
||||
++ lib.optional nativeComp "--with-native-compilation"
|
||||
++ lib.optional withImageMagick "--with-imagemagick"
|
||||
++ lib.optional withPgtk "--with-pgtk"
|
||||
++ lib.optional withXinput2 "--with-xinput2"
|
||||
++ lib.optional (!withToolkitScrollBars) "--without-toolkit-scroll-bars"
|
||||
;
|
||||
|
||||
installTargets = [ "tags" "install" ];
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/share/emacs/site-lisp
|
||||
cp ${siteStart} $out/share/emacs/site-lisp/site-start.el
|
||||
|
||||
$out/bin/emacs --batch -f batch-byte-compile $out/share/emacs/site-lisp/site-start.el
|
||||
|
||||
siteVersionDir=`ls $out/share/emacs | grep -v site-lisp | head -n 1`
|
||||
|
||||
rm -r $out/share/emacs/$siteVersionDir/site-lisp
|
||||
'' + lib.optionalString withCsrc ''
|
||||
for srcdir in src lisp lwlib ; do
|
||||
dstdir=$out/share/emacs/$siteVersionDir/$srcdir
|
||||
mkdir -p $dstdir
|
||||
find $srcdir -name "*.[chm]" -exec cp {} $dstdir \;
|
||||
cp $srcdir/TAGS $dstdir
|
||||
echo '((nil . ((tags-file-name . "TAGS"))))' > $dstdir/.dir-locals.el
|
||||
done
|
||||
'' + lib.optionalString withNS ''
|
||||
mkdir -p $out/Applications
|
||||
mv nextstep/Emacs.app $out/Applications
|
||||
'' + lib.optionalString (nativeComp && withNS) ''
|
||||
ln -snf $out/lib/emacs/*/native-lisp $out/Applications/Emacs.app/Contents/native-lisp
|
||||
'' + lib.optionalString nativeComp ''
|
||||
echo "Generating native-compiled trampolines..."
|
||||
# precompile trampolines in parallel, but avoid spawning one process per trampoline.
|
||||
# 1000 is a rough lower bound on the number of trampolines compiled.
|
||||
$out/bin/emacs --batch --eval "(mapatoms (lambda (s) \
|
||||
(when (subr-primitive-p (symbol-function s)) (print s))))" \
|
||||
| xargs -n $((1000/NIX_BUILD_CORES + 1)) -P $NIX_BUILD_CORES \
|
||||
$out/bin/emacs --batch -l comp --eval "(while argv \
|
||||
(comp-trampoline-compile (intern (pop argv))))"
|
||||
mkdir -p $out/share/emacs/native-lisp
|
||||
$out/bin/emacs --batch \
|
||||
--eval "(add-to-list 'native-comp-eln-load-path \"$out/share/emacs/native-lisp\")" \
|
||||
-f batch-native-compile $out/share/emacs/site-lisp/site-start.el
|
||||
'';
|
||||
|
||||
postFixup = lib.concatStringsSep "\n" [
|
||||
|
||||
(lib.optionalString (stdenv.isLinux && withX && toolkit == "lucid") ''
|
||||
patchelf --set-rpath \
|
||||
"$(patchelf --print-rpath "$out/bin/emacs"):${lib.makeLibraryPath [ libXcursor ]}" \
|
||||
"$out/bin/emacs"
|
||||
patchelf --add-needed "libXcursor.so.1" "$out/bin/emacs"
|
||||
'')
|
||||
];
|
||||
|
||||
passthru = {
|
||||
inherit nativeComp;
|
||||
pkgs = dontRecurseIntoAttrs (emacsPackagesFor emacs);
|
||||
tests = { inherit (nixosTests) emacs-daemon; };
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "The extensible, customizable GNU text editor";
|
||||
homepage = "https://www.gnu.org/software/emacs/";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ lovek323 jwiegley adisbladis ];
|
||||
platforms = platforms.all;
|
||||
|
||||
longDescription = ''
|
||||
GNU Emacs is an extensible, customizable text editor—and more. At its
|
||||
core is an interpreter for Emacs Lisp, a dialect of the Lisp
|
||||
programming language with extensions to support text editing.
|
||||
|
||||
The features of GNU Emacs include: content-sensitive editing modes,
|
||||
including syntax coloring, for a wide variety of file types including
|
||||
plain text, source code, and HTML; complete built-in documentation,
|
||||
including a tutorial for new users; full Unicode support for nearly all
|
||||
human languages and their scripts; highly customizable, using Emacs
|
||||
Lisp code or a graphical interface; a large number of extensions that
|
||||
add other functionality, including a project planner, mail and news
|
||||
reader, debugger interface, calendar, and more. Many of these
|
||||
extensions are distributed with GNU Emacs; others are available
|
||||
separately.
|
||||
'';
|
||||
};
|
||||
});
|
||||
in emacs
|
||||
124
pkgs/applications/editors/emacs/macport.nix
Normal file
124
pkgs/applications/editors/emacs/macport.nix
Normal file
|
|
@ -0,0 +1,124 @@
|
|||
{ lib, stdenv, fetchurl, ncurses, pkg-config, texinfo, libxml2, gnutls, gettext, autoconf, automake, jansson
|
||||
, AppKit, Carbon, Cocoa, IOKit, OSAKit, Quartz, QuartzCore, WebKit
|
||||
, ImageCaptureCore, GSS, ImageIO # These may be optional
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "emacs";
|
||||
version = "27.2";
|
||||
|
||||
emacsName = "emacs-${version}";
|
||||
macportVersion = "8.3";
|
||||
name = "emacs-mac-${version}-${macportVersion}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/emacs/${emacsName}.tar.xz";
|
||||
sha256 = "1ff182gjw9wqsbx1kj5gl2r5pbqhp4ar54g04j33fgz6g17cr9xl";
|
||||
};
|
||||
|
||||
macportSrc = fetchurl {
|
||||
url = "ftp://ftp.math.s.chiba-u.ac.jp/emacs/${emacsName}-mac-${macportVersion}.tar.gz";
|
||||
sha256 = "0q4lbk3nb8rz1ibmf23plgsh8sx2wvhry5bf5mivgz4m4b6s2yij";
|
||||
name = "${emacsName}-mac-${macportVersion}.tar.xz"; # It's actually compressed with xz, not gz
|
||||
};
|
||||
|
||||
hiresSrc = fetchurl {
|
||||
url = "ftp://ftp.math.s.chiba-u.ac.jp/emacs/emacs-hires-icons-3.0.tar.gz";
|
||||
sha256 = "0f2wzdw2a3ac581322b2y79rlj3c9f33ddrq9allj97r1si6v5xk";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
nativeBuildInputs = [ pkg-config autoconf automake ];
|
||||
|
||||
buildInputs = [ ncurses libxml2 gnutls texinfo gettext jansson
|
||||
AppKit Carbon Cocoa IOKit OSAKit Quartz QuartzCore WebKit
|
||||
ImageCaptureCore GSS ImageIO # may be optional
|
||||
];
|
||||
|
||||
postUnpack = ''
|
||||
mv $sourceRoot $name
|
||||
tar xf $macportSrc -C $name --strip-components=1
|
||||
mv $name $sourceRoot
|
||||
|
||||
# extract retina image resources
|
||||
tar xfv $hiresSrc --strip 1 -C $sourceRoot
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
patch -p1 < patch-mac
|
||||
substituteInPlace lisp/international/mule-cmds.el \
|
||||
--replace /usr/share/locale ${gettext}/share/locale
|
||||
|
||||
# use newer emacs icon
|
||||
cp nextstep/Cocoa/Emacs.base/Contents/Resources/Emacs.icns mac/Emacs.app/Contents/Resources/Emacs.icns
|
||||
|
||||
# Fix sandbox impurities.
|
||||
substituteInPlace Makefile.in --replace '/bin/pwd' 'pwd'
|
||||
substituteInPlace lib-src/Makefile.in --replace '/bin/pwd' 'pwd'
|
||||
|
||||
|
||||
# Reduce closure size by cleaning the environment of the emacs dumper
|
||||
substituteInPlace src/Makefile.in \
|
||||
--replace 'RUN_TEMACS = ./temacs' 'RUN_TEMACS = env -i ./temacs'
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"LDFLAGS=-L${ncurses.out}/lib"
|
||||
"--with-xml2=yes"
|
||||
"--with-gnutls=yes"
|
||||
"--with-mac"
|
||||
"--with-modules"
|
||||
"--enable-mac-app=$$out/Applications"
|
||||
];
|
||||
|
||||
CFLAGS = "-O3";
|
||||
LDFLAGS = "-O3 -L${ncurses.out}/lib";
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/share/emacs/site-lisp/
|
||||
cp ${./site-start.el} $out/share/emacs/site-lisp/site-start.el
|
||||
'';
|
||||
|
||||
# fails with:
|
||||
|
||||
# Ran 3870 tests, 3759 results as expected, 6 unexpected, 105 skipped
|
||||
# 5 files contained unexpected results:
|
||||
# lisp/url/url-handlers-test.log
|
||||
# lisp/simple-tests.log
|
||||
# lisp/files-x-tests.log
|
||||
# lisp/cedet/srecode-utest-template.log
|
||||
# lisp/net/tramp-tests.log
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "The extensible, customizable text editor";
|
||||
homepage = "https://www.gnu.org/software/emacs/";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ jwiegley matthewbauer ];
|
||||
platforms = platforms.darwin;
|
||||
|
||||
longDescription = ''
|
||||
GNU Emacs is an extensible, customizable text editor—and more. At its
|
||||
core is an interpreter for Emacs Lisp, a dialect of the Lisp
|
||||
programming language with extensions to support text editing.
|
||||
|
||||
The features of GNU Emacs include: content-sensitive editing modes,
|
||||
including syntax coloring, for a wide variety of file types including
|
||||
plain text, source code, and HTML; complete built-in documentation,
|
||||
including a tutorial for new users; full Unicode support for nearly all
|
||||
human languages and their scripts; highly customizable, using Emacs
|
||||
Lisp code or a graphical interface; a large number of extensions that
|
||||
add other functionality, including a project planner, mail and news
|
||||
reader, debugger interface, calendar, and more. Many of these
|
||||
extensions are distributed with GNU Emacs; others are available
|
||||
separately.
|
||||
|
||||
This is the "Mac port" addition to GNU Emacs 26. This provides a native
|
||||
GUI support for Mac OS X 10.6 - 10.12. Note that Emacs 23 and later
|
||||
already contain the official GUI support via the NS (Cocoa) port for
|
||||
Mac OS X 10.4 and later. So if it is good enough for you, then you
|
||||
don't need to try this.
|
||||
'';
|
||||
};
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue