Add dev/zsh module & zunit package

This commit is contained in:
Henrik Lissner 2020-01-12 19:49:13 -05:00
parent b86d016371
commit eb95f34464
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 33 additions and 0 deletions

8
modules/dev/zsh.nix Normal file
View file

@ -0,0 +1,8 @@
{ config, lib, pkgs, ... }:
{
my.packages = with pkgs; [
shellcheck
(callPackage (import <my/packages/zunit.nix> {}))
];
}

25
packages/zunit.nix Normal file
View file

@ -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;
};
}