overlays: remove gap from gimp-with-plugins

This commit is contained in:
NullBite 2024-04-02 09:21:15 -04:00
parent fdbf07c3ea
commit a457e3fdf3
Signed by: nullbite
GPG Key ID: 6C4D545385D4925A

View File

@ -1,22 +1,19 @@
nixfiles: final: prev:
let
inherit (prev) callPackage fetchFromGitHub;
inherit (prev) lib callPackage fetchFromGitHub;
inherit (prev.lib) recurseIntoAttrs optionalAttrs;
isNewer = ref: ver: (builtins.compareVersions ver ref) == 1;
# 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";
repo = "nixpkgs";
rev = "cca25fd345f2c48de66ff0a950f4ec3f63e0420f";
hash="sha256-oat4TwOorFevUMZdBFgaQHx/UKqGW7CGMoOHVgQxVdM=";
};
in recurseIntoAttrs (callPackage "${src}/pkgs/applications/graphics/gimp/plugins" {});
in (optionalAttrs gap-hold { gimpPlugins = gimpPlugins-gap; })
gimp-with-plugins-good = let
badPlugins = [ "gap" ];
itemInList = list: item: lib.any (x: x==item) list;
pluginFilter = name: value: (value.type or null == "derivation") && (!(itemInList badPlugins name)) && (!value.meta.broken);
filteredPlugins = lib.filterAttrs pluginFilter prev.gimpPlugins;
plugins = lib.mapAttrsToList (_: v: v) filteredPlugins;
in prev.gimp-with-plugins.override { inherit plugins; };
in {
gimp-with-plugins = gimp-with-plugins-good;
}
# # can't optionalAttrs for version checks because it breaks lazy eval and causes infinite recursion
# // {
# obsidian = let