2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, makeWrapper }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-07-14 22:03:04 +00:00
|
|
|
pname = "rolespec";
|
|
|
|
version = "20161104";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nickjj";
|
|
|
|
repo = "rolespec";
|
|
|
|
rev = "d9ee530cd709168882059776c482fc37f46cb743";
|
|
|
|
sha256 = "1jkidw6aqr0zfqwmcvlpi9qa140z2pxcfsd43xm5ikx6jcwjdrzl";
|
|
|
|
};
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# 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;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/nickjj/rolespec";
|
|
|
|
description = "A test library for testing Ansible roles";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "rolespec";
|
2020-04-24 23:36:52 +00:00
|
|
|
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;
|
|
|
|
maintainers = [ maintainers.dochang ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|