-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove obsolete jq --argfile option #43
base: main
Are you sure you want to change the base?
Conversation
The jq option --argfile was deprecated for a long time and it was finally removed from jq 1.7, which is causing the following error in activation script: jq: Unknown option --argfile The alternative is to use --slurpfile option which basically behaves in a same way. References: - jqlang/jq#2768 - https://github.com/jqlang/jq/releases/tag/jq-1.7
Until this is merged anyone who needs it sooner can use this as their homeage input: homeage = {
url = "github:jordanisaacs/homeage/pull/43/head";
inputs.nixpkgs.follows = "nixpkgs";
}; |
I'm not sure if related to this or I have another error, but I get:
I think it is at this piece of code: Line 143 in 02bfe4c
I mention this since I'm unsure if slurpfile may have different behavior causing this to now be an array rather than a string. |
Yes, this piece has to be updated and maybe other consumers that used -arg-file it seems:
I think this took advantage of the file having one text. I don't know jq very well but I think that means here it was taking advantage of the single line behavior and it needs to be updated to |
This prevents it from failing but needs to be changed to loop over all paths, right now it just cleans up modified module/default.nix
@@ -140,9 +140,11 @@ with lib; let
${pkgs.gnused}/bin/sed \
"s/\$UID/$(id -u)/g" |
while IFS=$"\n" read -r c; do
- path=$(echo "$c" | ${jq} --raw-output '[0].path')
- symlinks=$(echo "$c" | ${jq} --raw-output '.symlinks[]')
- copies=$(echo "$c" | ${jq} --raw-output '.copies[]')
+ echo "c is: $c"
+ echo "debug: $(echo "$c" | ${jq} --raw-output '.[0]')"
+ path=$(echo "$c" | ${jq} --raw-output '.[0].path')
+ symlinks=$(echo "$c" | ${jq} --raw-output '.[0].symlinks[]')
+ copies=$(echo "$c" | ${jq} --raw-output '.[0].copies[]') |
@jordanisaacs it would be great to get this merged! I'm seeing this same issue. |
The jq option
--argfile
was deprecated for a long time and it was finally removed from jq 1.7, which is causing the following error in activation script:jq: Unknown option --argfile
The alternative is to use
--slurpfile
option which basically behaves in a same way.References: