From ada96fb347d81e49aafbcde83c56e2d4d0e88dd8 Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Tue, 14 Sep 2021 21:46:43 -0300 Subject: [PATCH] emacsPackages.color-theme-solarized: use trivialBuild --- .../color-theme-solarized/default.nix | 39 +++++++++++-------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/pkgs/applications/editors/emacs/elisp-packages/color-theme-solarized/default.nix b/pkgs/applications/editors/emacs/elisp-packages/color-theme-solarized/default.nix index ce85e9be4e9a..feb6c0fa86ca 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/color-theme-solarized/default.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/color-theme-solarized/default.nix @@ -1,33 +1,38 @@ -{lib, stdenv, fetchzip, emacs, color-theme}: -let - commit = "f3ca8902ea056fb8e46cb09f09c96294e31cd4ee"; -in -stdenv.mkDerivation { - name = "color-theme-solarized-1.0.0"; +{ lib +, trivialBuild +, fetchFromGitHub +, emacs +, color-theme +}: - src = fetchzip { +trivialBuild { + pname = "color-theme-solarized"; + version = "0.0.0+unstable=2017-10-24"; - url = "https://github.com/sellout/emacs-color-theme-solarized/archive/${commit}.zip"; - sha256 = "16d7adqi07lzzr0qipl1fbag9l8kiyr3xrqxi528pimcisbg85d3"; + src = fetchFromGitHub { + owner = "sellout"; + repo = "emacs-color-theme-solarized"; + rev = "f3ca8902ea056fb8e46cb09f09c96294e31cd4ee"; + hash = "sha256-oxX0lo6sxotEiR3nPrKPE9H01HKB3ohB/p8eEHFTp5k="; }; buildInputs = [ emacs ]; propagatedUserEnvPkgs = [ color-theme ]; buildPhase = '' - emacs -L . -L ${color-theme}/share/emacs/site-lisp/elpa/color-theme-* --batch -f batch-byte-compile *.el - ''; + runHook preBuild - installPhase = '' - mkdir -p $out/share/emacs/site-lisp - install *.el* $out/share/emacs/site-lisp + emacs -L . -L ${color-theme}/share/emacs/site-lisp/elpa/color-theme-* \ + --batch -f batch-byte-compile *.el + + runHook postBuild ''; meta = with lib; { - description = "Precision colors for machines and people"; homepage = "http://ethanschoonover.com/solarized"; - maintainers = [ maintainers.samuelrivas ]; + description = "Precision colors for machines and people; Emacs implementation"; license = licenses.mit; - platforms = platforms.all; + maintainers = with maintainers; [ samuelrivas AndersonTorres ]; + inherit (emacs.meta) platforms; }; }