diff options
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..f8ca910 --- /dev/null +++ b/flake.nix | |||
@@ -0,0 +1,37 @@ | |||
1 | { | ||
2 | inputs = { | ||
3 | nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.2311.*.tar.gz"; | ||
4 | flake-utils.url = "https://flakehub.com/f/numtide/flake-utils/0.1.88.tar.gz"; | ||
5 | }; | ||
6 | |||
7 | outputs = { self, nixpkgs, flake-utils, ... }@inputs: | ||
8 | { | ||
9 | nixosModules = rec { | ||
10 | icalproxy = import ./module self; | ||
11 | default = icalproxy; | ||
12 | }; | ||
13 | } // flake-utils.lib.eachDefaultSystem | ||
14 | (system: | ||
15 | let | ||
16 | pkgs = import nixpkgs { | ||
17 | inherit system; | ||
18 | overlays = [ ]; | ||
19 | }; | ||
20 | |||
21 | icalproxy = pkgs.buildGoModule { | ||
22 | name = "icalproxy"; | ||
23 | src = ./.; | ||
24 | vendorHash = "sha256-l/PQPEZC99umlSr6PBn/dXn2mZN4qf8YMBE8ENOm97I="; | ||
25 | }; | ||
26 | in | ||
27 | { | ||
28 | packages.icalproxy = icalproxy; | ||
29 | packages.default = self.packages.${system}.icalproxy; | ||
30 | |||
31 | devShells.default = pkgs.mkShell { | ||
32 | inputsFrom = [ icalproxy ]; | ||
33 | }; | ||
34 | |||
35 | formatter = pkgs.nixpkgs-fmt; | ||
36 | }); | ||
37 | } | ||