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

Notes #5

Closed
jamesdbrock opened this issue Nov 4, 2024 · 12 comments
Closed

Notes #5

jamesdbrock opened this issue Nov 4, 2024 · 12 comments
Labels
wontfix This will not be worked on

Comments

@jamesdbrock
Copy link

My notes from using mkSpagoDerivation:

Needed in flake.nix:

  nixConfig.sandbox = "relaxed";

Needed in ~/.config/nix.conf

experimental-features = nix-command flakes configurable-impure-env auto-allocate-uids
@jeslie0
Copy link
Owner

jeslie0 commented Nov 4, 2024

I would be interested to see your example flake that requires having sandbox set to relaxed. I've not needed that when I've used this in my projects. I also only have nix-command and flakes enabled as experimental features.

I'm not sure what is causing you to have to add these settings. If we can figure it out, I will update the documentation to make it clearer.

@jamesdbrock
Copy link
Author

It is totally possible that I did something wrong and didn't really need those settings. I will post here if I figure it out.

@jamesdbrock
Copy link
Author

Anyway, whatever weird thing I'm doing, mkSpagoDerivation is working perfectly for me, so thank you.

@jamesdbrock
Copy link
Author

I'm working on this PR, if you're really curious. rowtype-yoga/purescript-protobuf#40

@jeslie0
Copy link
Owner

jeslie0 commented Nov 30, 2024

I am starting to use purescript-protobuf in a personal project. It seems like maybe that is where you were getting the sandbox issues - I am also getting them when trying to build protoc-gen-purescript.

I hope your PR goes well - I'm happy to help if you have issues using mkSpagoDerivation.

@jeslie0 jeslie0 added the wontfix This will not be worked on label Nov 30, 2024
@jamesdbrock
Copy link
Author

I am starting to use purescript-protobuf in a personal project.

Oh I'll finish that PR then. I think I can get it merged today.

@jamesdbrock
Copy link
Author

jamesdbrock commented Dec 2, 2024

@jeslie0 I tagged protobuf v4.5.0 but I can't publish it to the Registry yet. I think you can use v4.5.0 this way: rowtype-yoga/purescript-protobuf#43

For generating .purs from .proto, the flake.nix publishes a protoc-gen-purescript package which you can use as a Nix nativeBuildInputs.

nix flake show github:rowtype-yoga/purescript-protobuf

@jeslie0
Copy link
Owner

jeslie0 commented Dec 2, 2024

Thank you very much, I will try using the upgraded version when I'm back from work.

I know this is the wrong place to ask this, but if you aren't using spago2nix anymore, do you still need the relaxed sandbox option in the flake? Removing that makes it much easier to build the plugin.

@jamesdbrock
Copy link
Author

if you aren't using spago2nix anymore, do you still need the relaxed sandbox option in the flake? Removing that makes it much easier to build the plugin.

Good question. I just removed the relaxed sandbox and everything still works, so I pushed it to master.

@jamesdbrock
Copy link
Author

And furthermore I don't seem to need this anymore either.

experimental-features = configurable-impure-env auto-allocate-uids

I don't know what that was about. Maybe I'll find out when I nix-collect-garbage and need to rebuild all this stuff.

@jeslie0
Copy link
Owner

jeslie0 commented Dec 2, 2024

Very happy, thank you! I added the new version to my project. Happy to close this issue?

@jamesdbrock
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants