Add helpful packages to flake

This commit is contained in:
Natsu Kagami 2025-05-20 19:14:06 +02:00
parent 4b1ae32256
commit 8bb8b4114a
Signed by: nki
GPG key ID: 55A032EB38B49ADB

View file

@ -10,15 +10,23 @@
};
nixConfig = {
extra-substituters = [ "https://natsukagami.cachix.org" ];
extra-trusted-public-keys = [ "natsukagami.cachix.org-1:3U6GV8i8gWEaXRUuXd2S4ASfYgdl2QFPWg4BKPbmYiQ=" ];
extra-trusted-public-keys = [
"natsukagami.cachix.org-1:3U6GV8i8gWEaXRUuXd2S4ASfYgdl2QFPWg4BKPbmYiQ="
];
};
outputs = { self, nixpkgs, flake-utils, ... }@inputs:
flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = import nixpkgs
outputs =
{
inherit system; overlays = [ (import inputs.rust-overlay) ];
self,
nixpkgs,
flake-utils,
...
}@inputs:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ (import inputs.rust-overlay) ];
};
in
rec {
@ -34,19 +42,33 @@
defaultApp = apps.youmubot;
# `nix develop`
devShell = pkgs.mkShell
{
devShell = pkgs.mkShell {
inputsFrom = [ packages.youmubot ];
buildInputs = with pkgs; [ rustfmt clippy sqlx-cli rust-analyzer ];
buildInputs = with pkgs; [
rustfmt
clippy
sqlx-cli
rust-analyzer
nativeBuildInputs = nixpkgs.lib.optionals pkgs.stdenv.isLinux (with pkgs; [
curl
jq
sqlite-interactive
];
nativeBuildInputs = nixpkgs.lib.optionals pkgs.stdenv.isLinux (
with pkgs;
[
pkg-config
]);
]
);
RUST_SRC_PATH = pkgs.rustPlatform.rustLibSrc;
};
}) // {
}
)
// {
overlays.default = final: prev: {
youmubot = final.callPackage ./package.nix { };
};
@ -54,4 +76,3 @@
nixosModules.default = import ./module.nix;
};
}