2020-04-24 23:36:52 +00:00
|
|
|
{ lib, fetchFromGitHub, buildGoPackage }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
buildGoPackage rec {
|
|
|
|
pname = "ct";
|
2020-06-15 15:56:04 +00:00
|
|
|
version = "0.9.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
goPackagePath = "github.com/coreos/container-linux-config-transpiler";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "coreos";
|
|
|
|
repo = "container-linux-config-transpiler";
|
|
|
|
rev = "v${version}";
|
2020-06-15 15:56:04 +00:00
|
|
|
sha256="1w6nvgrl5qp3ci9igflk9dlk3020psv5m4f3p57f3qcx9vrcl4lw";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-08-27 14:25:00 +00:00
|
|
|
ldflags = [
|
|
|
|
"-X ${goPackagePath}/internal/version.Raw=v${version}"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2020-05-15 21:57:56 +00:00
|
|
|
mv $out/bin/{internal,ct}
|
|
|
|
rm $out/bin/tools
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Convert a Container Linux Config into Ignition";
|
|
|
|
license = licenses.asl20;
|
|
|
|
homepage = "https://github.com/coreos/container-linux-config-transpiler";
|
|
|
|
maintainers = with maintainers; [elijahcaine];
|
|
|
|
platforms = with platforms; unix;
|
|
|
|
};
|
|
|
|
}
|