Skip to content

Instantly share code, notes, and snippets.

@spikespaz
Last active April 5, 2025 19:09
Show Gist options
  • Save spikespaz/9e840e56eaf08f72a92ff31d00539ca5 to your computer and use it in GitHub Desktop.
Save spikespaz/9e840e56eaf08f72a92ff31d00539ca5 to your computer and use it in GitHub Desktop.
Nix snippets not used
eachNewer = lib.filterAttrs (name: updatedPackage:
let
verNixpkgs = pkgs0.${name}.version;
verOverride = updatedPackage.version;
in if lib.versionOlder verNixpkgs verOverride then
true
else
lib.warn ''
package `${name}` has an overlay but the version in Nixpkgs is newer
(${verNixpkgs} >= ${verOverride})
the derivation in question will be selected from Nixpkgs, without the overlay
'' false);
pathStem = path:
lib.findFirst (name: name != null) null
(builtins.match "(.+)\\..*|(.+)" (baseNameOf path));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment