Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 13b5c8a4db3a
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f9dd8f04a025
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Aug 12, 2018

  1. lib/strings: guard against an easy mistake

    This would catch the bad `fwknop` flags fixed in 580cab5,
    during evaluation already.
    vcunat committed Aug 12, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    fecb444 View commit details

Commits on Nov 11, 2020

  1. Merge pull request #44928 from vcunat/p/configure-assert

    lib/strings: guard against an easy mistake
    edolstra authored Nov 11, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f9dd8f0 View commit details
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/strings.nix
8 changes: 6 additions & 2 deletions lib/strings.nix
Original file line number Diff line number Diff line change
@@ -561,7 +561,9 @@ rec {
enableFeature false "shared"
=> "--disable-shared"
*/
enableFeature = enable: feat: "--${if enable then "enable" else "disable"}-${feat}";
enableFeature = enable: feat:
assert isString feat; # e.g. passing openssl instead of "openssl"
"--${if enable then "enable" else "disable"}-${feat}";

/* Create an --{enable-<feat>=<value>,disable-<feat>} string that can be passed to
standard GNU Autoconf scripts.
@@ -583,7 +585,9 @@ rec {
withFeature false "shared"
=> "--without-shared"
*/
withFeature = with_: feat: "--${if with_ then "with" else "without"}-${feat}";
withFeature = with_: feat:
assert isString feat; # e.g. passing openssl instead of "openssl"
"--${if with_ then "with" else "without"}-${feat}";

/* Create an --{with-<feat>=<value>,without-<feat>} string that can be passed to
standard GNU Autoconf scripts.