!OqhvaDMJdKYUicLDiE:nixos.org

Nixpkgs Stdenv

229 Members
75 Servers

Load older messages


SenderMessageTime
20 Apr 2025
@aleksana:mozilla.orgaleksana 🏳️‍⚧️ (force me to bed after 18:00 UTC)Yeah, but how do we handle this as a general case, and also for config.allowVariants15:35:24
@emilazy:matrix.orgemilyalso the date-based system is silly, since stuff gets merged later than it gets written15:35:24
@emilazy:matrix.orgemilyit should be based on releases instead15:35:27
@emilazy:matrix.orgemilysplitting out deprecations and preserved aliases makes sense. I think we don't need to separate out removed things15:36:15
@emilazy:matrix.orgemily it could just look like deprecatedPkg = { release = "25.05"; alias = newName; }; or deprecatedPkg = { release = "25.05"; }; for a removed thing 15:36:56
@emilazy:matrix.orgemilywhich would also make automating dropping stuff easier, there's currently a sorta gross script that doesn't handle all the cases15:37:08
@rosscomputerguy:matrix.orgTristan RossYeah, something which automagically handles deprecations is better15:37:33
@emilazy:matrix.orgemilyother scopes are where it gets awkward15:37:36
@emilazy:matrix.orgemily probably we'd want a thing to process these in lib so that it could be reused across the tree 15:37:45
@rosscomputerguy:matrix.orgTristan RossAlso, should have a suggestion in case something was removed.15:37:46
@emilazy:matrix.orgemilyright, you could have a field for an additional message15:37:59
@emilazy:matrix.orgemily like reason = "known vulnerabilities and unmaintained for years"; suggestion = …; 15:38:21
@emilazy:matrix.orgemily rather than manually writing throws and putting dates in comments 15:38:36
@rosscomputerguy:matrix.orgTristan RossI feel like some of the reasons could be defined so it didn't have to be copied and pasted.15:39:02
@emilazy:matrix.orgemily aliases.nix could contain stuff that's meant to stay (the "preserve" stuff) and deprecated.nix could contain stuff on the chopping block 15:39:04
@rosscomputerguy:matrix.orgTristan RossYeah, aliases could hold things like aliases to latest versions and a sort of legacy-compatibility15:39:36
@emilazy:matrix.orgemilyyeah there's mostly like 4 common reasons that get reused a lot :)15:39:42
@rosscomputerguy:matrix.orgTristan RossI can think unmaintained and vulnerable are the two most common15:40:08
@rosscomputerguy:matrix.orgTristan Ross If we make it a list then we could have: reasons = [ unmaintained vulnerable ] 15:40:35
@rosscomputerguy:matrix.orgTristan Ross

It could throw an error that looks something like this:

Package "xyz" was removed since xx.xx due to the following reasons:

- Unmaintained: package has not been updated or maintained for an extended period of time
- Vulnerable: package contains security vulnerability and should not be trusted
15:42:25
@rosscomputerguy:matrix.orgTristan RossIt's a pretty clear error15:42:46
@aleksana:mozilla.orgaleksana 🏳️‍⚧️ (force me to bed after 18:00 UTC)Well the real question I'd like to ask is how do we tell users the pkgs variant cannot be used is because they didn't enable config.allowVariants15:44:53
@aleksana:mozilla.orgaleksana 🏳️‍⚧️ (force me to bed after 18:00 UTC)Other wise it feels like "I sometimes can use them, sometimes it just isn't there but I don't know what is exactly going wrong"15:45:36
@rosscomputerguy:matrix.orgTristan RossFor now, I made it to where you have to explicitly disable it.15:46:32
@aleksana:mozilla.orgaleksana 🏳️‍⚧️ (force me to bed after 18:00 UTC)
In reply to @rosscomputerguy:matrix.org
For now, I made it to where you have to explicitly disable it.
Yeah, but if people trigger ofborg errors, they should get an explanation in place
15:47:14
@aleksana:mozilla.orgaleksana 🏳️‍⚧️ (force me to bed after 18:00 UTC)The aliases are already confusing but we can make them correct15:47:41
@rosscomputerguy:matrix.orgTristan RossSo what we can do is "fake-import" it15:48:03
@rosscomputerguy:matrix.orgTristan Ross

I tested in repl and got this:

nix-repl> builtins.attrNames (import ./pkgs/top-level/variants.nix { nixpkgsFun = import ./.; lib = pkgs.lib; stdenv = pkgs.stdenv; overlays = pkgs.overlays; makeMuslParsedPlatform = null; } pkgs pkgs)
[
  "pkgsArocc"
  "pkgsExtraHardening"
  "pkgsLLVM"
  "pkgsLLVMLibc"
  "pkgsMusl"
  "pkgsRocm"
  "pkgsZig"
]
15:48:46
@rosscomputerguy:matrix.orgTristan Ross With this, we can map the names and throw an error saying that config.allowVariants need to be enabled. 15:49:18
@aleksana:mozilla.orgaleksana 🏳️‍⚧️ (force me to bed after 18:00 UTC) Can we use some = allow: builtins.mapAttrs (k: v: if allow then v else throw "not allowed") { a = 1; } 15:52:04

Show newer messages


Back to Room ListRoom Version: 9