I see that vlang is already in nixpkgs. That is, it has been packaged in nixpkgs. But the repository itself doesn't have Nix-based development environment.
Nix is used not only for packaging, but also for development: https://nixos.asia/en/dev
@Swastik Baranwal So I'd propose that we create a flake.nix
file in this repo, so that anyone can just git clone
it and run nix develop
to be dropped in a shell where they build the project, etc. They don't have to install anything on their computer, other than Nix itself.
The README says the Makefile does some magical things, including:
The Tiny C Compiler (tcc) is downloaded for you by make if there is a compatible version for your system, and installed under the V thirdparty directory.
When using Nix, none of this need to happen, for the devShell can include the same Tiny C Compiler which is in fact available in nixpkgs.
We have our own TCC with our own patches afaik
Nixifying that patched TCC would be the first step I'd think
I see
Let me see how I can do it
Write a flake.nix
in that TCC repo, then if I run nix run
in that repo it should run the compiler.
Are there any guides on how to write a flake.nix
This is for non-windows https://github.com/vlang/tccbin
I could use this opportunity to see how useful https://nixos.asia/en/blog/nix-rapid is
Can you try that and let me know if there's anything you don't understand, as far as introduction goes?
This is for windows https://github.com/vlang/tccbin_win
Srid said:
I could use this opportunity to see how useful https://nixos.asia/en/blog/nix-rapid is
Can you try that and let me know if there's anything you don't understand, as far as introduction goes?
This post actually introduces flakes
Srid said:
I could use this opportunity to see how useful https://nixos.asia/en/blog/nix-rapid is
Can you try that and let me know if there's anything you don't understand, as far as introduction goes?
Sure, I will work on it tomorrow. It is mid night here.
Last updated: Nov 15 2024 at 12:33 UTC