From 29c2135a2784e62bc815b26942a18c9100b03b3f Mon Sep 17 00:00:00 2001 From: Sebastian Jordan Date: Sat, 15 May 2021 18:45:05 +0200 Subject: [PATCH] cask: Add build phase hooks and install phase hooks Add the pre and post phase hooks was done to fix the broken shebangs of the cask executable. --- pkgs/development/tools/cask/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/cask/default.nix b/pkgs/development/tools/cask/default.nix index 1c5f316cea9d..f9e7d215f320 100644 --- a/pkgs/development/tools/cask/default.nix +++ b/pkgs/development/tools/cask/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, python3, emacs }: +{ lib, stdenv, python3, emacs, bash }: stdenv.mkDerivation rec { pname = "cask"; @@ -13,15 +13,19 @@ stdenv.mkDerivation rec { noflet ert-async shell-split-string git package-build ] ++ [ python3 + bash ]; strictDeps = true; buildPhase = '' + runHook preBuild emacs --batch -L . -f batch-byte-compile cask.el cask-cli.el + runHook postBuild ''; installPhase = '' + runHook preInstall mkdir -p $out/bin mkdir -p $out/templates mkdir -p $out/share/emacs/site-lisp/cask/bin @@ -30,6 +34,7 @@ stdenv.mkDerivation rec { install -Dm644 templates/* $out/templates/ touch $out/.no-upgrade ln -s $out/share/emacs/site-lisp/cask/bin/cask $out/bin/cask + runHook postInstall ''; meta = with lib; {