pkgs: import pinned nixpkgs in default.nix

pkgs/default.nix now explicitly specifies all its dependencies as arguments.
This is required for flake support.

Also simplify pinned.nix and python-packages by removing unused attrs.
This commit is contained in:
Erik Arvstedt 2021-08-16 10:42:06 +02:00
parent 9b24a74b23
commit de77281cba
No known key found for this signature in database
GPG Key ID: 33312B944DD97846
3 changed files with 11 additions and 16 deletions

View File

@ -1,4 +1,10 @@
{ pkgs ? import <nixpkgs> {} }:
let
nixpkgsPinned = import ./nixpkgs-pinned.nix;
in
# Set default values for use without flakes
{ pkgs ? import <nixpkgs> { config = {}; overlays = []; }
, pkgsUnstable ? import nixpkgsPinned.nixpkgs-unstable { config = {}; overlays = []; }
}:
let self = {
spark-wallet = pkgs.callPackage ./spark-wallet { };
liquid-swap = pkgs.python3Packages.callPackage ./liquid-swap { };
@ -16,7 +22,7 @@ let self = {
packageOverrides = import ./python-packages self;
}).pkgs;
pinned = import ./pinned.nix;
pinned = import ./pinned.nix pkgs pkgsUnstable;
modulesPkgs = self // self.pinned;
}; in self

View File

@ -1,12 +1,6 @@
let
nixpkgsPinned = import ./nixpkgs-pinned.nix;
nixpkgsStable = import nixpkgsPinned.nixpkgs { config = {}; overlays = []; };
nixpkgsUnstable = import nixpkgsPinned.nixpkgs-unstable { config = {}; overlays = []; };
nixBitcoinPkgsStable = import ./. { pkgs = nixpkgsStable; };
nixBitcoinPkgsUnstable = import ./. { pkgs = nixpkgsUnstable; };
in
pkgs: pkgsUnstable:
{
inherit (nixpkgsUnstable)
inherit (pkgsUnstable)
bitcoin
bitcoind
charge-lnd
@ -21,8 +15,5 @@ in
lightning-loop
lightning-pool;
inherit nixpkgsStable nixpkgsUnstable;
stable = nixBitcoinPkgsStable;
unstable = nixBitcoinPkgsUnstable;
inherit pkgs pkgsUnstable;
}

View File

@ -4,8 +4,6 @@ let
joinmarketPkg = pkg: callPackage pkg { inherit (nbPkgs.joinmarket) version src; };
clightningPkg = pkg: callPackage pkg { inherit (nbPkgs.pinned) clightning; };
unstable = (import ../nixpkgs-pinned.nix).nixpkgs-unstable;
in {
bencoderpyx = callPackage ./bencoderpyx {};
coincurve = callPackage ./coincurve {};