https://github.com/fzakaria/aterm2json
A tool to convert between aterm and json.
https://github.com/fzakaria/aterm2json
aterm json nix nixos
Last synced: about 2 months ago
JSON representation
A tool to convert between aterm and json.
- Host: GitHub
- URL: https://github.com/fzakaria/aterm2json
- Owner: fzakaria
- License: apache-2.0
- Created: 2025-03-21T03:46:45.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-21T03:47:17.000Z (over 1 year ago)
- Last Synced: 2025-11-30T03:51:11.482Z (7 months ago)
- Topics: aterm, json, nix, nixos
- Language: Nix
- Homepage:
- Size: 9.77 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# aterm2json
[](https://builtwithnix.org)
A simple tool to convert between [nix](https://nixos.org) aterm format and JSON.
If you are using [Nix](https://nixos.org/), you can easily run this locally.
```sh
nix shell github:fzakaria/aterm2json
```
You can round trip this!
```console
> cat /nix/store/z3hhlxbckx4g3n9sw91nnvlkjvyw754p-myname.drv
Derive([("out","/nix/store/40s0qmrfb45vlh6610rk29ym318dswdr-myname","","")],[],[],"mysystem","mybuilder",[],[("builder","mybuilder"),("name","myname"),("out","/nix/store/40s0qmrfb45vlh6610rk29ym318dswdr-myname"),("system","mysystem")])
> aterm2json /nix/store/z3hhlxbckx4g3n9sw91nnvlkjvyw754p-myname.drv | jq | json2aterm -
Derive([("out","/nix/store/40s0qmrfb45vlh6610rk29ym318dswdr-myname","","")],[],[],"mysystem","mybuilder",[],[("builder","mybuilder"),("name","myname"),("out","/nix/store/40s0qmrfb45vlh6610rk29ym318dswdr-myname"),("system","mysystem")])
```