58 lines
1.3 KiB
Nix
58 lines
1.3 KiB
Nix
{
|
|
outputs =
|
|
{ self
|
|
, nixpkgs
|
|
, flake-utils
|
|
, gitignore
|
|
, git-hooks
|
|
, ...
|
|
}:
|
|
let
|
|
name = "project";
|
|
version = "0.0.0";
|
|
in
|
|
{ }
|
|
// flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
overlays = [
|
|
gitignore.overlay
|
|
];
|
|
};
|
|
in
|
|
{
|
|
devShells.default = pkgs.callPackage ./shell.nix {
|
|
inherit (self.outputs.checks.${system}) pre-commit-check;
|
|
inherit name version;
|
|
};
|
|
packages.default = pkgs.callPackage ./. { inherit name version; };
|
|
checks = {
|
|
pre-commit-check = git-hooks.lib.${system}.run {
|
|
src = ./.;
|
|
hooks = {
|
|
nixpkgs-fmt.enable = true;
|
|
};
|
|
};
|
|
};
|
|
formatter = pkgs.nixpkgs-fmt;
|
|
});
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
|
systems.url = "github:nix-systems/x86_64-linux";
|
|
flake-utils = {
|
|
url = "github:numtide/flake-utils";
|
|
inputs.systems.follows = "systems";
|
|
};
|
|
git-hooks = {
|
|
url = "github:cachix/git-hooks.nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.gitignore.follows = "gitignore";
|
|
};
|
|
gitignore = {
|
|
url = "github:hercules-ci/gitignore.nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
}
|