Make repository importable as NUR (including an overlay)
https://github.com/nix-community/NUR is a Nix community project that aims to make out of tree derivations more easily discoverable and accessible to Nix users. Converting the nix-bitcoin repo to conform to that style is a minor change and enhances reusability of its components. For instance, I could slap on the clightning module more easily onto my existing bitcoin node without having to redeploy the whole as nixops driven installation. Having the repo in NUR style would make that easier.
This commit is contained in:
parent
95b42b62a8
commit
687bf8017d
5 changed files with 80 additions and 21 deletions
21
overlay.nix
Normal file
21
overlay.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# You can use this file as a nixpkgs overlay.
|
||||
# It's useful in the case where you don't want to add the whole NUR namespace
|
||||
# to your configuration.
|
||||
|
||||
self: super:
|
||||
|
||||
let filterSet =
|
||||
(f: g: s: builtins.listToAttrs
|
||||
(map
|
||||
(n: { name = n; value = builtins.getAttr n s; })
|
||||
(builtins.filter
|
||||
(n: f n && g (builtins.getAttr n s))
|
||||
(builtins.attrNames s)
|
||||
)
|
||||
)
|
||||
);
|
||||
in filterSet
|
||||
(n: !(n=="lib"||n=="overlays"||n=="modules")) # filter out non-packages
|
||||
(p: true) # all packages are ok
|
||||
(import ./default.nix { pkgs = super; })
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue