Live data from Hacker News

Tvix – A New Implementation of Nix

tvix.dev

21–30 of 107 posts

Re: Tvix – A New Implementation of Nix

#21

So, how ready is this for general use? Is there anything still missing in the implementation?

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.

Re: Tvix – A New Implementation of Nix

#24

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?

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;";
  };
   }

Re: Tvix – A New Implementation of Nix

#25

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?

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 EXTEN…

One way to wrap your head around it is apt/systemd in a pip-like config file.

Re: Tvix – A New Implementation of Nix

#26

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?

Yes, Nix can do that. Another (simpler IMO) alternative is vcpkg.

Re: Tvix – A New Implementation of Nix

#27

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.

Why do you think that? I've been following Tvix for some time closely and I've never felt they were introducing any sort of fragmentation.

Re: Tvix – A New Implementation of Nix

#28

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?

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 EXTEN…

Interesting, but the word "containers" is scaring me. I wanted just a simple tool to download and install several libraries and not a full Docker/Kubernetes level system...

But it looks like a good choice for running tests in CI.

Re: Tvix – A New Implementation of Nix

#30

So, how ready is this for general use? Is there anything still missing in the implementation?

Tvix developer here; correctness is still not guaranteed, there's nothing to use here except if you already understand well Nix concepts to pick parts and build stuff on the top of it and accept the inherent instability :).
Post reply on HN