From eb95f34464f1fa3a5740676e70b204c804ae7607 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 12 Jan 2020 19:49:13 -0500 Subject: [PATCH] Add dev/zsh module & zunit package --- modules/dev/zsh.nix | 8 ++++++++ packages/zunit.nix | 25 +++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 modules/dev/zsh.nix create mode 100644 packages/zunit.nix diff --git a/modules/dev/zsh.nix b/modules/dev/zsh.nix new file mode 100644 index 00000000..fc68965f --- /dev/null +++ b/modules/dev/zsh.nix @@ -0,0 +1,8 @@ +{ config, lib, pkgs, ... }: + +{ + my.packages = with pkgs; [ + shellcheck + (callPackage (import {})) + ]; +} diff --git a/packages/zunit.nix b/packages/zunit.nix new file mode 100644 index 00000000..280cedf6 --- /dev/null +++ b/packages/zunit.nix @@ -0,0 +1,25 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + version = "0.8.2"; + pname = "zunit"; + + src = fetchurl { + url = "https://github.com/zunit-zsh/zunit/releases/download/v${version}/zunit"; + sha256 = "1bmp3qf14509swpxin4j9f98n05pdilzapjm0jdzbv0dy3hn20ix"; + }; + + phases = "installPhase"; + + installPhase = '' + outdir=$out/share/zunit + mkdir -p $outdir + cp $src $outdir/antigen.zsh + ''; + + meta = { + description = "ZUnit is a powerful unit testing framework for ZSH"; + homepage = https://zunit.xyz/; + license = stdenv.lib.licenses.mit; + }; +}