-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
88 lines (73 loc) · 2.14 KB
/
flake.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
{
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/21.11";
utils.url = "github:gytis-ivaskevicius/flake-utils-plus";
};
outputs = inputs@{ self, utils, ... }:
utils.lib.mkFlake {
inherit self inputs;
outputsBuilder = channels:
let
pkgs = channels.nixpkgs;
inherit (pkgs)
lib
python39
python39Packages
gnugrep
findutils
nodejs-17_x
helm
kubectl
jq;
inherit (python39Packages) buildPythonPackage fetchPypi;
# A dependency of `openapi2jsonschema`
click = python39Packages.click.overrideAttrs (oldAttrs: rec {
pname = "click";
version = "7.2.1";
src = fetchPypi {
inherit pname version;
sha256 = "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj";
};
});
# This package isn't available in NixPkgs yet
openapi2jsonschema = buildPythonPackage rec {
pname = "openapi2jsonschema";
version = "0.9.1";
format = "pyproject";
src = fetchPypi {
inherit pname version;
sha256 = "049q3z63anjn6vzgshbfnzcf9pb6y942vabq938zvi3fnm8lips9";
};
propagatedBuildInputs = with python39Packages; [
poetry
colorama
pyyaml
jsonref
click
];
meta = with lib; {
description =
"A utility to extract JSON Schema from a valid OpenAPI specification.";
homepage = "https://github.com/garethr/openapi2jsonschema";
license = licenses.asl20;
maintainer = [ ];
};
};
in
{
devShell = pkgs.mkShell {
buildInputs = [
python39
openapi2jsonschema
gnugrep
findutils
nodejs-17_x
helm
kubectl
jq
];
};
};
};
}