Skip to content

Commit

Permalink
Fix conflicting flag definitions #254
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishmack committed Oct 13, 2019
1 parent 147cf21 commit 256610c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
13 changes: 5 additions & 8 deletions docs/user-guide/projects.md
Expand Up @@ -30,8 +30,8 @@ let
# packages.cbors.package.ghcOptions = "-Werror";
# packages.cbors.patches = [ ./one.patch ];
# packages.cbors.flags.optimize-gmp = false;
# It may be better to set flags in stack.yaml instead (overrides will
# be included for them automatically by `stack-to-nix`).
# It may be better to set flags in stack.yaml instead
# (`stack-to-nix` will include them as defaults).
];
};
Expand All @@ -44,12 +44,9 @@ let
# example:
# packages.cbors.package.ghcOptions = "-Werror";
# packages.cbors.patches = [ ./one.patch ];
# To override a flag you will need to use mkOverride to make
# it clear that you wish to replace the value found in the
# `plan.json` file (all the flags values are included there
# by `cabal`).
# packages.cbors.flags.optimize-gmp = stdenv.lib.mkOverride 10 false;
# It may be better to set flags in `cabal.project` instead.
# packages.cbors.flags.optimize-gmp = false;
# It may be better to set flags in `cabal.project` instead
# (`plan-to-nix` will include them as defaults).
];
};
Expand Down
6 changes: 3 additions & 3 deletions nix-tools/nix-tools-src.json
@@ -1,7 +1,7 @@
{
"url": "https://github.com/input-output-hk/nix-tools",
"rev": "87d97c50a53e421ed016d4c9a1dc41f9e6edda53",
"date": "2019-10-12T14:56:33+08:00",
"sha256": "1zvk13haiiyb6mcmypjn20i6vcx98y8zp5ipj0vpbflpg7f6rldm",
"rev": "1b3d624d6f23ae932508d54954a42a5e489e06a5",
"date": "2019-10-13T14:17:51+08:00",
"sha256": "13lv0sdrwcc56yl46nfkh9vi10y3cd1jns9ghac56h0y9pdn0jbc",
"fetchSubmodules": false
}
7 changes: 1 addition & 6 deletions test/buildable/default.nix
Expand Up @@ -9,12 +9,7 @@ let
});
pkgSet = mkCabalProjectPkgSet {
plan-pkgs = plan.pkgs;
# We need mkOverride to override the value from `plan.json`.
# Normally we could set the flag in `cabal.project`,
# but for this test that does not work because then cabal would
# see the exe is not buildable and exclude it before haskell.nix
# can.
modules = [ { packages.buildable-test.flags.exclude-broken = mkOverride 10 true; } ];
modules = [ { packages.buildable-test.flags.exclude-broken = true; } ];
};
packages = pkgSet.config.hsPkgs;
in
Expand Down

0 comments on commit 256610c

Please sign in to comment.