Unverified Commit 1331f7a9 authored by Adam C. Stephens's avatar Adam C. Stephens Committed by GitHub
Browse files

kanidm-provision: 1.1.2 -> 1.2.0, modernize (#397130)

parents 288383d2 ee84ec39
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -563,6 +563,16 @@ in
                default = null;
              };

              imageFile = mkOption {
                description = ''
                  Application image to display in the WebUI.
                  Kanidm supports "image/jpeg", "image/png", "image/gif", "image/svg+xml", and "image/webp".
                  The image will be uploaded each time kanidm-provision is run.
                '';
                type = types.nullOr types.path;
                default = null;
              };

              enableLocalhostRedirects = mkOption {
                description = "Allow localhost redirects. Only for public clients.";
                type = types.bool;
+31 −9
Original line number Diff line number Diff line
@@ -2,29 +2,51 @@
  lib,
  rustPlatform,
  fetchFromGitHub,
  yq,
  versionCheckHook,
  nix-update-script,
  nixosTests,
}:
rustPlatform.buildRustPackage rec {

rustPlatform.buildRustPackage (finalAttrs: {
  pname = "kanidm-provision";
  version = "1.1.2";
  version = "1.2.0";

  src = fetchFromGitHub {
    owner = "oddlama";
    repo = "kanidm-provision";
    rev = "v${version}";
    hash = "sha256-pgPjkj0nMb5j3EvyJTTDpfmh0WigAcMzoleF5EOqBAM=";
    tag = "v${finalAttrs.version}";
    hash = "sha256-+NQJEAJ0DqKEV1cYZN7CLzGoBJNUL3SQAMmxRQG5DMI=";
  };

  postPatch = ''
    tomlq -ti '.package.version = "${finalAttrs.version}"' Cargo.toml
  '';

  useFetchCargoVendor = true;
  cargoHash = "sha256-kbctfPhEF1PdVLjE62GyLDzjOnZxH/kOWUS4x2vd/+8=";
  cargoHash = "sha256-uo/TGyfNChq/t6Dah0HhXhAwktyQk0V/wewezZuftNk=";

  nativeBuildInputs = [
    yq # for `tomlq`
  ];

  nativeInstallCheckInputs = [ versionCheckHook ];
  versionCheckProgramArg = "--version";
  doInstallCheck = true;

  passthru = {
    tests = { inherit (nixosTests) kanidm-provisioning; };
    updateScript = nix-update-script { };
  };

  meta = with lib; {
  meta = {
    description = "A small utility to help with kanidm provisioning";
    homepage = "https://github.com/oddlama/kanidm-provision";
    license = with licenses; [
    license = with lib.licenses; [
      asl20
      mit
    ];
    maintainers = with maintainers; [ oddlama ];
    maintainers = with lib.maintainers; [ oddlama ];
    mainProgram = "kanidm-provision";
  };
}
})