2021-05-15 18:45:05 +02:00
|
|
|
{ lib, stdenv, python3, emacs, bash }:
|
2019-03-31 23:18:17 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "cask";
|
2019-03-31 23:18:17 +02:00
|
|
|
|
2020-12-18 04:46:05 +01:00
|
|
|
inherit (emacs.pkgs.melpaStablePackages.cask) src version;
|
2019-03-31 23:18:17 +02:00
|
|
|
|
|
|
|
doCheck = true;
|
2019-09-21 11:43:17 +02:00
|
|
|
|
2020-12-18 04:46:05 +01:00
|
|
|
nativeBuildInputs = [ emacs ];
|
|
|
|
buildInputs = with emacs.pkgs; [
|
2019-04-11 05:47:30 +02:00
|
|
|
s f dash ansi ecukes servant ert-runner el-mock
|
|
|
|
noflet ert-async shell-split-string git package-build
|
2019-09-21 11:43:17 +02:00
|
|
|
] ++ [
|
2021-03-25 11:21:54 +01:00
|
|
|
python3
|
2021-05-15 18:45:05 +02:00
|
|
|
bash
|
2019-04-11 05:47:30 +02:00
|
|
|
];
|
2019-09-21 11:43:17 +02:00
|
|
|
|
2021-03-25 11:21:54 +01:00
|
|
|
strictDeps = true;
|
|
|
|
|
2019-04-11 02:37:04 +02:00
|
|
|
buildPhase = ''
|
2021-05-15 18:45:05 +02:00
|
|
|
runHook preBuild
|
2019-04-11 02:37:04 +02:00
|
|
|
emacs --batch -L . -f batch-byte-compile cask.el cask-cli.el
|
2021-05-15 18:45:05 +02:00
|
|
|
runHook postBuild
|
2019-04-11 02:37:04 +02:00
|
|
|
'';
|
2019-03-31 23:18:17 +02:00
|
|
|
|
|
|
|
installPhase = ''
|
2021-05-15 18:45:05 +02:00
|
|
|
runHook preInstall
|
2019-03-31 23:18:17 +02:00
|
|
|
mkdir -p $out/bin
|
|
|
|
mkdir -p $out/templates
|
2019-04-11 02:37:04 +02:00
|
|
|
mkdir -p $out/share/emacs/site-lisp/cask/bin
|
|
|
|
install -Dm644 *.el *.elc $out/share/emacs/site-lisp/cask
|
|
|
|
install -Dm755 bin/cask $out/share/emacs/site-lisp/cask/bin
|
2019-03-31 23:18:17 +02:00
|
|
|
install -Dm644 templates/* $out/templates/
|
|
|
|
touch $out/.no-upgrade
|
2019-04-11 02:37:04 +02:00
|
|
|
ln -s $out/share/emacs/site-lisp/cask/bin/cask $out/bin/cask
|
2021-05-15 18:45:05 +02:00
|
|
|
runHook postInstall
|
2019-03-31 23:18:17 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-23 13:26:19 +01:00
|
|
|
meta = with lib; {
|
2019-03-31 23:18:17 +02:00
|
|
|
description = "Project management for Emacs";
|
|
|
|
longDescription = ''
|
|
|
|
Cask is a project management tool for Emacs that helps automate the
|
|
|
|
package development cycle; development, dependencies, testing, building,
|
|
|
|
packaging and more.
|
|
|
|
Cask can also be used to manage dependencies for your local Emacs configuration.
|
|
|
|
'';
|
|
|
|
|
2019-09-21 11:43:17 +02:00
|
|
|
homepage = "https://cask.readthedocs.io/en/latest/index.html";
|
2019-03-31 23:18:17 +02:00
|
|
|
license = licenses.gpl3Plus;
|
2020-11-28 19:48:45 +01:00
|
|
|
platforms = platforms.all;
|
2019-03-31 23:18:17 +02:00
|
|
|
maintainers = [ maintainers.flexw ];
|
|
|
|
};
|
|
|
|
}
|