webnsupdate/flake.nix

64 lines
1.7 KiB
Nix
Raw Normal View History

2024-05-03 20:29:10 +02:00
{
description = "An http server that calls nsupdate internally";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default";
};
2024-05-03 20:29:10 +02:00
outputs = {
self,
nixpkgs,
systems,
2024-05-03 20:29:10 +02:00
}: let
forEachSupportedSystem = nixpkgs.lib.genAttrs (import systems);
2024-05-03 20:29:10 +02:00
in {
checks = forEachSupportedSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
inherit (nixpkgs) lib;
in {
fmtRust = pkgs.callPackage ./run-cmd.nix {
src = self;
name = "fmt-rust";
extraNativeBuildInputs = [pkgs.rustfmt];
cmd = "${lib.getExe pkgs.cargo} fmt --all --check --verbose";
};
fmtNix = pkgs.callPackage ./run-cmd.nix {
src = self;
name = "fmt-nix";
cmd = "${lib.getExe pkgs.alejandra} --check .";
};
lintNix = pkgs.callPackage ./run-cmd.nix {
src = self;
name = "lint-nix";
cmd = "${lib.getExe pkgs.statix} check .";
};
});
formatter = forEachSupportedSystem (system: nixpkgs.legacyPackages.${system}.alejandra);
2024-05-03 20:29:10 +02:00
2024-06-02 16:18:21 +02:00
packages = forEachSupportedSystem (system: let
webnsupdate = nixpkgs.legacyPackages.${system}.callPackage ./default.nix {};
in {
inherit webnsupdate;
default = webnsupdate;
2024-05-03 20:29:10 +02:00
});
overlays.default = final: prev: {
webnsupdate = final.callPackage ./default.nix {};
};
nixosModules.default = ./module.nix;
devShells = forEachSupportedSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
2024-05-03 20:29:10 +02:00
default = pkgs.mkShell {
packages = [
pkgs.cargo-insta
pkgs.cargo-udeps
pkgs.mold
];
2024-05-03 20:29:10 +02:00
};
});
};
}