uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
48
pkgs/tools/misc/tfk8s/default.nix
Normal file
48
pkgs/tools/misc/tfk8s/default.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub, callPackage }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "tfk8s";
|
||||
version = "0.1.7";
|
||||
tag = "v${version}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jrhouston";
|
||||
repo = "tfk8s";
|
||||
rev = tag;
|
||||
sha256 = "0mkfggwjrsp0rzh7ll6nmp9kqcw4fl8q81vk67z5mbd276dkyxrb";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-6sMPpizrjM/UIxrAI2KQJy9uxzsjZGrSlQXjvL4wkQg=";
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X main.toolVersion=${tag}"
|
||||
"-X main.builtBy=nixpkgs"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
$out/bin/tfk8s --version | grep ${tag} > /dev/null
|
||||
'';
|
||||
|
||||
passthru.tests = {
|
||||
sample1 = callPackage ./tests/sample1 { };
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "An utility to convert Kubernetes YAML manifests to Terraform's HCL format";
|
||||
license = licenses.mit;
|
||||
longDescription = ''
|
||||
tfk8s is a tool that makes it easier to work with the Terraform Kubernetes Provider.
|
||||
If you want to copy examples from the Kubernetes documentation or migrate existing YAML manifests and use them with Terraform without having to convert YAML to HCL by hand, this tool is for you.
|
||||
Features:
|
||||
* Convert a YAML file containing multiple manifests.
|
||||
* Strip out server side fields when piping kubectl get $R -o yaml | tfk8s --strip
|
||||
'';
|
||||
homepage = "https://github.com/jrhouston/tfk8s/";
|
||||
maintainers = with maintainers; [ bryanasdev000 ];
|
||||
};
|
||||
}
|
||||
11
pkgs/tools/misc/tfk8s/tests/sample1/default.nix
Normal file
11
pkgs/tools/misc/tfk8s/tests/sample1/default.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ runCommandCC, tfk8s }:
|
||||
|
||||
runCommandCC "tfk8s-test-sample1" {
|
||||
buildInputs = [
|
||||
tfk8s
|
||||
];
|
||||
meta.timeout = 60;
|
||||
}
|
||||
''
|
||||
cmp <(${tfk8s}/bin/tfk8s -f ${./input.yaml}) ${./output.tf} > $out
|
||||
''
|
||||
7
pkgs/tools/misc/tfk8s/tests/sample1/input.yaml
Normal file
7
pkgs/tools/misc/tfk8s/tests/sample1/input.yaml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: test
|
||||
data:
|
||||
TEST: test
|
||||
12
pkgs/tools/misc/tfk8s/tests/sample1/output.tf
Normal file
12
pkgs/tools/misc/tfk8s/tests/sample1/output.tf
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
resource "kubernetes_manifest" "configmap_test" {
|
||||
manifest = {
|
||||
"apiVersion" = "v1"
|
||||
"data" = {
|
||||
"TEST" = "test"
|
||||
}
|
||||
"kind" = "ConfigMap"
|
||||
"metadata" = {
|
||||
"name" = "test"
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue