nix-bitcoin/modules/nix-bitcoin-pkgs.nix
Clemens Fruhwirth 5e40066c7f nanopos, lightning-charge and spark-wallet: Package via node2nix
The strategy of invoking node2nix inside a derivation (installPhase in
this case) does not work, as under NixOS installations there is no
network traffic allowed during a derivation build. Hence, we move
node2nix outside and rewrite the packaging into the modules.

Also switch to callPackage instead of plain imports. This could
probably be done on all other imported packages inside of
nix-bitcoin-pkgs.nix.
2019-03-25 14:32:55 +01:00

36 lines
1.2 KiB
Nix

{ config, pkgs, ... }:
let
nixpkgs-pinned = import ../pkgs/nixpkgs-pinned.nix;
nixpkgs-unstable = import nixpkgs-pinned.nixpkgs-unstable { };
# Custom packages
nodeinfo = (import ../pkgs/nodeinfo.nix) { inherit pkgs; };
banlist = (import ../pkgs/banlist.nix) { inherit pkgs; };
lightning-charge = pkgs.callPackage ../pkgs/lightning-charge { };
nanopos = pkgs.callPackage ../pkgs/nanopos { };
spark-wallet = pkgs.callPackage ../pkgs/spark-wallet { };
electrs = pkgs.callPackage (import ../pkgs/electrs.nix) { };
liquidd = pkgs.callPackage (import ../pkgs/liquidd.nix) { };
in {
disabledModules = [ "services/security/tor.nix" ];
imports = [
(nixpkgs-pinned.nixpkgs-unstable + "/nixos/modules/services/security/tor.nix")
];
nixpkgs.config.packageOverrides = pkgs: {
# Use bitcoin and clightning from unstable
bitcoin = nixpkgs-unstable.bitcoin.override { };
altcoins.bitcoind = nixpkgs-unstable.altcoins.bitcoind.override { };
clightning = nixpkgs-unstable.clightning.override { };
# Add custom packages
inherit nodeinfo;
inherit banlist;
inherit lightning-charge;
inherit nanopos;
inherit spark-wallet;
inherit electrs;
inherit liquidd;
};
}