-
Notifications
You must be signed in to change notification settings - Fork 2
/
flake.nix
46 lines (42 loc) · 1.55 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
{
# Use `nix run` to invoke (and if necessary, build) the binaries in this package, like so:
# `$ nix run github:bitnomial/aws-ec2-knownhosts` # equivalent to the command on the next line
# `$ nix run github:bitnomial/aws-ec2-knownhosts#aws-ec2-knownhosts`
# `$ nix run github:bitnomial/aws-ec2-knownhosts#aws-ec2-pubkeys`
# `$ nix run github:bitnomial/aws-ec2-knownhosts#aws-ec2-keysync`
#
# The `nix-command` and `flakes` experimental features need to be enabled either on the CLI
# or in nix.conf
description = "aws-ec2-knownhosts";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.05";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{ self
, nixpkgs
, flake-utils
, ...
}:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
aws-ec2-knownhosts-drv = pkgs.haskell.packages.ghc924.callCabal2nix "aws-ec2-knownhosts" self { };
in
{
packages.aws-ec2-knownhosts =
pkgs.haskell.lib.justStaticExecutables aws-ec2-knownhosts-drv;
apps.default = {
type = "app";
program = "${self.packages.${system}.aws-ec2-knownhosts}/bin/aws-ec2-knownhosts";
};
apps.aws-ec2-pubkeys = {
type = "app";
program = "${self.packages.${system}.aws-ec2-knownhosts}/bin/aws-ec2-pubkeys";
};
apps.aws-ec2-keysync = {
type = "app";
program = "${self.packages.${system}.aws-ec2-knownhosts}/bin/aws-ec2-keysync";
};
});
}