-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
66 lines (57 loc) · 1.7 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{
description = "A simple core lightning plugin that simplifies the Splice operation";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
goflake.url = "github:sagikazarmark/go-flake";
rust-overlay.url = "github:oxalica/rust-overlay";
};
outputs = { self, nixpkgs, flake-utils, goflake, rust-overlay, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ rust-overlay.overlay ];
};
clightning = pkgs.clightning.overrideAttrs (oldAttrs: {
version = "master-abfe";
src = pkgs.fetchgit {
url = "https://github.com/ElementsProject/lightning";
rev = "abfe55e2147ad6ff8d0a155cd49c90a6a659a164";
sha256 = "sha256-UDkrlss4ufd70zYWf6IESiJQ/yo9J7BSdVH5UKrIBbQ=";
fetchSubmodules = true;
};
configureFlags = [ "--disable-rust" "--disable-valgrind" ];
});
in {
packages = {
default = pkgs.gnumake;
};
formatter = pkgs.nixpkgs-fmt;
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
# build dependencies
libcap
gcc
pkg-config
git
gnumake
golangci-lint
go
rustc
cargo
# integration test dependencies
clightning
bitcoind
];
shellHook = ''
export CGO_ENABLED=0
export HOST_CC=gcc
export PWD=$(pwd)
export PLUGIN_NAME=cln4go-plugin
make dep
'';
};
}
);
}