forked from perkeep/gphotos-cdp
-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
flake.nix
67 lines (59 loc) · 1.67 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.systems.url = "github:msfjarvis/flake-systems";
inputs.devshell.url = "github:numtide/devshell";
inputs.devshell.inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.flake-utils.inputs.systems.follows = "systems";
inputs.flake-compat.url = "github:nix-community/flake-compat";
inputs.flake-compat.flake = false;
inputs.gomod2nix.url = "github:nix-community/gomod2nix/master";
inputs.gomod2nix.inputs.nixpkgs.follows = "nixpkgs";
inputs.gomod2nix.inputs.flake-utils.follows = "flake-utils";
outputs = {
self,
nixpkgs,
devshell,
flake-utils,
gomod2nix,
...
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {
inherit system;
overlays = [devshell.overlays.default gomod2nix.overlays.default];
};
in {
packages.default = pkgs.buildGoApplication {
pname = "gphotos-cdp";
version = "1.0.0";
pwd = ./.;
src = ./.;
modules = ./gomod2nix.toml;
meta = {mainProgram = "gphotos-cdp";};
};
devShells.default = pkgs.devshell.mkShell {
bash = {interactive = "";};
env = [
{
name = "DEVSHELL_NO_MOTD";
value = 1;
}
];
packages = with pkgs; [
git
go
gomod2nix.packages.${system}.default
go-outline
gopls
gotools
(mkGoEnv {pwd = ./.;})
];
};
})
// {
overlays.default = final: _: {
gphotos-cdp = self.packages.${final.system}.default;
};
};
}