Skip to content
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

tg2sip-conf Compile Issue #5

Closed
AlphaJosh opened this issue Jan 10, 2022 · 3 comments
Closed

tg2sip-conf Compile Issue #5

AlphaJosh opened this issue Jan 10, 2022 · 3 comments

Comments

@AlphaJosh
Copy link

While compiling tg2sip-conf I get the following error:

admin@srv-Lit-01:/srv/asterisk-dongle-setup$ nix-build -A tg2sip-conf -o result-tg2sip-conf --show-trace
error: 7129136

       … while evaluating the attribute 'text' of the derivation 'settings.ini'

       at /nix/store/in6ppv9g7zzlziw87b7ajwl07pifairi-nixpkgs-22.05pre344305.32356ce11b8/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:205:7:

          204|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          205|       name =
             |       ^
          206|         let

Full verbose output log
https://pastebin.com/xQjyvkEd

I dont know this language but looks like the variable is left open

@AlphaJosh
Copy link
Author

AlphaJosh commented Jan 10, 2022

In the end, I commented out line 21 of ./run.sh

nix-build -A tg2sip-conf -o result-tg2sip-conf

And then manually created the folder 'asterisk-dongle-setup/result-tg2sip-conf/etc'
and created the file 'asterisk-dongle-setup/result-tg2sip-conf/etc/settings.ini'

[logging]
core=1
tgvoip=1
pjsip=1
sip_messages=true

[sip]
port=5061
id_uri=sip:127.0.0.1:5060

Not sure if that is correct

@sergei-mironov
Copy link
Owner

In the end, I commented out line 21 of ./run.sh

nix-build -A tg2sip-conf -o result-tg2sip-conf

And then manually created the folder 'asterisk-dongle-setup/result-tg2sip-conf/etc' and created the file 'asterisk-dongle-setup/result-tg2sip-conf/etc/settings.ini'

[logging]
core=1
tgvoip=1
pjsip=1
sip_messages=true

[sip]
port=5061
id_uri=sip:127.0.0.1:5060

Not sure if that is correct

Hm, that could also work, but the idea of cause is to build the config using Nix and then use ./result-tg2sip-conf/.../settings.ini -> /nix/store/... because in this case it will keep parameters of tg2sip in sync with other parameters. Actually, I can't see the source of the problem right now. The expression is at https://github.com/grwlf/asterisk-dongle-setup/blob/ac3e468afcb6ddda32c0deb48cd65a4043418391/default.nix#L619 and it is basically a call to function which generates the file, given the name and the contents.

My only idea is that since I use with secrets; ... for the "contents" parameter, you can break something by e.g. making a syntax error in your ./secrets.nix , so consider checking it.. And be advised that nix is known for its poor error messages.

@sergei-mironov
Copy link
Owner

Please reopen this if you have any problems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants