-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
68 lines (55 loc) · 1.97 KB
/
flake.nix
File metadata and controls
68 lines (55 loc) · 1.97 KB
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
{
description = "instant-bosh - A containerized BOSH director for local development and testing";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
packages = {
default = self.packages.${system}.ibosh;
ibosh = pkgs.buildGoModule {
pname = "ibosh";
version = "0.1.0";
src = ./.;
vendorHash = "sha256-joiuLlTgl156ZhLWICjfJhSYK3LRuWhOaTDn+1kMTck=";
subPackages = [ "cmd/ibosh" ];
ldflags = [ "-s" "-w" ];
# Install shell completions
postInstall = ''
installShellCompletion --cmd ibosh \
--bash <($out/bin/ibosh --generate-bash-completion) \
--zsh <($out/bin/ibosh --generate-zsh-completion) \
--fish <($out/bin/ibosh --generate-fish-completion)
'';
nativeBuildInputs = [ pkgs.installShellFiles ];
meta = with pkgs.lib; {
description = "instant-bosh CLI - Manage containerized BOSH directors";
homepage = "https://github.com/rkoster/instant-bosh";
license = licenses.bsl11;
maintainers = [ ];
mainProgram = "ibosh";
};
};
};
# Development shell with dependencies
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
go
];
};
# Apps for easy running
apps = {
default = self.apps.${system}.ibosh;
ibosh = {
type = "app";
program = "${self.packages.${system}.ibosh}/bin/ibosh";
};
};
}
);
}