| 13 May 2024 |
samrose | I don't pretend to even know what the problems are with flakes, although I do believe you all that there are problems. I just went all in on them about 2 years ago, and just dealt with whatever comes along with that. | 23:51:16 |
samrose | I did not know that nix run works on non-flakes | 23:51:36 |
Qyriad | it's not exactly ergenomic, but it works on any arbitrary Nix-anything that evaluates to a derivation that sets mainProgram:
$ nix run --impure --expr 'let log2compdb = fetchGit "https://github.com/Qyriad/log2compdb"; in import log2compdb { }' . -- --version
log2compdb 0.2.5
| 23:52:42 |
raitobezarius | In reply to @samrose:matrix.org I don't pretend to even know what the problems are with flakes, although I do believe you all that there are problems. I just went all in on them about 2 years ago, and just dealt with whatever comes along with that. i recommend samueldr or jade's articles on flakes | 23:53:04 |
Qyriad | all the nix3 commands work on non-flakes, this is just extremely shittily documented (so far) | 23:53:05 |
raitobezarius | they're a really good quick presentation on the layering violations induced by flakes | 23:53:13 |
raitobezarius |
| 23:53:17 |
raitobezarius | * plus what qyriad just said | 23:53:19 |
samrose | can you use nix run on non flakes because you can make an "installable" with nix, which then nix run can run? | 23:53:24 |
Qyriad | an "installable" is actually not flake-specific, it's just flake by default (annoyingly) | 23:53:46 |
samrose | yeah you can call a function that makes an installable in nix basically | 23:54:06 |
samrose | ok | 23:54:08 |
easrng | In reply to @qyriad:katesiria.org all the nix3 commands work on non-flakes, this is just extremely shittily documented (so far) do they get the nicer progress display without flakes? | 23:54:52 |
Qyriad | there are four kinds of installables:
flakeref + attrpath a full /nix/store path a nix expression and an (optionally empty) attrpath, with --expr (or -E in Lix) a nix file and an (optionally empty) attrpath, with --file/-f | 23:55:03 |
raitobezarius | In reply to @easrng:yuri.im do they get the nicer progress display without flakes? yes | 23:55:26 |
Qyriad | In reply to@easrng:yuri.im do they get the nicer progress display without flakes? yes, that's part of nix3/new-cli, not flakes, but you can actually get them in the old CLI too: nix-build --log-format bar-with-logs '<nixpkgs>' hello | 23:55:27 |
Qyriad | In reply to@qyriad:katesiria.org there are four kinds of installables:
flakeref + attrpath a full /nix/store path a nix expression and an (optionally empty) attrpath, with --expr (or -E in Lix) a nix file and an (optionally empty) attrpath, with --file/-f
In order:
$ nix build "nixpkgs#neovim"
$ nix build /nix/store/hfvwharmvin21pbxqapzbmwy7gmf8l8v-neovim-0.9.5.drv
$ nix build --file '<nixpkgs>' neovim
$ nix build --impure --expr 'let pkgs = import <nixpkgs> { }; in pkgs.neovim'
all do the same thing | 23:57:00 |
samrose | So maybe there are some ideas in Lix to improve flakes over time eh? | 23:57:07 |
Qyriad | that's the hope! | 23:57:14 |
Qyriad | oh yeah you can also use flakes with the old CLI. I don't think this is documented literally anywhere, but:
nix-build 'flake:nixpkgs' -A neovim | 23:58:56 |
samrose | In reply to @qyriad:katesiria.org oh yeah you can also use flakes with the old CLI. I don't think this is documented literally anywhere, but:
nix-build 'flake:nixpkgs' -A neovim Someone did show me that a while back at nixcon in paris :) | 23:59:35 |
Qyriad | (the Nix docs team refusing to document experimental features really just does more harm than good, imho) | 23:59:59 |
| 14 May 2024 |
samrose | It seems like the nix run approach could be a candidate way to test non-nixos functionality of Lix on Nix I've been using it to do some tests of building postgres, postgres extensions, and then running pgtap and other postgres tests on a package set. I guess that is more for testing the runnig of software packaged with nix
It seemed the nix tests are mostly just like bash integration tests of the cli executable. | 00:03:07 |
samrose | I am not sure if it would help to have some matrix of machines (x86_64-linux, wsl2, macos, aarch64-linux) that could test the installation of Lix, and then some nix profile install followed by maybe not nix run, but rather just using what was installed, and checking integrity of the Lix installation and package installation, and ... I don't know immediately what else | 00:07:30 |
samrose | In reply to @samrose:matrix.org I am not sure if it would help to have some matrix of machines (x86_64-linux, wsl2, macos, aarch64-linux) that could test the installation of Lix, and then some nix profile install followed by maybe not nix run, but rather just using what was installed, and checking integrity of the Lix installation and package installation, and ... I don't know immediately what else the open source postgresql project uses cirrusci https://cirrus-ci.org/faq/#are-there-any-limits which offers a matrix of builders for free to open source projects with the limitations in that link (not the only solution but it might help to use resources that are free to open source projects potentially) | 00:10:39 |
Qyriad | hmm, that is good to know | 00:13:06 |
Qyriad | aarch64-linux is what we are most lacking in right now | 00:13:19 |
samrose | anyway, I'd love to help and am flexible about how I do it, when it comes to helping test this stuff somehow | 00:13:57 |
samrose | I guess at cirrus that use containers, although it could still be feasible to use their containers to build and test builds I believe | 00:14:24 |
samrose | at cirrus they only offer containers for aarch64-linux I mean | 00:14:43 |