reddit-magnet/flake.nix
Marc Plano-Lesay 2ba76b49e8
Some checks failed
Checking Renovate configuration / validate (pull_request) Successful in 17s
Checking yaml / Run yamllint (pull_request) Failing after 14s
Build and test / Generate Documentation (pull_request) Successful in 3m33s
Build and test / Tests (pull_request) Successful in 3m56s
Build and test / Build AMD64 (pull_request) Successful in 4m19s
Build and test / Clippy (pull_request) Successful in 4m33s
chore: migrate to Forgejo
2025-11-05 17:30:07 +11:00

39 lines
997 B
Nix

{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
pre-commit-hooks = {
url = "github:cachix/git-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{ self
, nixpkgs
, flake-utils
, ...
}@inputs:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
};
# Place all toolchain components in a single directory for IntelliJ
rust-toolchain = pkgs.symlinkJoin {
name = "rust-toolchain";
paths = with pkgs; [
rustc
cargo
rustPlatform.rustcSrc
] ++ lib.optionals stdenv.isDarwin [
libiconv
];
};
in
{
checks = import ./nix/git-hooks.nix { inherit inputs pkgs; };
devShells = import ./nix/shell.nix { inherit pkgs rust-toolchain self; inherit (pkgs) lib; };
formatter = pkgs.nixpkgs-fmt;
});
}