Skip to content

Fix conflicting flag definitions #254 #258

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions docs/user-guide/projects.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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