Compare commits
2 Commits
d21e38ae5f
...
33f5a3db37
Author | SHA1 | Date | |
---|---|---|---|
33f5a3db37 | |||
9e15b68b79 |
@ -87,7 +87,10 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
# various temporary fixes that automatically revert
|
# various temporary fixes that automatically revert
|
||||||
(import ./overlays self)
|
self.overlays.mitigations
|
||||||
|
|
||||||
|
# auto backports from nixpkgs unstable
|
||||||
|
self.overlays.backports
|
||||||
|
|
||||||
inputs.hyprwm-contrib.overlays.default
|
inputs.hyprwm-contrib.overlays.default
|
||||||
inputs.rust-overlay.overlays.default
|
inputs.rust-overlay.overlays.default
|
||||||
@ -284,6 +287,8 @@
|
|||||||
apps = eachSystem (system: import ./pkgs/apps.nix
|
apps = eachSystem (system: import ./pkgs/apps.nix
|
||||||
{ inherit (self.outputs) packages; inherit system; });
|
{ inherit (self.outputs) packages; inherit system; });
|
||||||
|
|
||||||
|
overlays = import ./overlays self;
|
||||||
|
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
slab = mkSystem {
|
slab = mkSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
@ -1,9 +1,20 @@
|
|||||||
# backports
|
# Overlays
|
||||||
This is a nixpkgs overlay that contains temporary fixes for build failures or
|
This directory contains nixpkgs overlays which each serve some specific purpose.
|
||||||
other issues, usually backported from the nixpkgs master branch. Each package
|
|
||||||
defined in this overlay shall automatically disable itself once a certain
|
## backports
|
||||||
condition is met, such as the upstream package being updated or the nixpkgs
|
This overlay defines programs that should be unconditionally backported from
|
||||||
modification date passing a certain time.
|
nixpkgs-unstable. Packages backported in this overlay will be built using
|
||||||
|
inputs from the current system when possible, as to not unnecessarily increase
|
||||||
|
the closure size. This may result in unexpected breakages, as packages in
|
||||||
|
nixpkgs-unstable are built and tested against other such packages.
|
||||||
|
|
||||||
|
|
||||||
|
## mitigations
|
||||||
|
This overlay 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 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
|
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.
|
forget to undo a temporary fix later, so this takes care of it for me.
|
||||||
|
20
overlays/backports.nix
Normal file
20
overlays/backports.nix
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
nixfiles: final: prev:
|
||||||
|
let
|
||||||
|
pkgs-unstable = import nixfiles.inputs.nixpkgs-unstable { config.allowUnfree = true; inherit (final) system; };
|
||||||
|
inherit (final) callPackage lib electron_28;
|
||||||
|
|
||||||
|
backport = pkg: let
|
||||||
|
inherit (lib) getAttrFromPath;
|
||||||
|
inherit (builtins) getAttr isString;
|
||||||
|
getAttr' = name: attrs: if isString pkg then getAttr name attrs else getAttrFromPath name attrs;
|
||||||
|
oldPkg = getAttr' pkg prev;
|
||||||
|
newPkg = getAttr' pkg pkgs-unstable;
|
||||||
|
in if oldPkg.version == newPkg.version
|
||||||
|
then oldPkg
|
||||||
|
else (callPackage newPkg.override);
|
||||||
|
|
||||||
|
in {
|
||||||
|
|
||||||
|
vesktop = backport "vesktop" { };
|
||||||
|
obsidian = backport "obsidian" { electron = final.electron_28; };
|
||||||
|
}
|
@ -1,25 +1,16 @@
|
|||||||
nixfiles: final: prev:
|
nixfiles:
|
||||||
let
|
let
|
||||||
inherit (prev) callPackage fetchFromGitHub;
|
inherit (nixfiles.inputs.nixpkgs) lib;
|
||||||
inherit (prev.lib) recurseIntoAttrs optionalAttrs;
|
# this name is awful. maybe i don't know anything about functional
|
||||||
isNewer = ref: ver: (builtins.compareVersions ver ref) == 1;
|
# programming or something, but the naming isn't very self explanatory
|
||||||
|
# - why is it "compose" instead of "combine"
|
||||||
# if you can't do version based just make it time based and deal with it in a
|
# - why is it "extensions" instead of "overlays"
|
||||||
# month if it's not fixed
|
inherit (lib) composeManyExtensions;
|
||||||
# 2024-04-10T08:11:11
|
in rec {
|
||||||
gap-hold = (nixfiles.inputs.nixpkgs-unstable.lastModified <= 1712751071);
|
backports = import ./backports.nix nixfiles;
|
||||||
gimpPlugins-gap = let
|
mitigations = import ./mitigations.nix nixfiles;
|
||||||
src = fetchFromGitHub {
|
default = composeManyExtensions [
|
||||||
owner = "Scrumplex";
|
backports
|
||||||
repo = "nixpkgs";
|
mitigations
|
||||||
rev = "cca25fd345f2c48de66ff0a950f4ec3f63e0420f";
|
];
|
||||||
hash="sha256-oat4TwOorFevUMZdBFgaQHx/UKqGW7CGMoOHVgQxVdM=";
|
}
|
||||||
};
|
|
||||||
in recurseIntoAttrs (callPackage "${src}/pkgs/applications/graphics/gimp/plugins" {});
|
|
||||||
in (optionalAttrs gap-hold { gimpPlugins = gimpPlugins-gap; }) //
|
|
||||||
# can't optionalAttrs for version checks because it breaks lazy eval and causes infinite recursion
|
|
||||||
{
|
|
||||||
obsidian = let
|
|
||||||
pkg = final.callPackage "${nixfiles.inputs.nixpkgs-unstable}/pkgs/applications/misc/obsidian" { electron = final.electron_28; };
|
|
||||||
in if isNewer "1.4.16" prev.obsidian.version then prev.obsidian else pkg;
|
|
||||||
}
|
|
||||||
|
25
overlays/mitigations.nix
Normal file
25
overlays/mitigations.nix
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
nixfiles: final: prev:
|
||||||
|
let
|
||||||
|
inherit (prev) 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; })
|
||||||
|
# # can't optionalAttrs for version checks because it breaks lazy eval and causes infinite recursion
|
||||||
|
# // {
|
||||||
|
# obsidian = let
|
||||||
|
# pkg = final.callPackage "${nixfiles.inputs.nixpkgs-unstable}/pkgs/applications/misc/obsidian" { electron = final.electron_28; };
|
||||||
|
# in if isNewer "1.4.16" prev.obsidian.version then prev.obsidian else pkg;
|
||||||
|
# }
|
Loading…
x
Reference in New Issue
Block a user