Skip to content

Commit ffcd027

Browse files
committed
nix: added nightly to config flags
Use ``` nix-build --arg config '{ nightly = true; }' -A nightly-checks.ouroboros-network-framework ``` to build nightly checks of `ouroboros-network-framework`.
1 parent 62dee5b commit ffcd027

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

default.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{ system ? builtins.currentSystem, crossSystem ? null
22
# allows to cutomize haskellNix (profiling, see ./nix/ouroboros-network.nix)
3-
, config ? { }
3+
, config ? { nightly = false; }
44
# allows to override dependencies of the project without modifications,
55
# eg. to test build against local checkout of nixpkgs and iohk-nix:
66
# nix build -f default.nix cardano-ledger-byron --arg sourcesOverride '{
@@ -61,6 +61,10 @@ let
6161
haskellPackages.ouroboros-consensus-cardano-test.components.tests.test;
6262
Shelley =
6363
haskellPackages.ouroboros-consensus-shelley-test.components.tests.test;
64+
ouroboros-network-framework =
65+
haskellPackages.ouroboros-network-framework.components.tests.test;
66+
ouroboros-network =
67+
haskellPackages.ouroboros-network.components.tests.test;
6468
};
6569

6670
shell = import ./shell.nix {

nix/ouroboros-network.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
{ lib, stdenv, pkgs, haskell-nix, buildPackages, config ? { }
55
# Enable profiling
66
, profiling ? config.haskellNix.profiling or false
7-
, libsodium-vrf ? pkgs.libsodium-vrf }:
7+
, libsodium-vrf ? pkgs.libsodium-vrf
8+
}:
89
let
910
compiler-nix-name = pkgs.localConfig.ghcVersion;
1011
src = haskell-nix.haskellLib.cleanGit {
@@ -78,6 +79,7 @@ let
7879
"xhtml"
7980
# "stm" "terminfo"
8081
];
82+
packages.ouroboros-network-testing.flags.nightly = config.nightly;
8183
# ruby/perl dependencies cannot be cross-built for cddl tests:
8284
packages.ouroboros-network.flags.cddl = false;
8385

@@ -110,6 +112,7 @@ let
110112
# Options for when not compiling to windows:
111113
({ pkgs, ... }:
112114
lib.mkIf (!pkgs.stdenv.hostPlatform.isWindows) {
115+
packages.ouroboros-network-testing.flags.nightly = config.nightly;
113116
packages.ouroboros-network.flags.cddl = true;
114117
packages.ouroboros-network.components.tests.cddl.build-tools =
115118
[ pkgs.cddl pkgs.cbor-diag ];

0 commit comments

Comments
 (0)