Nix on Windows?

And thanks for the nix-darwin comparison. I get it better now.

1 Like

Thanks for the clarification I was also confused but this makes sense.

And thank you for your work everyone! I’m very excited for the doors this will open, even if I don’t use windows myself. Godspeed!

6 Likes

We have a beachhead, Build a minimized Nix with MinGW by Ericson2314 ¡ Pull Request #8901 ¡ NixOS/nix ¡ GitHub is merged!

With that, the work can hopefully proceed in parallel. To kick things off, I’ve opened issues:

Some of them are quite small and self-contained and would be excellent first issues for new contributers!

41 Likes

wait, wasn’t Moby Dick a sperm whale :wink: this is great news - is there a “quick start” for someone having never done it to get what you’ve accomplished setup on Windows? I can fumble around in the dark but probably won’t find it. Anyway, very exciting.

1 Like

@Qknight posted libnix mingw status just before it was merged, which has some instructions for trying things out.

Of course, we’ll want to make it easier and better tested next!

10 Likes

Nix is going to eat the world! This is huge!

12 Likes

Thanks for this! I got stuck but will try again soon

1 Like

so I finally got around to reading chapter 36 and Moby Dick is a “white whale” indeed and this I found I had to share −

If man will strike, strike through the mask! How can the prisoner reach outside except by thrusting through the wall? To me, the white whale is that wall, shoved near me. Sometimes I think there’s naught beyond. But 'tis enough. He tasks me; he heaps me; I see in him outrageous strength, with an inscrutable malice sinewing it (p. 267)

Still haven’t got nix working in Windows (following Qknight post get an error when I go ahead and :b packages.x86_64-linux.nix-x86_64-w64-mingw32 but no worries. As Ahab says “God bless ye” for working on this. Good things are coming

9 Likes

Another thing passing by my mind:

With some luck we can include Nix on ReactOS as a free platform in the foreseeable future!

11 Likes

libnix volth's work summarizes volth’s windows nix port work and some parts of the discussion in this discourse.

9 Likes

libnix fixPath - fixPath is a tool to modify the path to a certain DLLs (Dynamic Shared Objects) for Microsoft Windows Executables by rewriting parts of the executable’s PE header, when the .fixPath section is present and indicates support for such rewrite, but without having to realign the PE headers. In concept, it is similar to patchelf but instead of changing search paths, fixPath hard-codes each DLL to a particular filepath.

see fixPath project page:

https://github.com/nixcloud/fixPath

release with prebuilt fixPath.exe tool + test program:

https://github.com/nixcloud/fixPath/releases/tag/v0.1.0
18 Likes

libnix roadmap contains a summary of items we need to get done in order to port a minimal nix to windows and use cargo cross platform to utilize the /nix/store instead of ~/.cargo and target/ folder.

11 Likes

As a completion: nix: init at 2.25.0 by puffnfresh ¡ Pull Request #22499 ¡ msys2/MINGW-packages ¡ GitHub try to port nix to MinGW

4 Likes

has it happened? Nix on Windows feels like

Starbuck is Stubb reversed, and Stubb is Starbuck

:pray:

I am working on making nix on windows currently we have a working version here: GitHub - nix-windows/nix: Nix, the purely functional package manager and yes it’s old but we are working on making changes to the main nix and make it more upstream. Yes the upstream nix doesn’t do much on native, but the nix-windows does (like creating dirvations), But me, @Ericson2314 & @puffnfresh are trying our best to make it available there is a matrix discussion here if you want to join out and help.

5 Likes