about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/cluster/terraspace/default.nix
blob: da45541108f6939d0280cd12998e8387174832a5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ stdenv, lib, bundlerEnv, bundlerUpdateScript, makeWrapper, ruby }:
let
  rubyEnv = bundlerEnv {
    inherit ruby;
    name = "terraspace";
    gemdir  = ./.;
  };
in stdenv.mkDerivation {
  pname = "terraspace";
  version = (import ./gemset.nix).terraspace.version;

  nativeBuildInputs = [ makeWrapper ];

  dontUnpack = true;

  installPhase = ''
    mkdir -p $out/bin
    makeWrapper ${rubyEnv}/bin/terraspace $out/bin/terraspace
    wrapProgram $out/bin/terraspace \
      --prefix PATH : ${lib.makeBinPath [ rubyEnv.ruby ]}
  '';

  passthru.updateScript = bundlerUpdateScript "terraspace";

  meta = with lib; {
    description = "Terraform framework that provides an organized structure, and keeps your code DRY";
    mainProgram = "terraspace";
    homepage    = "https://github.com/boltops-tools/terraspace";
    license     = licenses.asl20;
    platforms   = ruby.meta.platforms;
    maintainers = with maintainers; [ mislavzanic ];
  };
}