Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- { stdenv, fetchFromGitHub, emacs }:
- let version = "0.2";
- in stdenv.mkDerivation {
- name = "spacemacs-funcs-${version}";
- srcs = [
- (fetchFromGitHub {
- owner = "syl20bnr";
- repo = "spacemacs";
- rev = "200.9";
- sha256 = "81e8fc56421e00405cba2d78f8b5e14b1d9e8e23803dcf43eb8e89b72273ea1b";
- })
- (fetchFromGitHub {
- owner = "WhittlesJr";
- repo = "spacemacs-functions";
- rev = "0.2";
- sha256 = "e653e96a7aea92762841bc5eed968ce514e2e4e8ee1a919abb85e427f04bd27c";
- })
- ];
- buildInputs = [ emacs ];
- # The following is ported from https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=emacs-spacemacs-funcs.
- buildPhase = ''
- emacs -q --no-splash -batch -L . -f batch-byte-compile spacemacs-funcs.el
- cd "spacemacs-$version"
- shopt -s globstar
- shopt -s extglob
- emacs -q --no-splash -batch -L . -f batch-byte-compile {core,layers}/**/*funcs*.el
- '';
- installPhase = ''
- dest="$out/share/emacs/site-lisp"
- install -d $dest
- install -m644 spacemacs-funcs.el{c,} $dest
- cd "spacemacs-$version"
- shopt -s globstar
- shopt -s extglob
- find {core,layers}/ -name *funcs.el* -exec bash -c 'file=${1#./}; install -m644 "$file" "$dest${file//\//_}"' _ '{}' \;
- '';
- meta = {
- description = "Useful functions from the Spacemacs project";
- homepage = https://github.com/WhittlesJr/spacemacs-functions;
- license = stdenv.lib.licenses.gpl3;
- platforms = stdenv.lib.platforms.all;
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement