nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, fetchFromGitHub, buildGoModule }:
2
3buildGoModule rec {
4 pname = "butane";
5 version = "0.21.0";
6
7 src = fetchFromGitHub {
8 owner = "coreos";
9 repo = "butane";
10 rev = "v${version}";
11 hash = "sha256-KsI+mt7nJHwrq0+GPNcI79jRy/4WEjHp2/egw0PcRLM=";
12 };
13
14 vendorHash = null;
15
16 doCheck = false;
17
18 subPackages = [ "internal" ];
19
20 ldflags = [
21 "-X github.com/coreos/butane/internal/version.Raw=v${version}"
22 ];
23
24 postInstall = ''
25 mv $out/bin/{internal,butane}
26 '';
27
28 meta = with lib; {
29 description = "Translates human-readable Butane configs into machine-readable Ignition configs";
30 mainProgram = "butane";
31 license = licenses.asl20;
32 homepage = "https://github.com/coreos/butane";
33 maintainers = with maintainers; [ elijahcaine ruuda ];
34 };
35}