feat: switch from flake-parts and devenv to rensa ecosystem

This commit is contained in:
technofab 2025-12-31 18:31:09 +01:00
parent 0a0d354962
commit dcb87e8c3e
Signed by: technofab
SSH key fingerprint: SHA256:bV4h88OqS/AxjbPn66uUdvK9JsgIW4tv3vwJQ8tpMqQ
21 changed files with 649 additions and 652 deletions

View file

@ -0,0 +1,39 @@
{
pkgs,
ntlib,
...
}: {
suites."flake-parts" = {
pos = __curPos;
tests = [
{
name = "flakeModule";
type = "script";
script =
# sh
''
${ntlib.helpers.path (with pkgs; [coreutils nix gnused gnugrep jq])}
${ntlib.helpers.scriptHelpers}
export SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt
export NIX_SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt
repo_path=${../.}
cp ${./fixtures/flake_parts}/* .
# import from the absolute path above, is easier than trying to figure out the repo path etc.
sed -i -e "s|@repo_path@|$repo_path|" flake.nix
# NOTE: --impure is required since importing modules from absolute paths is not allowed in pure mode
nix build --impure .#nixible:test
assert "-f result/bin/nixible" "should exist"
assert_file_contains "result/bin/nixible" "ANSIBLE_COLLECTIONS_PATH"
assert_file_contains "result/bin/nixible" "ansible-playbook"
nix build --impure .#nixible:hello
assert "-f result/bin/nixible" "should exist"
assert_file_contains "result/bin/nixible" "ANSIBLE_COLLECTIONS_PATH"
assert_file_contains "result/bin/nixible" "ansible-playbook"
'';
}
];
};
}