-
Notifications
You must be signed in to change notification settings - Fork 14
/
flake.nix
49 lines (47 loc) · 1.51 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
{
description =
"gosmee — command line server and client for webhooks deliveries (and https://smee.io)";
inputs.utils.url = "github:numtide/flake-utils";
inputs.nixpkgs.url = "github:NixOS/nixpkgs";
outputs = { self, nixpkgs, utils }:
let
# Generate a user-friendly version number.
version = self.rev or (builtins.substring 0 8 self.lastModifiedDate);
in utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] (system:
let
pkgs = nixpkgs.legacyPackages.${system};
gosmee = pkgs.callPackage ./default.nix {
packageSrc = self;
buildGoModule = pkgs.buildGo122Module;
version = version;
};
in {
packages = {
gosmee = gosmee;
default = self.packages.${system}.gosmee;
};
apps = {
gosmee = utils.lib.mkApp {
drv = self.packages.${system}.gosmee;
name = "gosmee";
};
default = self.apps.${system}.gosmee;
};
# FIXME: fix the overlay and nix flake check
# overlays = {
# default = final: prev: { gosmee = gosmee; };
# };
devShell = pkgs.mkShell {
nativeBuildInputs = [
pkgs.go_1_22
pkgs.gnumake
pkgs.pre-commit # needed for pre-commit install
pkgs.git # needed for pre-commit install
pkgs.yamllint # needed for pre-commit install
];
shellHook = ''
pre-commit install
'';
};
});
}