~aasg/nixexprs

ref: 6b7331427bedf0458d000ea35c39a5289c45ae19 nixexprs/default.nix -rw-r--r-- 776 bytes
6b733142 — Aluísio Augusto Silva Gonçalves make-job-script: Extract systemd service script builder from Nixpkgs 5 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{ pkgs ? import <nixpkgs> { } }:

with import ./lib/extension.nix { inherit (pkgs) lib; };
let
  overlayToPackageSet = overlays: manifest:
    pipe overlays [
      pkgs.appendOverlays
      (copyAttrsByPath manifest)
      recurseIntoAttrsRecursive
    ];
  self = {
    lib = import ./lib { inherit (pkgs) lib; };
    modules = import ./modules;
    overlays = {
      pkgs = import ./pkgs/overlay.nix;
      patches = import ./patches/overlay.nix;
    };
    packageSets = {
      pkgs = overlayToPackageSet [ self.overlays.pkgs ] (import ./pkgs/manifest.nix);
      patches = overlayToPackageSet [ self.overlays.pkgs self.overlays.patches ] (import ./patches/manifest.nix);
    };
  };
in
foldl' recursiveUpdate self [
  self.packageSets.pkgs
  self.packageSets.patches
]