Comment by ~jack on ~jack/nix-freeze-tree
REPORTED
RESOLVED FIXEDComment by ~jack on ~jack/nix-freeze-tree
RESOLVED IMPLEMENTED
REPORTEDComment by ~jack on ~jack/nix-freeze-tree
Finally got around to looking at this. I rewrote your patch to avoid the regex dependency, and released v0.1.1.0.
Thank you for the report and for your patch.
REPORTED
RESOLVED IMPLEMENTEDTicket created by ~jack on ~jack/aeson-dependent-sum
Like
TaggedObject
inaeson
, but the name of the contents field changes depending on the tag. PerhapsDynamicTaggedObject
? We'll need a way of picking out a function to determine the contents field - use a typeclass probably.
Ticket created by ~jack on ~jack/mudcore
Currently, we create a bunch of refs associated with our userdata (descriptors, timers, ZeroMQ watchers). Now that
lua_newuserdatauv()
exists, we could instead create userdata that way and keep the relevant Lua values alongside the C structures.struct watcher
inlua_zmq.c
in fact only exists to hold three lua values.I imagine each type could have an enum of uservalue indices e.g.
enum watcher_uservalue { WATCHER_USERVALUE_SOCKET, WATCHER_USERVALUE_IN, WATCHER_USERVALUE_OUT, NUM_WATCHER_USERVALUES };
Ticket created by ~jack on ~jack/mudcore
In
descriptor_close()
, we should probably calllua_closethread()
on thelua_State
corresponding to the thread as we wind up everything else.
Seems like I cannot attach documents.
On Sat, Aug 20, 2022, at 14:55, Gianluca Stivan wrote:
I stand corrected, I did not know about that trick :)
I've attached a patch that seems to work on my machine. It doesn't support symlinks, but I guess that's a separate problem.
Thanks a lot for the advice.
On Sat, Aug 20, 2022, at 14:23, ~jack wrote:
I believe that this is fixable, because I ran
nix-freeze-tree
over a little test directory and made the following changes:
- When importing a directory, we need to generate something like
paths = { "bar@baz" = import (./. + "/bar@baz") { inherit stdenv; }; };
- When emitting the
default.nix
for a directory with@
in its name, we need to not have illegal characters in thename
field of themkDerivation
call.-- View on the web: https://todo.sr.ht/~jack/nix-freeze-tree/8#event-201780 Attachments:
- git-patch
I stand corrected, I did not know about that trick :)
I've attached a patch that seems to work on my machine. It doesn't support symlinks, but I guess that's a separate problem.
Thanks a lot for the advice.
On Sat, Aug 20, 2022, at 14:23, ~jack wrote:
I believe that this is fixable, because I ran
nix-freeze-tree
over a little test directory and made the following changes:
- When importing a directory, we need to generate something like
paths = { "bar@baz" = import (./. + "/bar@baz") { inherit stdenv; }; };
- When emitting the
default.nix
for a directory with@
in its name, we need to not have illegal characters in thename
field of themkDerivation
call.-- View on the web: https://todo.sr.ht/~jack/nix-freeze-tree/8#event-201780
Comment by ~jack on ~jack/nix-freeze-tree
I believe that this is fixable, because I ran
nix-freeze-tree
over a little test directory and made the following changes:
- When importing a directory, we need to generate something like
paths = { "bar@baz" = import (./. + "/bar@baz") { inherit stdenv; }; };
- When emitting the
default.nix
for a directory with@
in its name, we need to not have illegal characters in thename
field of themkDerivation
call.
That part I’ve already fixed. What’s wrong (and cannot be fixed afaik) is
myfolder/default.nix myfolder/some@other/default.nix
As far as I know there’s no way to import such a structure in nix due to limitations on how nix does parsing.
Thanks!
Il giorno 20 ago 2022, alle ore 13:48, ~jack outgoing@sr.ht ha scritto:
In such situations, I'd try emitting code that calls the
path
builtin: https://nixos.org/manual/nix/stable/expressions/builtins.html#builtins-pathAn enrichment of the built-in path type, based on the attributes present in args. All are optional except path:
- name
The name of the path when added to the store. This can used to reference paths that have nix-illegal characters in their names, like@
.-- View on the web: https://todo.sr.ht/~jack/nix-freeze-tree/8#event-201776