delete nix eval --write-to #974

Closed
opened 2025-08-21 12:31:09 +00:00 by pennae · 4 comments
Owner
❯ nix eval --write-to new-dir --expr '{ "../snafu" = "this should never ever work"; }' && cat snafu
this should never ever work

this is obviously nonsense. we don't even use --write-to in our tree any more because it was so busted, and it only existed in the first place to make the old makefile-based doc build system less impossible to not fuck up. we have found only three occurences of this flag on sourcegraph that aren't nix implementations:

given how busted and overall not useful this "feature" is we should really just axe it

cc @commentatorforall

``` ❯ nix eval --write-to new-dir --expr '{ "../snafu" = "this should never ever work"; }' && cat snafu this should never ever work ``` this is obviously nonsense. we don't even use `--write-to` in our tree any more because it was so busted, and it only existed in the first place to make the old makefile-based doc build system less impossible to not fuck up. we have found only three occurences of this flag on sourcegraph that aren't nix implementations: - an old version of cppnix packaging in void linux (current packaging doesn't use `--write-to`) - [as context in slackware user packages](https://github.com/SlackBuildsOrg/slackbuilds/blob/master/system/nix/config/fix_nix_options.patch) - [one specific packaging of helix](https://github.com/chaotic-cx/nyx/blob/main/pkgs/helix-git/default.nix) that uses the flag to write a json file and should really just be shoving that json through stdout given how busted and overall not useful this "feature" is we should really just axe it cc @commentatorforall
Owner
https://git.lix.systems/lix-project/lix/issues/227
Author
Owner

let's just fucking do it

let's just fucking do it
Owner

yeah, let's make it a specific error that says we removed it. other than that, I have no objections, let's send it directly into a release.

yeah, let's make it a specific error that says we removed it. other than that, I have no objections, let's send it directly into a release.
pennae self-assigned this 2025-08-21 20:41:27 +00:00
Member

This issue was mentioned on Gerrit on the following CLs:

  • commit message in cl/4045 ("nix/eval: remove --write-to")
<!-- GERRIT_LINKBOT: {"cls": [{"backlink": "https://gerrit.lix.systems/c/lix/+/4045", "number": 4045, "kind": "commit message"}], "cl_meta": {"4045": {"change_title": "nix/eval: remove --write-to"}}} --> This issue was mentioned on Gerrit on the following CLs: * commit message in [cl/4045](https://gerrit.lix.systems/c/lix/+/4045) ("nix/eval: remove --write-to")
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#974
No description provided.