make pinned pkgs accessible through pkgs/default.nix

Useful for developing and for importing pinned pkgs via config.nix.
This commit is contained in:
Erik Arvstedt 2020-03-04 18:08:46 +01:00
parent aca23197d3
commit cce9932b62
No known key found for this signature in database
GPG Key ID: 33312B944DD97846
3 changed files with 18 additions and 11 deletions

View File

@ -1,15 +1,6 @@
{ config, pkgs, lib, ... }:
let
nixpkgs-pinned = import ../pkgs/nixpkgs-pinned.nix;
unstable = import nixpkgs-pinned.nixpkgs-unstable {};
allPackages = pkgs: (import ../pkgs { inherit pkgs; }) // {
bitcoin = unstable.bitcoin.override { miniupnpc = null; };
bitcoind = unstable.bitcoind.override { miniupnpc = null; };
clightning = unstable.clightning;
lnd = unstable.lnd;
};
in {
{
imports = [
./bitcoind.nix
./clightning.nix
@ -37,7 +28,10 @@ in {
config = {
nixpkgs.overlays = [ (self: super: {
nix-bitcoin = allPackages super;
nix-bitcoin = let
pkgs = import ../pkgs { pkgs = super; };
in
pkgs // pkgs.pinned;
}) ];
};
}

View File

@ -10,4 +10,6 @@
pylightning = pkgs.python3Packages.callPackage ./pylightning { };
liquid-swap = pkgs.python3Packages.callPackage ./liquid-swap { };
generate-secrets = pkgs.callPackage ./generate-secrets { };
pinned = import ./pinned.nix;
}

11
pkgs/pinned.nix Normal file
View File

@ -0,0 +1,11 @@
let
nixpkgsPinned = import ./nixpkgs-pinned.nix;
unstable = import nixpkgsPinned.nixpkgs-unstable { config = {}; overlays = []; };
in
{
bitcoin = unstable.bitcoin.override { miniupnpc = null; };
bitcoind = unstable.bitcoind.override { miniupnpc = null; };
inherit (unstable)
clightning
lnd;
}