add repoOverrides option
This commit is contained in:
parent
b37a7ee053
commit
9e87e21189
2 changed files with 24 additions and 2 deletions
20
README.md
20
README.md
|
|
@ -350,6 +350,26 @@ with pkgs.lib;
|
|||
}
|
||||
```
|
||||
|
||||
## Overriding repositories
|
||||
|
||||
You can override repositories using `repoOverrides` argument.
|
||||
This allows to test changes before publishing.
|
||||
|
||||
```
|
||||
{
|
||||
packageOverrides = pkgs: {
|
||||
nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") {
|
||||
inherit pkgs;
|
||||
repoOverrides = {
|
||||
mic92 = import ../nur-packages;
|
||||
## remote locations are also possible:
|
||||
# mic92 = import (builtins.fetchTarball "https://github.com/your-user/nur-packages/archive/master.tar.gz");
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
## Contribution guideline
|
||||
|
||||
- When adding packages to your repository make sure they build and set
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
{ nurpkgs ? import <nixpkgs> {} # For nixpkgs dependencies used by NUR itself
|
||||
# Dependencies to call NUR repos with
|
||||
, pkgs ? null }:
|
||||
, pkgs ? null
|
||||
, repoOverrides ? { }
|
||||
}:
|
||||
|
||||
let
|
||||
manifest = (builtins.fromJSON (builtins.readFile ./repos.json)).repos;
|
||||
|
|
@ -20,6 +22,6 @@ let
|
|||
};
|
||||
|
||||
in {
|
||||
repos = lib.mapAttrs createRepo manifest;
|
||||
repos = (lib.mapAttrs createRepo manifest) // repoOverrides;
|
||||
repo-sources = lib.mapAttrs repoSource manifest;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue