-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
46 lines (42 loc) · 1.37 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
{
description = "A slack bot; mostly for wasting time, but sometimes is useful";
nixConfig = {
extra-trusted-public-keys = "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=";
extra-substituters = "https://devenv.cachix.org";
};
inputs = {
devenv.url = "github:cachix/devenv";
devenv.inputs.nixpkgs.follows = "nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
outputs = inputs @ {
self,
devenv,
flake-utils,
nixpkgs,
...
}:
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = nixpkgs.legacyPackages.${system};
packages = flake-utils.lib.flattenTree {
walbot = pkgs.buildGoModule {
pname = "walbot";
version = builtins.substring 0 8 self.lastModifiedDate;
# In 'nix develop', we don't need a copy of the source tree in the Nix store.
src = ./.;
vendorHash = "sha256-LLw8+Aws1VFdr8hI6+0BiOH6DQY2pLYotLoHMPto4SQ=";
};
};
in {
# Provide some binary packages for selected system types.
defaultApp = flake-utils.lib.mkApp {drv = packages.walbot;};
defaultPackage = packages.walbot;
devShell = devenv.lib.mkShell {
inherit inputs pkgs;
modules = [./devenv.nix];
};
}
);
}