summary refs log tree commit diff
path: root/pkgs/development/tools
diff options
context:
space:
mode:
authorDesmond O. Chang <dochang@gmail.com>2016-02-11 19:03:47 +0800
committerDesmond O. Chang <dochang@gmail.com>2016-02-17 05:46:55 +0800
commitc7ec0f6f2f75585273b1409aa1ee7cb4637c5a6a (patch)
tree9657233c2afba6ed1aa0b31906fd55a57fd2edab /pkgs/development/tools
parentb7b696e534bb3c4ae70ec2a80338c3a62186b2ec (diff)
downloadnixlib-c7ec0f6f2f75585273b1409aa1ee7cb4637c5a6a.tar
nixlib-c7ec0f6f2f75585273b1409aa1ee7cb4637c5a6a.tar.gz
nixlib-c7ec0f6f2f75585273b1409aa1ee7cb4637c5a6a.tar.bz2
nixlib-c7ec0f6f2f75585273b1409aa1ee7cb4637c5a6a.tar.lz
nixlib-c7ec0f6f2f75585273b1409aa1ee7cb4637c5a6a.tar.xz
nixlib-c7ec0f6f2f75585273b1409aa1ee7cb4637c5a6a.tar.zst
nixlib-c7ec0f6f2f75585273b1409aa1ee7cb4637c5a6a.zip
rolespec: init at 20160105
Diffstat (limited to 'pkgs/development/tools')
-rw-r--r--pkgs/development/tools/misc/rolespec/default.nix48
1 files changed, 48 insertions, 0 deletions
diff --git a/pkgs/development/tools/misc/rolespec/default.nix b/pkgs/development/tools/misc/rolespec/default.nix
new file mode 100644
index 000000000000..ccfe19496c15
--- /dev/null
+++ b/pkgs/development/tools/misc/rolespec/default.nix
@@ -0,0 +1,48 @@
+{ stdenv, fetchFromGitHub, makeWrapper }:
+
+stdenv.mkDerivation rec {
+
+  name = "rolespec-${meta.version}";
+
+  src = fetchFromGitHub {
+    owner = "nickjj";
+    repo = "rolespec";
+    rev = "64a2092773b77f7a888522ceddd815e97b129321";
+    sha256 = "1867acxy18a3cgi84iwsp37sxglaljn1dq50amahp5zkmd8x8vnz";
+    inherit name;
+  };
+
+  buildInputs = [ makeWrapper ];
+
+  # The default build phase (`make`) runs the test code. It's difficult to do
+  # the test in the build environment because it depends on the system package
+  # managers (apt/yum/pacman). We simply skip this phase since RoleSpec is
+  # shell based.
+  dontBuild = true;
+
+  # Wrap the program because `ROLESPEC_LIB` defaults to
+  # `/usr/local/lib/rolespec`.
+  installPhase = ''
+    make install PREFIX=$out
+    wrapProgram $out/bin/rolespec --set ROLESPEC_LIB $out/lib/rolespec
+  '';
+
+  # Since RoleSpec installs the shell script files in `lib` directory, the
+  # fixup phase shows some warnings. Disable these actions.
+  dontPatchELF = true;
+  dontStrip = true;
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/nickjj/rolespec";
+    description = "A test library for testing Ansible roles";
+    longDescription = ''
+      A shell based test library for Ansible that works both locally and over
+      Travis-CI.
+    '';
+    downloadPage = "https://github.com/nickjj/rolespec";
+    license = licenses.gpl3;
+    version = "20160105";
+    maintainers = [ maintainers.dochang ];
+  };
+
+}