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