~aasg/nixexprs

2c99640645776b88c53492ac530147bbc65106df — Aluísio Augusto Silva Gonçalves 10 months ago ee2d3b5
Expose patches packages to NUR

The pkgs/patches split only exists for ease of upstreaming; I use the
patched versions myself (system-wide via overlays, in projects via
default.nix).  *If* someone needs an unpatched version, I'm sure we can
figure something out then (and only then).
4 files changed, 18 insertions(+), 12 deletions(-)

M default.nix
A patches/default.nix
M patches/haunt/default.nix
M patches/overlay.nix
M default.nix => default.nix +5 -2
@@ 1,9 1,12 @@
{ pkgs ? import <nixpkgs> { } }:

let
  myPkgs = import ./pkgs { inherit pkgs; };
  myPatchedPkgs = import ./patches { pkgs = pkgs // myPkgs; };
in
{
  modules = import ./modules;
  overlays = {
    pkgs = import ./pkgs/overlay.nix;
    patches = import ./patches/overlay.nix;
  };
} // (import ./pkgs { inherit pkgs; })
} // myPatchedPkgs

A patches/default.nix => patches/default.nix +5 -0
@@ 0,0 1,5 @@
{ pkgs }:

{
  haunt = pkgs.callPackage ./haunt { };
}

M patches/haunt/default.nix => patches/haunt/default.nix +4 -6
@@ 1,7 1,5 @@
{ pkgs }:
{ haunt }:

{
  haunt = pkgs.haunt.overrideAttrs (oldAttrs: rec {
    patches = [ ./restore-raw.patch ];
  });
}
haunt.overrideAttrs (oldAttrs: rec {
  patches = [ ./restore-raw.patch ];
})

M patches/overlay.nix => patches/overlay.nix +4 -4
@@ 1,5 1,5 @@
self: super:
let
  patches = [ ./haunt ];
in
builtins.foldl' (set: path: set // (import path { pkgs = (super // set); })) { } patches

{
  haunt = import ./haunt { haunt = super.haunt; };
}