nur: init

This commit is contained in:
Raito Bezarius 2021-07-24 18:33:56 +02:00
parent b355eb6061
commit 67b0672f15
6 changed files with 42 additions and 0 deletions

12
default.nix Normal file
View file

@ -0,0 +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;
};
} // myPkgs // myPatchedPkgs

2
modules/default.nix Normal file
View file

@ -0,0 +1,2 @@
{
}

8
patches/default.nix Normal file
View file

@ -0,0 +1,8 @@
{ pkgs }:
let
# self is not included here to avoid recursion.
callPackage = pkgs.lib.callPackageWith pkgs;
self = rec {
};
in
self

4
patches/overlay.nix Normal file
View file

@ -0,0 +1,4 @@
self: super:
{
}

13
pkgs/default.nix Normal file
View file

@ -0,0 +1,13 @@
{ pkgs, lib ? pkgs.lib }:
let
callPackage = lib.callPackageWith (pkgs // self);
callPackageWithMerged = attrName: f: extraArgs:
let
mergedSubset = pkgs.${attrName} // self.${attrName};
subsetArgs = builtins.listToAttrs [{ name = attrName; value = mergedSubset; }];
in
callPackage f (subsetArgs // extraArgs);
self = rec {
};
in
self

3
pkgs/overlay.nix Normal file
View file

@ -0,0 +1,3 @@
self: super:
{
}