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

[WIP] Extensible systems using modules #153

Closed
wants to merge 1 commit into from

Conversation

jaen
Copy link
Contributor

@jaen jaen commented May 20, 2022

What it says on the tin, basically #135 taken in the direction of using NixOS modules.

Currently stuck at running this:

$ clear; nix flake lock --override-input dream2nix ../../.; nix run .#resolveImpure --show-trace
warning: updating lock file '/home/jaen/Projects/nix/dream2nix/examples/path-example/flake.lock':
• Updated input 'dream2nix':
    'github:nix-community/dream2nix/e5d0e9cdb00695b0b63d1f52ff3b39c0e3035fe3' (2022-05-06)
  → 'git+file:///home/jaen/Projects/nix/dream2nix?ref=extend-subsystems-modules&rev=bf0c5e0bea93afdb4c238a09e27c659c52c679fa' (2022-05-20)
warning: Git tree '/home/jaen/Projects/nix/dream2nix' is dirty
warning: Git tree '/home/jaen/Projects/nix/dream2nix' is dirty
trace: I GOT CALLED AS A PACKAGE! ["builders","callPackageDream","config","discoverers","dlib","fetchers","lib","name","nigga","options","pkgs","specialArgs","subsystem","translators","updaters","utils"]
trace: MAKING MODULE
trace: { extraArgs = <CODE>; translate = <CODE>; translateBin = <CODE>; type = "impure"; version = <CODE>; }
trace: MAKING MODULE
trace: { extraArgs = <CODE>; translate = <CODE>; translateBin = <CODE>; type = "pure"; version = <CODE>; }
trace: { extraArgs = <CODE>; translate = <CODE>; translateBin = <CODE>; type = <CODE>; version = <CODE>; }
error: cannot coerce null to a string

       at /nix/store/9p6y2z7n6zf6v1h5fnz3kyygqmj22lbl-source/src/subsystems/nodejs/translators/impure/package-json/default.nix:54:7:

           53|       cd $WORKDIR
           54|       ${(lib.traceVal specialArgs.translators.nodejs.pure.package-lock).translateBin} $TMPDIR/newJsonInput
             |       ^
           55|     '';

       … while evaluating the attribute 'text' of the derivation 'script.sh'

I suppose this is because I try to loop subsystem elements by putting the elements from evaled module into the evals' specialArgs (yay for cycles) and this is actually not how you should do it. I imagine the solutions would be to instead to have a field with initialised translators in the config and use that, but I haven't had time to work on it since.

@jaen
Copy link
Contributor Author

jaen commented May 25, 2022

Closing in favour of #155

@jaen jaen closed this May 25, 2022
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

Successfully merging this pull request may close these issues.

None yet

1 participant