rework backports to support time based expiration

This commit is contained in:
NullBite 2024-03-15 01:22:38 -04:00
parent 4e8b112976
commit 09066b737a
Signed by: nullbite
GPG Key ID: 6C4D545385D4925A
3 changed files with 15 additions and 9 deletions

View File

@ -1,5 +1,9 @@
# backports
This is a nixpkgs overlay that contains temporary fixes for build failures or
other issues, usually backported from the nixpkgs master branch. Each package
defined in this overlay shall automatically disable itself once the upstream
package has been updated.
defined in this overlay shall automatically disable itself once a certain
condition is met, such as the upstream package being updated or the nixpkgs
modification date passing a certain time.
This is in place because I am extremely forgetful; I will almost certainly
forget to undo a temporary fix later, so this takes care of it for me.

View File

@ -1,8 +1,12 @@
final: prev:
nixfiles: final: prev:
let
inherit (final) callPackage fetchFromGitHub;
inherit (final.lib) recurseIntoAttrs;
inherit (prev) callPackage fetchFromGitHub;
inherit (prev.lib) recurseIntoAttrs optionalAttrs;
# if you can't do version based just make it time based and deal with it in a
# month if it's not fixed
# 2024-04-10T08:11:11
gap-hold = (nixfiles.inputs.nixpkgs-unstable.lastModified <= 1712751071);
gimpPlugins-gap = let
src = fetchFromGitHub {
owner = "Scrumplex";
@ -11,6 +15,4 @@ let
hash="sha256-oat4TwOorFevUMZdBFgaQHx/UKqGW7CGMoOHVgQxVdM=";
};
in recurseIntoAttrs (callPackage "${src}/pkgs/applications/graphics/gimp/plugins" {});
in {
gimpPlugins = if prev.gimpPlugins.gap.version == "2.6.0" then gimpPlugins-gap else prev.gimpPlugins;
}
in (optionalAttrs gap-hold { gimpPlugins = gimpPlugins-gap; })

View File

@ -68,7 +68,7 @@
})
# various temporary fixes that automatically revert
(import ./backports)
(import ./backports self)
inputs.hyprwm-contrib.overlays.default
inputs.rust-overlay.overlays.default