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