2024-05-03 20:29:10 +02:00
|
|
|
{
|
|
|
|
description = "An http server that calls nsupdate internally";
|
2024-05-09 00:59:43 +02:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
|
|
|
systems.url = "github:nix-systems/default";
|
|
|
|
};
|
2024-05-03 20:29:10 +02:00
|
|
|
|
2024-09-30 16:14:02 +02:00
|
|
|
outputs =
|
|
|
|
{
|
|
|
|
self,
|
|
|
|
nixpkgs,
|
|
|
|
systems,
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
forEachSupportedSystem = nixpkgs.lib.genAttrs (import systems);
|
|
|
|
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 self.formatter.${system}} --check .";
|
|
|
|
};
|
|
|
|
lintNix = pkgs.callPackage ./run-cmd.nix {
|
|
|
|
src = self;
|
|
|
|
name = "lint-nix";
|
|
|
|
cmd = "${lib.getExe pkgs.statix} check .";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
|
|
|
formatter = forEachSupportedSystem (system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style);
|
2024-05-03 20:29:10 +02:00
|
|
|
|
2024-09-30 16:14:02 +02:00
|
|
|
packages = forEachSupportedSystem (
|
|
|
|
system:
|
|
|
|
let
|
2024-09-30 16:14:02 +02:00
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
webnsupdate = pkgs.callPackage ./default.nix { };
|
2024-09-30 16:14:02 +02:00
|
|
|
in
|
|
|
|
{
|
|
|
|
inherit webnsupdate;
|
|
|
|
default = webnsupdate;
|
2024-09-30 16:14:02 +02:00
|
|
|
cargo-update = pkgs.writeShellApplication {
|
|
|
|
name = "cargo-update-lockfile";
|
|
|
|
runtimeInputs = with pkgs; [
|
|
|
|
cargo
|
|
|
|
gnused
|
|
|
|
];
|
|
|
|
text = ''
|
|
|
|
CARGO_TERM_COLOR=never cargo update 2>&1 | sed '/crates.io index/d' | tee -a cargo_update.log
|
|
|
|
'';
|
|
|
|
};
|
2024-09-30 16:14:02 +02:00
|
|
|
}
|
|
|
|
);
|
2024-05-03 20:29:10 +02:00
|
|
|
|
2024-09-30 16:14:02 +02:00
|
|
|
overlays.default = final: prev: { webnsupdate = final.callPackage ./default.nix { }; };
|
2024-09-30 16:14:02 +02:00
|
|
|
|
|
|
|
nixosModules.default = ./module.nix;
|
|
|
|
|
|
|
|
devShells = forEachSupportedSystem (
|
|
|
|
system:
|
|
|
|
let
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
default = pkgs.mkShell {
|
|
|
|
packages = [
|
|
|
|
pkgs.cargo-insta
|
|
|
|
pkgs.cargo-udeps
|
|
|
|
pkgs.mold
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
|
|
|
};
|
2024-05-03 20:29:10 +02:00
|
|
|
}
|