yaxitech / ragenix

age-encrypted secrets for NixOS; drop-in replacement for agenix

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

decrypt-with-age check fails on macOS

winterqt opened this issue · comments

error: builder for '/nix/store/kjzpnhknd26670201m9lvbwzhxxrwhkg-decrypt-with-age.drv' failed with exit code 101;
       last 2 log lines:
       > thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: NotWellFormed', /private/tmp/nix-build-rage-0.7.0.drv-0/rage-0.7.0-vendor.tar.gz/locale_config/src/macos.rs:16:76
       > note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
       For full logs, run 'nix log /nix/store/kjzpnhknd26670201m9lvbwzhxxrwhkg-decrypt-with-age.drv'.
error: build of '/nix/store/4574nc3jkm74pmbld8akw8b8kx5hvhd3-check-agenix-symlink.drv', '/nix/store/8fb3b4yyc71h403i421njbb9ng16d7p8-emit-schema.drv', '/nix/store/dl0mqvayp04jhggi7z4y14l33m62mbw4-check-shell-completions.drv', '/nix/store/kjzpnhknd26670201m9lvbwzhxxrwhkg-decrypt-with-age.drv' failed

This problem is this call in locale_config, which rage depends on for localizations. rage works in every other context but this check on my machine.

Thanks for reporting. I can confirm that this happens on aarch64-darwin and x86_64-darwin.

Unfortunately, I cannot really reproduce this bug outside a Nix build. The same calls issued in decrypt-with-age seem to work fine when using rage from latest nixpkgs in a regular shell session (on aarch64-darwin):

# nix --version
nix (Nix) 2.5.1
# nix shell 'github:nixos/nixpkgs/43cba143c05a491265b6f7da81ce7d9284158c31#rage'
# rage --version
rage 0.7.1
# rage -i example/keys/id_ed25519 -d example/github-runner.token.age
wurzelpfropf!
# rage -i example/keys/id_ed25519 -d example/root.passwd.age                        
$6$6Uu4dqnjJoFZ$yVYYV4HbWwC/Rl0UordDxVzPy55UjS0zp/1vusdAJpgTEMW0cY0B9RGnAI2TtrMwGVXMGsuH5539AlejU3Fr40

Is your sandbox on? If so, can you reproduce this issue with it disabled?

Good one: the error doesn't occur with --no-sandbox.