From 2380e96327ded90b7c650f9b9b6c1a7e8e95538f Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 30 Mar 2017 20:49:20 +0200 Subject: [PATCH 1/5] lambda-mod-zsh-theme: init at eceee68cf46bba9f7f42887c2128b48e8861e31b --- pkgs/shells/lambda-mod-zsh-theme/default.nix | 30 ++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/shells/lambda-mod-zsh-theme/default.nix diff --git a/pkgs/shells/lambda-mod-zsh-theme/default.nix b/pkgs/shells/lambda-mod-zsh-theme/default.nix new file mode 100644 index 000000000000..e5f43bf25a9e --- /dev/null +++ b/pkgs/shells/lambda-mod-zsh-theme/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchgit }: + +let + pkgName = "lambda-mod-zsh-theme"; + rev = "eceee68cf46bba9f7f42887c2128b48e8861e31b"; +in stdenv.mkDerivation rec { + name = "${pkgName}-${rev}"; + + src = fetchgit { + inherit rev; + + url = "https://github.com/halfo/lambda-mod-zsh-theme"; + sha256 = "1410ryc22i20na5ypa1q6f106lkjj8n1qfjmb77q4rspi0ydaiy4"; + }; + + buildPhases = [ "unpackPhase" "installPhase" ]; + + installPhase = '' + mkdir -p $out/share + cp lambda-mod.zsh-theme $out/share + ''; + + meta = with stdenv.lib; { + description = "A ZSH theme optimized for people who use Git & Unicode-compatible fonts and terminals"; + homepage = "https://github.com/halfo/lambda-mod-zsh-theme/"; + license = licenses.mit; + platforms = platforms.linux; + maintainers = [ ma27 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7b888a7d06d0..8818ac263261 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9635,6 +9635,8 @@ with pkgs; haskell-lib = haskell.lib; }; + lambda-mod-zsh-theme = callPackage ../shells/lambda-mod-zsh-theme/default.nix { }; + leksah = callPackage ../development/tools/haskell/leksah { inherit (haskellPackages) ghcWithPackages; }; From 74c14f8b28a690d3ba281e9008d584ad6e0ea72d Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 30 Mar 2017 21:04:01 +0200 Subject: [PATCH 2/5] lambda-mod-zsh-theme: remove unnecessary `rec` declaration --- pkgs/shells/lambda-mod-zsh-theme/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/shells/lambda-mod-zsh-theme/default.nix b/pkgs/shells/lambda-mod-zsh-theme/default.nix index e5f43bf25a9e..ffc321ae3995 100644 --- a/pkgs/shells/lambda-mod-zsh-theme/default.nix +++ b/pkgs/shells/lambda-mod-zsh-theme/default.nix @@ -3,7 +3,7 @@ let pkgName = "lambda-mod-zsh-theme"; rev = "eceee68cf46bba9f7f42887c2128b48e8861e31b"; -in stdenv.mkDerivation rec { +in stdenv.mkDerivation { name = "${pkgName}-${rev}"; src = fetchgit { From ea5ff16bb08a6b68dc83027ca96c29cee2b5d31c Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 30 Mar 2017 21:07:14 +0200 Subject: [PATCH 3/5] lambda-mod-zsh-theme: refactor to use `fetchFromGitHub` for source retrieval --- pkgs/shells/lambda-mod-zsh-theme/default.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/shells/lambda-mod-zsh-theme/default.nix b/pkgs/shells/lambda-mod-zsh-theme/default.nix index ffc321ae3995..bfd6a304b924 100644 --- a/pkgs/shells/lambda-mod-zsh-theme/default.nix +++ b/pkgs/shells/lambda-mod-zsh-theme/default.nix @@ -1,15 +1,15 @@ -{ stdenv, fetchgit }: +{ stdenv, fetchFromGitHub }: let - pkgName = "lambda-mod-zsh-theme"; + repo = "lambda-mod-zsh-theme"; rev = "eceee68cf46bba9f7f42887c2128b48e8861e31b"; in stdenv.mkDerivation { - name = "${pkgName}-${rev}"; + name = "${repo}-${rev}"; - src = fetchgit { - inherit rev; + src = fetchFromGitHub { + inherit rev repo; - url = "https://github.com/halfo/lambda-mod-zsh-theme"; + owner = "halfo"; sha256 = "1410ryc22i20na5ypa1q6f106lkjj8n1qfjmb77q4rspi0ydaiy4"; }; From cd56c3334e67fa40e37b1610627987dcd63a1e91 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 30 Mar 2017 21:10:05 +0200 Subject: [PATCH 4/5] lambda-mod-zsh-theme: fix broken `maintainers` expression --- pkgs/shells/lambda-mod-zsh-theme/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/shells/lambda-mod-zsh-theme/default.nix b/pkgs/shells/lambda-mod-zsh-theme/default.nix index bfd6a304b924..4096d88b1276 100644 --- a/pkgs/shells/lambda-mod-zsh-theme/default.nix +++ b/pkgs/shells/lambda-mod-zsh-theme/default.nix @@ -25,6 +25,6 @@ in stdenv.mkDerivation { homepage = "https://github.com/halfo/lambda-mod-zsh-theme/"; license = licenses.mit; platforms = platforms.linux; - maintainers = [ ma27 ]; + maintainers = with maintainers; [ ma27 ]; }; } From 3260d8cd7081686145e13810c5e59d8f68cf90a9 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sun, 9 Apr 2017 13:51:16 +0200 Subject: [PATCH 5/5] lambda-mod-zsh-theme: refactor install behavior to use `themes` dir Now it's possible to set the path of this derivation as `ZSH_CUSTOM` in the zsh configuration, so it's possible to use the theme directly from the store path. see https://github.com/robbyrussell/oh-my-zsh/wiki/Customization#overriding-and-adding-themes --- pkgs/shells/lambda-mod-zsh-theme/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/shells/lambda-mod-zsh-theme/default.nix b/pkgs/shells/lambda-mod-zsh-theme/default.nix index 4096d88b1276..e53aa28666b6 100644 --- a/pkgs/shells/lambda-mod-zsh-theme/default.nix +++ b/pkgs/shells/lambda-mod-zsh-theme/default.nix @@ -16,8 +16,8 @@ in stdenv.mkDerivation { buildPhases = [ "unpackPhase" "installPhase" ]; installPhase = '' - mkdir -p $out/share - cp lambda-mod.zsh-theme $out/share + mkdir -p $out/share/themes + cp lambda-mod.zsh-theme $out/share/themes ''; meta = with stdenv.lib; {