nix-config: dfca7dc48c58289223f0dc5fa9c172dfe6db5fda

     1: # Override broken or non-optimal packages from <nixpkgs> and elsewhere
     2: self: super:
     3: 
     4: with rec {
     5:   inherit (builtins)
     6:     compareVersions
     7:     getAttr
     8:     hasAttr
     9:     trace
    10:     ;
    11:   inherit (super.lib) mapAttrs;
    12: 
    13:   get =
    14:     version:
    15:     with rec {
    16:       attr = "nixpkgs${version}";
    17:       set = getAttr attr (if hasAttr attr self then self else nix-helpers);
    18:     };
    19:     name:
    20:     trace "FIXME: Taking ${name} from nixpkgs${version} as it's broken on 19.09" (
    21:       getAttr name set
    22:     );
    23: 
    24:   nix-helpers =
    25:     self.nix-helpers
    26:       or (rec { inherit (import ../overrides/repos.nix overrides { }) overrides; })
    27:       .overrides.nix-helpers;
    28: 
    29:   isBroken = self.isBroken or nix-helpers.isBroken;
    30: }; {
    31:   overrides = {
    32:     # Newer NixOS systems need fuse3 rather than fuse, but it doesn't exist
    33:     # on older systems. We include it if available, otherwise we just warn.
    34:     fuse3 = super.fuse3 or self.nothing;
    35: 
    36:     # We only need nix-repl for Nix 1.x, since 2.x has a built-in repl
    37:     nix-repl =
    38:       if compareVersions self.nix.version "2" == -1 then
    39:         super.nix-repl
    40:       else
    41:         self.nothing;
    42: 
    43:     python312 = super.python312.override (old: {
    44:       packageOverrides =
    45:         pelf: puper:
    46:         (old.packageOverrides or (_: _: { })) pelf puper
    47:         // {
    48:           dbus-next = nix-helpers.withDeps' "dbus-next" [ (isBroken puper.dbus-next) ] (
    49:             puper.dbus-next.overridePythonAttrs (_: {
    50:               doCheck = false;
    51:             })
    52:           );
    53:         };
    54:     });
    55: 
    56:     xorg = super.xorg // {
    57:       # Bump driver to avoid https://bugs.freedesktop.org/show_bug.cgi?id=109689
    58:       xf86videointel = super.xorg.xf86videointel.overrideAttrs (
    59:         old: with { rev = "f66d3954"; }; {
    60:           name = "xf86-video-intel-${rev}";
    61:           src = self.fetchgit {
    62:             inherit rev;
    63:             url = "https://gitlab.freedesktop.org/" + "xorg/driver/xf86-video-intel.git";
    64:             sha256 = "14rwbbn06l8qpx7s5crxghn80vgcx8jmfc7qvivh72d81r0kvywl";
    65:           };
    66:         }
    67:       );
    68:     };
    69: 
    70:     # xproto was replaced by xorgproto
    71:     xorgproto = super.xorg.xorgproto or super.xorg.xproto;
    72:   };
    73: 
    74:   tests =
    75:     with super.lib;
    76:     with rec {
    77:       stillBroken = name: pkg: {
    78:         name = "${name}StillNeedsOverride";
    79:         value = isBroken pkg;
    80:       };
    81: 
    82:       stillBrokenPkgs = mapAttrs' stillBroken {
    83:         inherit (super.xorg) xf86videointel;
    84:       };
    85:     };
    86:     stillBrokenPkgs
    87:     // {
    88:       inherit (self.python312Packages) dbus-next;
    89:       libproxyWorks = self.libproxy;
    90:     };
    91: }

Generated by git2html.