Unverified Commit a5bb2d7f authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

blocky: build time config checking, finalAttrs, add kuflierl as maintainer (#480908)

parents 8dbbe5fe f92ea7cf
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -16,6 +16,10 @@ in

    package = lib.mkPackageOption pkgs "blocky" { };

    enableConfigCheck = lib.mkEnableOption "checking the config during build time" // {
      default = true;
    };

    settings = lib.mkOption {
      type = format.type;
      default = { };
@@ -80,6 +84,14 @@ in
        ];
      };
    };
    system.checks = lib.mkIf cfg.enableConfigCheck [
      (pkgs.runCommand "check-blocky-config" { } ''
        ${lib.getExe cfg.package} --config ${configFile} validate && touch $out
      '')
    ];
  };
  meta.maintainers = with lib.maintainers; [ paepcke ];
  meta.maintainers = with lib.maintainers; [
    paepcke
    kuflierl
  ];
}
+6 −4
Original line number Diff line number Diff line
@@ -15,15 +15,17 @@
                "printer.lan" = "192.168.178.3,2001:0db8:85a3:08d3:1319:8a2e:0370:7344";
              };
            };
            upstream = {
            upstreams.groups = {
              default = [
                "8.8.8.8"
                "1.1.1.1"
              ];
            };
            port = 53;
            httpPort = 5000;
            logLevel = "info";
            ports = {
              dns = 53;
              http = 5000;
            };
            log.level = "info";
          };
        };
      };
+8 −5
Original line number Diff line number Diff line
@@ -5,14 +5,14 @@
  nixosTests,
}:

buildGoModule rec {
buildGoModule (finalAttrs: {
  pname = "blocky";
  version = "0.28.2";

  src = fetchFromGitHub {
    owner = "0xERR0R";
    repo = "blocky";
    rev = "v${version}";
    rev = "v${finalAttrs.version}";
    hash = "sha256-GLVyPb2Qyn1jnRz+e74dFzL/AMloKqSe1BUUAGTquWA=";
  };

@@ -25,7 +25,7 @@ buildGoModule rec {
  ldflags = [
    "-s"
    "-w"
    "-X github.com/0xERR0R/blocky/util.Version=${version}"
    "-X github.com/0xERR0R/blocky/util.Version=${finalAttrs.version}"
  ];

  passthru.tests = { inherit (nixosTests) blocky; };
@@ -35,7 +35,10 @@ buildGoModule rec {
    homepage = "https://0xerr0r.github.io/blocky";
    changelog = "https://github.com/0xERR0R/blocky/releases";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ ratsclub ];
    maintainers = with lib.maintainers; [
      ratsclub
      kuflierl
    ];
    mainProgram = "blocky";
  };
}
})