nixpkgs/pkgs/tools/admin/pulumi/default.nix
José Luis Lafuente 7622f30ed2
pulumi: install providers and add update script
Without providers (also called plugins) pulumi doesn't do much. The way
they work, if you want to use a provider, pulimi will look for it in
your PATH, and if not found it will download it. Providers are just
executables, but third party binaries usually don't work on nixos unless
they are patched with the patchelf utility. Because of that, I'm
installing some patched providers with the main pulumi binary.

I'm also adding a small script helper to generate the hashes for all the
binaries.
2019-11-04 16:03:58 +01:00

34 lines
765 B
Nix

{ lib, stdenv, fetchurl, autoPatchelfHook }:
with lib;
let
data = import ./data.nix {};
in stdenv.mkDerivation {
pname = "pulumi";
version = data.version;
postUnpack = ''
mv pulumi-* pulumi
'';
srcs = map (x: fetchurl x) data.pulumiPkgs.${stdenv.hostPlatform.system};
installPhase = ''
mkdir -p $out/bin
cp * $out/bin/
'';
buildInputs = optionals stdenv.isLinux [ autoPatchelfHook ];
meta = {
homepage = https://pulumi.io/;
description = "Pulumi is a cloud development platform that makes creating cloud programs easy and productive";
license = with licenses; [ asl20 ];
platforms = builtins.attrNames data.pulumiPkgs;
maintainers = with maintainers; [
peterromfeldhk
jlesquembre
];
};
}