| 30 Jan 2023 |
Rick (Mindavi) | But maybe that could be explained somewhere if it isn't yet | 17:11:03 |
infinisil | nbp: It's there, first drawback item :) | 17:13:14 |
nbp | Well, I found it useful, to look for the number of games or browser packages. | 17:14:41 |
nbp | * Well, I found it useful, to look for the number of games or browser packaged. | 17:14:43 |
nbp | how does repology helps finding packages from similar categories? | 17:16:29 |
@piegames:matrix.org | Btw I think you might need an exception to the path rule for update scripts. Or at least have a closer look at common patterns there and somehow deal with them | 17:18:23 |
infinisil | piegames: Update scripts can be specified in passthru.updateScript in the package itself, the stable boundary requirement doesn't conflict with that I'm pretty sure | 17:20:26 |
@piegames:matrix.org | No the thing is you usually do cd ../../../.. to get to the root for then running nix commands. | 17:21:33 |
infinisil | piegames: Oh I see | 17:23:27 |
@piegames:matrix.org | Did you do any test runs already? | 17:24:40 |
Sandro 🐧 | there is a test PR, that should also be linked as an example | 17:25:13 |
infinisil | piegames: So that file reference requirement is mainly meant for Nix files, so that evaluation doesn't fail. I shouldn't apply to e.g. update scripts. But yes those paths should definitely be fixed somehow | 17:25:20 |
infinisil | * piegames: So that file reference requirement is mainly meant for Nix files, so that evaluation doesn't fail. I shouldn't apply to e.g. update scripts. But yes those paths should definitely be updated somehow | 17:25:30 |
Sandro 🐧 | In reply to @piegames:matrix.org No the thing is you usually do cd ../../../.. to get to the root for then running nix commands. TBH we should abstract most of those workarounds away and get away from writing those scripts from zero. | 17:25:46 |
Sandro 🐧 | so a bit in the direction what update-source-version is doing | 17:26:19 |
Alyssa Ross | unstableGitUpdater <3 | 17:26:26 |
infinisil | Yeah while working on this I also discovered that most of these file references are actually just anti-patterns and it's often better to get rid of them than to work around them | 17:27:14 |
Sandro 🐧 | but that also blows up the scope massively | 17:29:59 |
infinisil | Yes, so the tooling detects such cases where moving a packages files around would break eval, and just doesn't move those packages (it could give a warning though) | 17:31:45 |
Sandro 🐧 | moving update scripts does not break eval but breaks at execution | 17:36:21 |
Sandro 🐧 | most of those use either cd in code or nix-shell with relative paths in the shebang | 17:36:33 |
infinisil | Not sure yet what to do about that, it seems really tricky to accurately detect this in shell scripts | 17:37:18 |
infinisil | And there's no clear API for these update scripts, they might not even be in passthru.updateScript, they might just be random files that expect to be executed 🤔 | 17:39:18 |
infinisil | After a quick grep for ../, it looks like there's relatively few instances, these could probably be fixed semi-manually | 17:40:04 |
Sandro 🐧 | take https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/misc/ArchiSteamFarm/update.sh as a bad example | 17:40:05 |
Sandro 🐧 | In reply to @infinisil:matrix.org And there's no clear API for these update scripts, they might not even be in passthru.updateScript, they might just be random files that expect to be executed 🤔 we should enforce putting them there otherwise CWD can be anything and you usually have some lines of glue code around that | 17:41:07 |
infinisil | That sounds good, but probably better to keep out of this RFC to not blow up the scope | 17:42:32 |
Wanja Hentze | In reply to @sandro:supersandro.de TBH we should abstract most of those workarounds away and get away from writing those scripts from zero. I'm not going to say the F word but this looks like a problem that might be solvable using a certain experimental nix feature, maybe | 17:46:03 |
Wanja Hentze | or maybe that certain feature needs to accommodate arbitrary updater scripts | 17:46:41 |
Wanja Hentze | In reply to @infinisil:matrix.org We just opened the RFC https://github.com/NixOS/rfcs/pull/140 🎉 also, wtf, now I got the animation when switching to this tab | 18:00:58 |