mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-05-24 01:00:49 +00:00
Add flake
This commit is contained in:
parent
b9776bddde
commit
6f84441823
4 changed files with 112 additions and 0 deletions
35
flake.nix
Normal file
35
flake.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
description = "A discord bot for Dự Tuyển Tổng Hợp server";
|
||||
inputs = {
|
||||
naersk.url = "github:nix-community/naersk";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
outputs = { self, nixpkgs, naersk, flake-utils }: flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages."${system}";
|
||||
naersk-lib = naersk.lib."${system}";
|
||||
in
|
||||
rec {
|
||||
packages.youmubot = naersk-lib.buildPackage {
|
||||
name = "youmubot";
|
||||
version = "0.1.0";
|
||||
|
||||
root = ./.;
|
||||
cargoBuildOptions = opts: opts ++ [ "--package youmubot" ];
|
||||
};
|
||||
|
||||
defaultPackage = packages.youmubot;
|
||||
|
||||
# `nix run`
|
||||
apps.youmubot = flake-utils.lib.mkApp {
|
||||
drv = packages.youmubot;
|
||||
exePath = "/bin/youmubot";
|
||||
};
|
||||
defaultApp = apps.youmubot;
|
||||
|
||||
# `nix develop`
|
||||
devShell = pkgs.mkShell {
|
||||
nativeBuildInputs = with pkgs; [ rustc cargo ];
|
||||
};
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue