about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/shellspec/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/misc/shellspec/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/misc/shellspec/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/misc/shellspec/default.nix b/nixpkgs/pkgs/tools/misc/shellspec/default.nix
new file mode 100644
index 000000000000..27eead6e1c3a
--- /dev/null
+++ b/nixpkgs/pkgs/tools/misc/shellspec/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "shellspec";
+  version = "0.28.1";
+
+  src = fetchFromGitHub {
+    owner = "shellspec";
+    repo = pname;
+    rev = version;
+    sha256 = "1ib5qp29f2fmivwnv6hq35qhvdxz42xgjlkvy0i3qn758riyqf46";
+  };
+
+  makeFlags = [ "PREFIX=${placeholder "out"}" ];
+
+  checkPhase = ''
+    ./shellspec --no-banner --task fixture:stat:prepare
+    ./shellspec --no-banner spec --jobs "$(nproc)"
+  '';
+
+  # "Building" the script happens in Docker
+  dontBuild = true;
+
+  meta = with lib; {
+    description =
+      "A full-featured BDD unit testing framework for bash, ksh, zsh, dash and all POSIX shells";
+    homepage = "https://shellspec.info/";
+    changelog =
+      "https://github.com/shellspec/shellspec/releases/tag/${version}";
+    license = licenses.mit;
+    maintainers = with maintainers; [ j0hax ];
+    platforms = platforms.unix;
+  };
+}