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

Experimental network.buildShell #117

Merged
merged 2 commits into from
May 26, 2020
Merged

Experimental network.buildShell #117

merged 2 commits into from
May 26, 2020

Conversation

srhb
Copy link
Contributor

@srhb srhb commented May 20, 2020

Basic testing done.

This grants users a medium-to-large escape hatch in that they may define network.buildShell to be a shell-compatible drv from which morph can and will execute nix-build.

One could, for instance, override the nix-build that's on $PATH by using this. Or just have funny messages displayed whenever a shell is opened.

    network.buildShell = pkgs.mkShell {
      name = "test";
      shellHook = ''
        echo "Woo, here we go!"
      '';
    };

@johanot johanot marked this pull request as draft May 20, 2020 10:13
@srhb srhb marked this pull request as ready for review May 20, 2020 11:00
@srhb srhb changed the title WIP: Experimental network.buildShell Experimental network.buildShell May 20, 2020
@srhb
Copy link
Contributor Author

srhb commented May 20, 2020

If I had more confidence in this, I would entirely drop the possibility of not running nix-build (or anything but eval) from inside a nix-shell, but I'm not quite there yet. In general I feel like inverting control quite a bit more towards the Nix side is the sane thing to do.

@srhb
Copy link
Contributor Author

srhb commented May 20, 2020

There's an issue with hostnames with special characters because of the way quoting differs in the two methods. Need to figure out a way to fix that.

@srhb srhb marked this pull request as draft May 20, 2020 12:09
@srhb srhb marked this pull request as ready for review May 25, 2020 13:26
@srhb srhb marked this pull request as draft May 25, 2020 13:36
@srhb srhb marked this pull request as ready for review May 25, 2020 14:10
Copy link
Contributor

@johanot johanot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM other than the single comment about the debug print. Also, please give all files a go fmt.

nix/nix.go Outdated Show resolved Hide resolved
Copy link
Contributor

@johanot johanot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added go fmt.

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

2 participants