[HN Gopher] Tvix - A New Implementation of Nix
___________________________________________________________________
Tvix - A New Implementation of Nix
Author : vngzs
Score : 36 points
Date : 2024-04-16 21:51 UTC (1 hours ago)
(HTM) web link (tvix.dev)
(TXT) w3m dump (tvix.dev)
| NewJazz wrote:
| _PS: TVL is international, but a lot of the development will take
| place in our office in Moscow. Say hi if you 're around and
| interested!_
|
| That's going to be a no from me.
| ingenieroariel wrote:
| Imagine if we had said the same about Nginx. Let's evaluate
| things on technical merits, specially if they are using open
| source licenses we understand. In this case GPL v3.
| Gerlo wrote:
| Why?
| alchemist1e9 wrote:
| Maybe worth mentioning rust and performance more prominently as
| the motivations.
|
| Is Nix eating the world? We have seen lots of unbelievable
| projects using it on HN recently. It feels like anyone serious
| about complex systems and building software are embracing it.
|
| I use it extensively also via nixpkgs, though somehow I have yet
| to make the leap to full NixOS.
|
| One consideration for anyone who hasn't jumped in, is that I have
| nixpkgs on Linux, MacOS, and Win11 hosts. I've found that
| incredibly useful.
| vvern wrote:
| Can you provide some links to some projects? You've piqued my
| interest
| NewJazz wrote:
| Tow-Boot comes to mind for me. https://github.com/Tow-
| Boot/Tow-Boot/
|
| Also plenty of projects here: https://github.com/nix-
| community/awesome-nix
| alchemist1e9 wrote:
| https://github.com/majbacka-labs/nixos.fi
|
| https://news.ycombinator.com/item?id=40010991
|
| https://news.ycombinator.com/item?id=39720007
|
| https://news.ycombinator.com/item?id=39692801
|
| https://news.ycombinator.com/item?id=39658684
|
| https://news.ycombinator.com/item?id=39004785
|
| I didn't find these via HN search, I found them in my
| bookmarking account. I have a slightly strange way of
| bookmarking - I send emails to a dedicated email account, so
| these I found there looking for Nix in a search.
| igorramazanov wrote:
| I would not call these projects unbelievable, but they are
| neat.
|
| Opt-in state:
|
| https://github.com/nix-community/impermanence
|
| https://grahamc.com/blog/erase-your-darlings
|
| Ease of setting up a real-time audio on Linux:
|
| https://github.com/musnix/musnix
|
| Generating virtual machines/installators from a
| configuration:
|
| https://github.com/astro/microvm.nix
|
| https://github.com/nix-community/nixos-generators
|
| It's interesting to scroll through nix-darwin options, I
| wasn't even aware of some useful macOS options before:
|
| https://daiderd.com/nix-darwin/manual/index.html
|
| A neat collection of music information retrieval packages in
| one place (and the ease of creating your own package
| registry):
|
| https://github.com/carlthome/mirpkgs
| lambdaba wrote:
| There's also nix-darwin and home-manager. I barely use brew
| anymore, not directly anyway, for the rare packages that aren't
| in nixpkgs.
| Rucadi wrote:
| One useful webpage this project provides is this godbolt for nix:
|
| https://bolt.tvix.dev/
|
| really useful.
| flurie wrote:
| It's worth noting that tvix explicitly[1] does not support
| flakes.
|
| [1]
| https://lobste.rs/s/ypwgwp/tvix_we_are_rewriting_nix#c_zvtze...
| Rucadi wrote:
| This seems to be from 2 years ago, a lot of things could have
| changed.
|
| He seemed quite opinionated on flakes, but the only bad thing
| that I can see to flakes is that you cannot pass args to them,
| for imo no valid reason, you have to use the file+file protocol
| and update the inputs each time to have a reasonable way to
| pass parameters...
| k8svet wrote:
| I've had CL11242 open in my browser for a few weeks. The first
| thing I'm doing when it merges is evaluating my flake(s) with
| flakes-compat.
| smasher164 wrote:
| Does tvix support targeting windows? And I do _not_ mean WSL.
| iirc, the nix attempted a windows port but there were some
| hardcoded assumptions made about unix in the implementation that
| made it intractable, for example the location of the store. Do
| these issues also hold for tvix?
| Smaug123 wrote:
| (Nix itself is slowly chugging along with Windows via MinGW -
| https://discourse.nixos.org/t/nix-on-windows/1113/108 and
| https://github.com/NixOS/nix/issues/1320 , for example.)
| ingenieroariel wrote:
| I recently learned about this: https://nlnet.nl/project/libnix/
| Izmaki wrote:
| For somebody who hasn't used Nix yet, but heard good things about
| it, why use Tvix instead of Nix? The page didn't seem to mention
| the reason(s) behind the project.
| tmountain wrote:
| It looks like they've factored out the main features of Nix
| into modules to allow for more flexibility regarding the
| implementation details of each underlying service.
| orbital-decay wrote:
| So, how ready is this for general use? Is there anything still
| missing in the implementation?
| k8svet wrote:
| builtins.fetchTarball is not there, among others, and from
| watching Matrix I think there are still some things in nixpkgs
| that eval slightly differently in tvix.
|
| It feels like things are heating up, and "soon" is on the
| horizon.
| codedokode wrote:
| By the way, is there some way to specify dependencies in C? Like
| requirements.txt in Python, where you put libraries names and
| versions and the user has to run a single command to install them
| (and without requiring root privileges)? Is this nix/tvix/guix an
| equivalent of pip?
| ingenieroariel wrote:
| Check out devenv.sh from the Cachix people, it allows you to
| list stuff like pip for any language, including services /
| postgresql extensions: { pkgs, ... }: {
| services.postgres = { enable = true; package =
| pkgs.postgresql_15; initialDatabases = [{ name =
| "mydb"; }]; extensions = extensions: [
| extensions.postgis extensions.timescaledb ];
| settings.shared_preload_libraries = "timescaledb";
| initialScript = "CREATE EXTENSION IF NOT EXISTS timescaledb;";
| }; }
| ingenieroariel wrote:
| One way to wrap your head around it is apt/systemd in a pip-
| like config file.
| diogocp wrote:
| Yes, Nix can do that. Another (simpler IMO) alternative is
| vcpkg.
| mise_en_place wrote:
| There's no need for more fragmentation in this ecosystem. Already
| package managers are heavily fragmented in the Linux world. This
| is making a bad problem worse.
___________________________________________________________________
(page generated 2024-04-16 23:00 UTC)