forked from cardano-foundation/cardano-wallet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease.nix
74 lines (65 loc) · 2.27 KB
/
release.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
67
68
69
70
71
72
73
74
# TODO: delete this file once https://github.com/input-output-hk/cardano-wallet/pull/2997
# is merged.
############################################################################
#
# Hydra release jobset.
#
# The purpose of this file is to select jobs defined in default.nix and map
# them to all supported build platforms.
#
# The layout is PLATFORM.ATTR-PATH where
#
# * PLATFORM is one of
# - linux.native - normal glibc build
# - linux.musl - fully static build with musl libc
# - windows - cross-compiled windows
# - musl64 - build the job for Linux, but statically linked with musl libc
#
# * ATTR-PATH is usually an attribute from default.nix. Some
# release-only attributes are added and others are filtered out.
#
# Discover jobs by using tab completion in your shell:
# nix-build release.nix -A <TAB>
# ... or by looking at the jobset evaluated by Hydra:
# https://hydra.iohk.io/jobset/Cardano/cardano-wallet#tabs-jobs
#
# To build locally when you do not have access to remote builders for
# either macOS or Linux, change the `supportedSystems` argument.
# - To build on Linux (without macOS):
# nix-build --arg supportedSystems '["x86_64-linux"]' release.nix
# - To build on macOS (without Linux):
# nix-build --arg supportedSystems '["x86_64-darwin"]' supportedCrossSystems '["x86_64-darwin"]' release.nix
#
############################################################################
# The project sources
{ cardano-wallet ? { outPath = ./.; }
# The systems that the jobset will be built for.
, supportedSystems ? [ "x86_64-linux" ]
# A Hydra option
, scrubJobs ? true
# Dependencies overrides
, override-inputs ? { }
# GitHub PR number (as a string), provided as a Hydra input
, pr ? null
# Can be "staging" or "trying" to indicate that this is a bors jobset
, borsBuild ? null
# Platform filter string for jobset.
, platform ? "all"
# Enable debug tracing
, debug ? false
}@args:
let
inherit (import ./nix/flake-compat.nix (args) // {
gitrev = cardano-wallet.rev or null;
src = cardano-wallet;
}) defaultNix;
jobs =
if (borsBuild != null)
then defaultNix.hydraJobsBors
else if (pr != null)
then defaultNix.hydraJobsPr
else defaultNix.hydraJobs;
in
jobs // {
inherit (jobs.linux.musl) cardano-wallet-linux64;
}