From 771d1bd8658505e3aeae7b3eba3835fef033764f Mon Sep 17 00:00:00 2001 From: Jascha Geerds Date: Thu, 18 Sep 2014 00:46:45 +0200 Subject: [PATCH] Add "cask" package --- .../editors/emacs-modes/cask/default.nix | 47 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 49 insertions(+) create mode 100644 pkgs/applications/editors/emacs-modes/cask/default.nix diff --git a/pkgs/applications/editors/emacs-modes/cask/default.nix b/pkgs/applications/editors/emacs-modes/cask/default.nix new file mode 100644 index 00000000000..90c32f0e2bc --- /dev/null +++ b/pkgs/applications/editors/emacs-modes/cask/default.nix @@ -0,0 +1,47 @@ +{ stdenv, fetchgit, emacs, python }: + +stdenv.mkDerivation rec { + name = "cask-0.7.2"; + + src = fetchgit { + url = "https://github.com/cask/cask.git"; + rev = "8d667e1ce3f3aa817a7b996f02058b2441f83958"; + sha256 = "08brrdyz7zsw134zwf4dyj6bj2glflszssfq8vya3mh01s38mfri"; + }; + + buildInputs = [ emacs python ]; + + # byte-compiling emacs files automatically triggers cask's bootstrap + # mechanism, what we don't want. + dontBuild = true; + + installPhase = '' + install -d "$out/share/emacs/site-lisp" + install cask*.el* "$out/share/emacs/site-lisp" + + install -d "$out/bin" + install bin/cask "$out/bin" + + # In order to work with cask's hard coded file paths (during bootstrap), + # we have to create these links. + ln -s "$out/share/emacs/site-lisp/"* "$out" + + # This file disables cask's self-updating function. + touch "$out/.no-upgrade" + ''; + + meta = with stdenv.lib; { + description = "Project management tool 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. + ''; + homepage = "https://github.com/cask/cask"; + license = licenses.gpl3Plus; + platforms = platforms.all; + maintainers = [ maintainers.jgeerds ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b58114113bb..d336d941c5b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8653,6 +8653,8 @@ let writeGood = callPackage ../applications/editors/emacs-modes/writegood { }; xmlRpc = callPackage ../applications/editors/emacs-modes/xml-rpc { }; + + cask = callPackage ../applications/editors/emacs-modes/cask { }; }; emacs24Packages = recurseIntoAttrs (emacsPackages emacs24 pkgs.emacs24Packages);