Skip to content

Commit

Permalink
nix: added nightly to config flags
Browse files Browse the repository at this point in the history
Use
```
nix-build --arg config '{ nightly = true; }' -A nightly-checks.ouroboros-network-framework
```
to build nightly checks of `ouroboros-network-framework`.
  • Loading branch information
coot committed Mar 14, 2022
1 parent 62dee5b commit fa58411
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 7 additions & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
# }'
, sourcesOverride ? { }
# pinned version of nixpkgs augmented with overlays (iohk-nix and our packages).
, pkgs ? import ./nix { inherit system crossSystem config sourcesOverride; }
, pkgs ? import ./nix { inherit system crossSystem sourcesOverride;
config = { nightly = false; } // config;
}
, gitrev ? pkgs.iohkNix.commitIdFromGitRepoOrZero ./.git }:
with pkgs;
with commonLib;
Expand Down Expand Up @@ -61,6 +63,10 @@ let
haskellPackages.ouroboros-consensus-cardano-test.components.tests.test;
Shelley =
haskellPackages.ouroboros-consensus-shelley-test.components.tests.test;
ouroboros-network-framework =
haskellPackages.ouroboros-network-framework.components.tests.test;
ouroboros-network =
haskellPackages.ouroboros-network.components.tests.test;
};

shell = import ./shell.nix {
Expand Down
5 changes: 4 additions & 1 deletion nix/ouroboros-network.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
{ lib, stdenv, pkgs, haskell-nix, buildPackages, config ? { }
# Enable profiling
, profiling ? config.haskellNix.profiling or false
, libsodium-vrf ? pkgs.libsodium-vrf }:
, libsodium-vrf ? pkgs.libsodium-vrf
}:
let
compiler-nix-name = pkgs.localConfig.ghcVersion;
src = haskell-nix.haskellLib.cleanGit {
Expand Down Expand Up @@ -78,6 +79,7 @@ let
"xhtml"
# "stm" "terminfo"
];
packages.ouroboros-network-testing.flags.nightly = config.nightly;
# ruby/perl dependencies cannot be cross-built for cddl tests:
packages.ouroboros-network.flags.cddl = false;

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

0 comments on commit fa58411

Please sign in to comment.