-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdefault.nix
41 lines (41 loc) · 1.68 KB
/
default.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
{ nixpkgs ? import <nixpkgs> {}
, doFunctionalTests ? false
, withBench ? false
, withDebug ? false
, withCoverage ? false
, withFuzz ? "none" # alterantively a list of sanitizers, or an option for sanitizerMap below.
, doCheck ? (doFunctionalTests || withCoverage)
, withTests ? doCheck
, withWallet ? true
, withGCC13Patches ? false
, gitDir ? null
, qaAssetsDir ?
nixpkgs.fetchFromGitHub {
owner = "roconnor-blockstream";
repo = "qa-assets";
rev = "d1e7bcf1b6d062bdeb0da9680b5ae2ea29dfba6b"; # temporary workaround
sha256 = "sha256-hLYDK5OX33kwflb1OOn1q/1cZnOclw+qbtP135pQDRE=";
}
# nixpkgs.fetchFromGitHub {
# owner = "ElementsProject";
# repo = "qa-assets";
# rev = "0c315a2951619857b8d02fadb6b1eda3c746b837";
# sha256 = "sha256-N8TqPPtHSOyHKuAS295Cf5bNsKNBYwoC/9/5QQgtUXk=";
# }
, unitTestDataDir ? if qaAssetsDir != null then "${qaAssetsDir}/unit_test_data" else null
, fuzzSeedCorpusDir ? if qaAssetsDir != null then "${qaAssetsDir}/fuzz_seed_corpus" else null
}:
let sanitizerMap = {
none = [];
fast = ["fuzzer"];
full = ["address" "fuzzer" "undefined" "integer"];
}; in
nixpkgs.callPackage ./elements.nix {
inherit doCheck doFunctionalTests withBench withCoverage withDebug withTests withWallet withGCC13Patches
qaAssetsDir unitTestDataDir fuzzSeedCorpusDir;
sanitizers = if builtins.isString withFuzz then sanitizerMap.${withFuzz} else withFuzz;
miniupnpc = nixpkgs.callPackage ./miniupnpc-2.2.7.nix { };
lcov = nixpkgs.callPackage ./lcov-1.16.nix { };
stdenv = nixpkgs.clangStdenv;
${if gitDir == null then null else "withSource"} = builtins.fetchGit gitDir;
}