-
Notifications
You must be signed in to change notification settings - Fork 2
/
flake.nix
40 lines (33 loc) · 1.12 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
# SPDX-FileCopyrightText: 2020 Serokell <https://serokell.io/>
#
# SPDX-License-Identifier: MPL-2.0
{
description = "";
inputs.nixpkgs.url = "github:serokell/nixpkgs";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] (system: {
packages = {
upload-daemon =
nixpkgs.legacyPackages.${system}.haskellPackages.callCabal2nix
"upload-daemon" ./. { };
};
defaultPackage = self.packages.${system}.upload-daemon;
defaultApp = {
type = "app";
program = "${self.defaultPackage.${system}}/bin/upload-daemon";
};
checks = {
build = self.defaultPackage.${system};
} // (import ./test {
inherit self system;
pkgs = nixpkgs.legacyPackages.${system};
nixosPath = "${nixpkgs}/nixos";
});
devShell = nixpkgs.legacyPackages.${system}.mkShell {
inputsFrom = [ self.packages.${system}.upload-daemon.env ];
};
}) // {
nixosModules.upload-daemon = import ./service.nix self;
};
}