2020-06-19 06:57:40 +00:00
|
|
|
{ lib, fetchFromGitHub, buildGoModule }:
|
2020-06-18 18:03:39 +00:00
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
2020-06-19 06:57:40 +00:00
|
|
|
buildGoModule rec {
|
2021-04-13 12:08:42 +00:00
|
|
|
pname = "butane";
|
|
|
|
version = "0.11.0";
|
2020-06-18 18:03:39 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "coreos";
|
2021-04-13 12:08:42 +00:00
|
|
|
repo = "butane";
|
2020-06-18 18:03:39 +00:00
|
|
|
rev = "v${version}";
|
2021-04-13 12:08:42 +00:00
|
|
|
sha256 = "1s4rkq7mj1lyi8h47jyfy3qygfxhrmpihdy8rcnn55gcy04lm0qc";
|
2020-06-18 18:03:39 +00:00
|
|
|
};
|
|
|
|
|
2020-07-18 07:21:18 +00:00
|
|
|
vendorSha256 = null;
|
2020-06-19 06:57:40 +00:00
|
|
|
|
2020-08-04 00:26:27 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2020-06-19 06:57:40 +00:00
|
|
|
subPackages = [ "internal" ];
|
|
|
|
|
2020-06-18 18:03:39 +00:00
|
|
|
buildFlagsArray = ''
|
2021-04-13 12:08:42 +00:00
|
|
|
-ldflags=-X github.com/coreos/butane/internal/version.Raw=v${version}
|
2020-06-18 18:03:39 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
2021-04-13 12:08:42 +00:00
|
|
|
mv $out/bin/{internal,butane}
|
2020-06-18 18:03:39 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2021-04-13 12:08:42 +00:00
|
|
|
description = "Translates human-readable Butane configs into machine-readable Ignition configs";
|
2020-06-18 18:03:39 +00:00
|
|
|
license = licenses.asl20;
|
2021-04-13 12:08:42 +00:00
|
|
|
homepage = "https://github.com/coreos/butane";
|
2020-06-18 18:03:39 +00:00
|
|
|
maintainers = with maintainers; [ elijahcaine ruuda ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|