diff options
author | Thiago Kenji Okada <thiagokokada@gmail.com> | 2021-11-09 15:29:42 -0300 |
---|---|---|
committer | Thiago Kenji Okada <thiagokokada@gmail.com> | 2021-11-09 17:55:13 -0300 |
commit | 7f407040debf7dd65e5a56f95bb45562e5d0c168 (patch) | |
tree | 0173f7ee159ff22858ec1e4ec32c1435d52d12fb /pkgs/applications/networking/cluster | |
parent | 77824da2196581a7b47dd353f60d1d9827ad1d7c (diff) |
terranix: use wrapProgram on terranix-doc-json
Diffstat (limited to 'pkgs/applications/networking/cluster')
-rw-r--r-- | pkgs/applications/networking/cluster/terranix/default.nix | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/pkgs/applications/networking/cluster/terranix/default.nix b/pkgs/applications/networking/cluster/terranix/default.nix index 4338dddb49f95..a8541336b3de3 100644 --- a/pkgs/applications/networking/cluster/terranix/default.nix +++ b/pkgs/applications/networking/cluster/terranix/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, jq, nix, ... }: +{ stdenv, lib, fetchFromGitHub, jq, nix, makeWrapper }: stdenv.mkDerivation rec { pname = "terranix"; @@ -11,29 +11,21 @@ stdenv.mkDerivation rec { sha256 = "sha256-HDiyJGgyDUoLnpL8N+wDm3cM/vEfYYc/p4N1kKH/kLk="; }; + nativeBuildInputs = [ makeWrapper ]; + installPhase = '' mkdir -p $out/{bin,core,modules,lib} mv bin core modules lib $out/ - mv $out/bin/terranix-doc-json $out/bin/.wrapper_terranix-doc-json - - # manual wrapper because makeWrapper expectes executables - wrapper=$out/bin/terranix-doc-json - cat <<EOF>$wrapper - #!/usr/bin/env bash - export PATH=$PATH:${jq}/bin:${nix}/bin - $out/bin/.wrapper_terranix-doc-json "\$@" - EOF - chmod +x $wrapper + wrapProgram $out/bin/terranix-doc-json \ + --prefix PATH : ${lib.makeBinPath [ jq nix ]} ''; meta = with lib; { description = "A NixOS like terraform-json generator"; homepage = "https://terranix.org"; license = licenses.gpl3; - platforms = platforms.linux ++ platforms.darwin; + platforms = platforms.unix; maintainers = with maintainers; [ mrVanDalo ]; }; - } - |