Skip to content

Commit

Permalink
kanidm: 1.3.3 -> 1.4.0 (#352773)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamcstephens authored Nov 1, 2024
2 parents 4f1a7ad + 9308348 commit f1cb012
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
4 changes: 2 additions & 2 deletions nixos/tests/kanidm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ import ./make-test-python.nix ({ pkgs, ... }:
with subtest("Test unixd connection"):
client.wait_for_unit("kanidm-unixd.service")
client.wait_for_file("/run/kanidm-unixd/sock")
client.wait_until_succeeds("kanidm-unix status | grep working!")
client.wait_until_succeeds("kanidm-unix status | grep online")
with subtest("Test user creation"):
client.wait_for_unit("getty@tty1.service")
Expand All @@ -107,7 +107,7 @@ import ./make-test-python.nix ({ pkgs, ... }:
client.send_chars("kanidm person posix set-password testuser\n")
client.wait_until_tty_matches("1", "Enter new")
client.send_chars("${testCredentials.password}\n")
client.wait_until_tty_matches("1", "Retype")
client.wait_until_tty_matches("1", "Reenter")
client.send_chars("${testCredentials.password}\n")
output = client.succeed("getent passwd testuser")
assert "TestUser" in output
Expand Down
11 changes: 3 additions & 8 deletions pkgs/by-name/ka/kanidm/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ let
in
rustPlatform.buildRustPackage rec {
pname = "kanidm";
version = "1.3.3";
version = "1.4.0";

src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-W5G7osV4du6w/BfyY9YrDzorcLNizRsoz70RMfO2AbY=";
hash = "sha256-hRYHr4r3+LRiaZoJgs3MA5YtDEoKyeg/ohPAIw3OMyo=";
};

cargoHash = "sha256-gJrzOK6vPPBgsQFkKrbMql00XSfKGjgpZhYJLTURxoI=";
cargoHash = "sha256-DfTalKTOiReQCreAzbkSjbhMSW5cdOGGg04i/QKPonE=";

KANIDM_BUILD_PROFILE = "release_nixos_${arch}";

Expand All @@ -55,14 +55,12 @@ rustPlatform.buildRustPackage rec {
default_config_path = "/etc/kanidm/server.toml";
default_unix_shell_path = "${lib.getBin bashInteractive}/bin/bash";
htmx_ui_pkg_path = "@htmx_ui_pkg_path@";
web_ui_pkg_path = "@web_ui_pkg_path@";
};
in
''
cp ${format profile} libs/profiles/${KANIDM_BUILD_PROFILE}.toml
substituteInPlace libs/profiles/${KANIDM_BUILD_PROFILE}.toml \
--replace-fail '@htmx_ui_pkg_path@' "$out/ui/hpkg" \
--replace-fail '@web_ui_pkg_path@' "$out/ui/pkg"
'';

nativeBuildInputs = [
Expand All @@ -80,10 +78,7 @@ rustPlatform.buildRustPackage rec {

# The UI needs to be in place before the tests are run.
postBuild = ''
# We don't compile the wasm-part form source, as there isn't a rustc for
# wasm32-unknown-unknown in nixpkgs yet.
mkdir -p $out/ui
cp -r server/web_ui/pkg $out/ui/pkg
cp -r server/core/static $out/ui/hpkg
'';

Expand Down

0 comments on commit f1cb012

Please sign in to comment.