forked from kartoza/charts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
59 lines (59 loc) · 1.33 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
let
bootstrap = import <nixpkgs> {};
pinned-pkgs = import (bootstrap.fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
# branch@date: master@2021-02-23
rev = "11cd34cd592f917bab5f42e2b378ab329dee3bcf";
sha256 = "sha256:1mgga54np22csagzaxfjq5hrgyv8y4igrl3f6z24fb39rvvx236w";
}) {};
in
{
pkgs ? pinned-pkgs }:
let
# helm-docs generator
helm-docs = import ./nix/helm-docs.nix {
inherit pkgs;
};
# chart-testing tools in a container
ct-in-container = pkgs.stdenv.mkDerivation rec {
name = "ct";
version = "latest";
nativeBuildInputs = [ pkgs.makeWrapper ];
src = ./scripts;
installPhase = ''
mkdir -p $out/bin
cp -f $src/ct.sh $out/bin/.ct.sh
chmod +x $out/bin/.ct.sh
makeWrapper $out/bin/.ct.sh $out/bin/ct
'';
};
# chart-testing tools as binary
ct-bin = import ./nix/chart-testing.nix {
inherit pkgs;
};
# python-packages
python = import ./nix/python.nix {
inherit pkgs;
};
in
pkgs.stdenv.mkDerivation rec {
pname = "charts-devenv";
version = "1.0";
src = ./nix;
propagatedBuildInputs = [
pkgs.direnv
pkgs.nix-direnv
pkgs.makeWrapper
pkgs.kubectl
pkgs.kubernetes-helm
helm-docs
ct-bin
python
];
dontInstall = true;
meta = {
description = "Development environment for Rancher/Helm chart in this repo";
maintainers = [ "Rizky Maulana Nugraha <lana.pcfre@gmail.com>" ];
};
}