Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3542b45

Browse files
committedAug 20, 2021
nix: make the repository a flake
Now you can build the bot using `nix build .#telegram` The discord bot is still a TODO
1 parent ec38eb9 commit 3542b45

File tree

2 files changed

+70
-0
lines changed

2 files changed

+70
-0
lines changed
 

‎flake.lock

+41
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎flake.nix

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
description = "";
3+
4+
inputs = {
5+
utils.url = "github:numtide/flake-utils";
6+
};
7+
8+
outputs = { self, nixpkgs, utils }:
9+
utils.lib.eachDefaultSystem (system: let
10+
pkgs = nixpkgs.legacyPackages."${system}";
11+
lib = pkgs.lib;
12+
in rec {
13+
# `nix build`
14+
packages.telegram = pkgs.buildGoModule rec {
15+
name = "telegram-bot";
16+
src = ./telegram-bot;
17+
18+
vendorSha256 = "sha256-NBY2T0Jj5f9XMoc0hleituKHFf+9AFq056a/EpCsuXo=";
19+
};
20+
defaultPackage = packages.telegram;
21+
22+
# TODO `nix run`
23+
24+
# `nix develop`
25+
devShell = pkgs.mkShell {
26+
nativeBuildInputs = with pkgs; [ go ];
27+
};
28+
});
29+
}

0 commit comments

Comments
 (0)
Please sign in to comment.