| Nix internally differentiates between lambdas and primops, but their type in the nix expression language is the same (lambda). The implementation of builtins.functionArgs only checks if the given expression is of type tLambda and fails if the type is tPrimop or tPrimopApp which are also functions. This most notably breaks lib.generators.toPretty when called on a builtin making for example yants fail if a primop is typechecked and an error message is generated. This fix generates an empty set for primops like for plain lambdas and is based upstream commit b2748c6e99239ff6803ba0da76c362790c8be192. Additionally we add to two tests: * eval-okay-functionargs now includes a few test cases checking that builtins.functionArgs always returns an empty set for builtins and also works as expected for normal functions. * eval-okay-types now also checks if builtins are functions. Future work would be to make builtins.functionArgs work as users would expect for builtins like builtins.fetchurl, builtins.fetchGit etc. which take a set as an argument. These currently don't register as formal arguments, but it would be an usability improvement at least if they did. See also https://github.com/NixOS/nix/pull/3626#issuecomment-698546704 Change-Id: I2bf4cb80d44a4b72ade13d3e0dbd7dfb1d049f32 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2477 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de> Reviewed-by: glittershark <grfn@gws.fyi> | ||
|---|---|---|
| bin | ||
| docs | ||
| fun | ||
| lisp | ||
| net | ||
| nix | ||
| ops | ||
| overrides | ||
| third_party | ||
| tools | ||
| users | ||
| web | ||
| .envrc | ||
| .git-blame-ignore-revs | ||
| .gitignore | ||
| .hgignore | ||
| .mailmap | ||
| .rgignore | ||
| .rustfmt.toml | ||
| buf.yaml | ||
| default.nix | ||
| LICENSE | ||
| OWNERS | ||
| README.md | ||
| RULES | ||
depot
This repository is the monorepo for the community around tazjin's virus lounge, containing our personal tools and infrastructure. Everything in here is built using Nix.
A large portion of the software here is very self-referential, meaning that it exists to sustain the operation of the repository. This is the case because we partially see this as an experiment in tooling for monorepos.
If you've ended up here and have no idea who I am, feel free to follow me on Twitter.
Highlights
Services
- 
Source code is available primarily through Sourcegraph on cs.tvl.fyi, where it is searchable and even semantically indexed. A lower-tech view of the repository is also available via cgit on code.tvl.fyi. The repository can be cloned using gitfromhttps://cl.tvl.fyi/depot.
- 
All code in the depot, with the exception of code that is checked in to individual //usersfolders, needs to be reviewed. We use Gerrit on cl.tvl.fyi for this.
- 
Issues are tracked via our own issue tracker on b.tvl.fyi. Its source code lives at //web/panettone/.
- 
Smaller todo-list entries which do not warrant a separate issue are listed at todo.tvl.fyi. 
- 
We use Buildkite for CI. Recent builds are listed on tvl.fyi/builds and pipelines are configured dynamically via //ops/pipelines.
All services that we host are deployed on NixOS machines that we manage. Their
configuration is tracked in //ops/nixos.
Nix
- //third_party/nixcontains Tvix, our fork of the Nix package manager
- //nix/readTreecontains the Nix code which automatically registers projects in our Nix attribute hierarchy based on their in-tree location
- //nix/yantscontains Yet Another Nix Type System, which we use for a variety of things throughout the repository
- //nix/buildGoimplements a Nix library that can build Go software in the style of Bazel's- rules_go. Go programs in this repository are built using this library.
- //nix/buildLispimplements a Nix library that can build Common Lisp software. Currently only SBCL is supported. Lisp programs in this repository are built using this library.
We have a variety of other tools and libraries in the //nix folder which may
be of interest.
Packages / Libraries
- //net/alcoholic_jwtcontains an easy-to-use JWT-validation library for Rust
- //net/crimpcontains a high-level HTTP client using cURL for Rust
- //tools/emacs-pkgscontains various useful Emacs libraries, for example:- dottime.elprovides dottime in the Emacs modeline
- nix-util.elprovides editing utilities for Nix files
- term-switcher.elis an ivy-function for switching between vterm buffers
- tvl.elprovides helper functions for interacting with the TVL monorepo
 
- //lisp/klatreprovides a grab-bag utility library for Common Lisp
User packages
Contributors to the repository have user directories under
//users, which can be used for
personal or experimental code that does not require review.
Some examples:
- //users/tazjin/homepage&&- //users/tazjin/blog: A Nix-based static site generator which generates the web page and Atom feed for tazj.in
- //users/tazjin/finito: A persistent finite-state machine library for Rust.
- //users/glittershark/xanthous: A (WIP) TUI RPG, written in Haskell.
- //users/tazjin/emacs: tazjin's Emacs & EXWM configuration
Licensing
Unless otherwise stated in a subdirectory, all code is licensed under the MIT license. See LICENSE for details.
Contributing
If you'd like to contribute to any of the tools in here, please check out the contribution guidelines and our code of conduct.