_: pkgs: with pkgs.lib; let local = p: deps: pkgs.callPackage ../packages/${p}.nix deps; fromLocal = builtins.mapAttrs local; unstable = import { inherit (pkgs) config; overlays = [ ]; }; prs = { }; fromPr = p: (import (pkgs.fetchFromGitHub { inherit (prs.${p}) hash; owner = "NixOS"; repo = "nixpkgs"; rev = "refs/pull/${toString prs.${p}.issue}/head"; }) { inherit (pkgs) config; overlays = [ ]; }).${p}; overrideUntilVersion = pv: builtins.mapAttrs (p: v: let inStable = pkgs ? ${p} && versionAtLeast pkgs.${p}.version v; inUnstable = unstable ? ${p} && versionAtLeast unstable.${p}.version v; inLocal = pathExists ../packages/${p}.nix; in assert assertMsg (! inStable) "${p} ${v} no longer requires an override"; if inUnstable then assert assertMsg (! inLocal) "${p} ${v} no longer requires local packaging"; unstable.${p} else if prs ? ${p} then fromPr p else local p { } ) pv; in overrideUntilVersion { apex = "unstable-2021-12-08"; cavif = "1.3.5"; decompiler-mc = "unstable-2022-06-21"; fastnbt-tools = "0.25.0"; git-diff-image = "unstable-2022-11-17"; git-mtime-extension = "1.6"; gpx-reduce = "unstable-2022-11-18"; ios-safari-remote-debug-kit = "unstable-2022-06-21"; ios-webkit-debug-proxy = "unstable-2021-08-12"; mcaselector = "1.17.2"; minemap = "1.0.24"; nbt-explorer = "2.8.0"; pngquant-interactive = "0.1.0"; tile-stitch = "unstable-2019-07-10"; trafilatura = "1.3.0"; watchlog = "1.197.0"; wireguard-vanity-address = "0.4.0"; zsh-abbr = "4.5.0"; } // fromLocal { add-words = { }; affine = { }; attachments = { }; email-hash = { }; gh = { }; git-diff-minecraft = {}; gopass-await = { inherit (pkgs.gnome) zenity; }; gopass-ydotool = { }; iosevka-custom = { }; mozjpeg-simple = { }; off = { }; zsh-click = { }; } // { # Workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=1269895 firefox = pkgs.firefox.overrideAttrs (wrapper: { buildCommand = wrapper.buildCommand + '' wrapProgram "$executablePath" --unset 'LC_TIME' ''; }); # Pending https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5370 gnome = pkgs.gnome.overrideScope' (_: gnome: { gnome-shell = gnome.gnome-shell.overrideAttrs (gnome-shell: { patches = gnome-shell.patches or [ ] ++ [ ../packages/resources/gnome-shell_screenshot-location.patch ]; }); }); # Required by https://gubaer.github.io/josm-scripting-plugin/docs/graaljs josm = pkgs.josm.override { jre = pkgs.graalvm17-ce; }; signal-desktop = pkgs.signal-desktop.overrideAttrs (a: { preFixup = a.preFixup + '' # Enable tray icon gappsWrapperArgs+=(--add-flags --use-tray-icon) ''; # Pending https://github.com/NixOS/nixpkgs/pull/209351 runtimeDependencies = a.runtimeDependencies ++ [ pkgs.wayland ]; }); vscodium = pkgs.vscodium.overrideAttrs (vscodium: { preFixup = vscodium.preFixup + '' gappsWrapperArgs+=( --unset NIXOS_OZONE_WL ) ''; }); # Workaround for https://gitlab.com/kevincox/watchlog/-/issues/6 watchlog = pkgs.watchlog.overrideAttrs (watchlog: { nativeBuildInputs = watchlog.nativeBuildInputs ++ [ pkgs.makeWrapper ]; postInstall = "wrapProgram $out/bin/wl --set CARGO_PKG_NAME 'watchlog'"; }); yaru-theme = pkgs.yaru-theme.overrideAttrs (yaru-theme: { patches = yaru-theme.patches or [ ] ++ [ ../packages/resources/yaru-theme_font.patch ]; }); # Pending https://github.com/ReimuNotMoe/ydotool/issues/177 ydotool = pkgs.ydotool.overrideAttrs (ydotool: { patches = ydotool.patches or [ ] ++ [ ../packages/resources/ydotool-halmakish.patch ]; }); }