2021-11-09 18:29:42 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, jq, nix, makeWrapper }:
|
2020-09-26 19:15:57 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "terranix";
|
2021-11-07 08:43:34 +00:00
|
|
|
version = "2.5.0";
|
2020-09-26 19:15:57 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mrVanDalo";
|
|
|
|
repo = "terranix";
|
|
|
|
rev = version;
|
2021-11-07 08:43:34 +00:00
|
|
|
sha256 = "sha256-HDiyJGgyDUoLnpL8N+wDm3cM/vEfYYc/p4N1kKH/kLk=";
|
2020-09-26 19:15:57 +01:00
|
|
|
};
|
|
|
|
|
2021-11-09 18:29:42 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2020-09-26 19:15:57 +01:00
|
|
|
installPhase = ''
|
2021-11-07 08:43:34 +00:00
|
|
|
mkdir -p $out/{bin,core,modules,lib}
|
2020-09-26 19:15:57 +01:00
|
|
|
mv bin core modules lib $out/
|
2021-11-07 08:43:34 +00:00
|
|
|
|
2021-11-09 18:29:42 +00:00
|
|
|
wrapProgram $out/bin/terranix-doc-json \
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ jq nix ]}
|
2020-09-26 19:15:57 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-09-26 19:15:57 +01:00
|
|
|
description = "A NixOS like terraform-json generator";
|
|
|
|
homepage = "https://terranix.org";
|
|
|
|
license = licenses.gpl3;
|
2021-11-09 18:29:42 +00:00
|
|
|
platforms = platforms.unix;
|
2020-09-26 19:15:57 +01:00
|
|
|
maintainers = with maintainers; [ mrVanDalo ];
|
|
|
|
};
|
|
|
|
}
|