Skip to content

Commit

Permalink
nix: added -Wunused-packages
Browse files Browse the repository at this point in the history
But only to network packages & `ouroboros-node`.
  • Loading branch information
coot committed Nov 21, 2022
1 parent c0877f4 commit 743187f
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions nix/ouroboros-network.nix
Expand Up @@ -36,9 +36,26 @@ let
modules = [

{
# Compile all local packages with -Werror:
# Compile all local packages with -Werror and only
# network packages with -Wunused-packages:
packages = lib.genAttrs projectPackages
(name: { configureFlags = [ "--ghc-option=-Werror" ]; });
(name: { configureFlags =
if lib.elem name ["ntp-client"
"network-mux"
"ouroboros-network-api"
"ouroboros-network-framework"
"ouroboros-network-testing"
"ouroboros-network-mock"
"ouroboros-network-testing"
"ouroboros-network-protocols"
"ouroboros-network-protocols-test"
"ouroboros-network"
"cardano-client"
"ouroboros-node"
]
then [ "--ghc-options=-Wunused-packages"
"--ghc-option=-Werror" ]
else [ "--ghc-option=-Werror" ]; });
}
{
packages = lib.genAttrs projectPackages (name: {
Expand Down

0 comments on commit 743187f

Please sign in to comment.