| Commit message (Collapse) | Author | Age |
|\
| |
| | |
lib.mkRemovedOptionModule: Show replacement for option usage too
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously mkRemovedOptionModule would only show the replacement
instructions when the removed option was *defined*. With this change, it
also does so when an option is *used*.
This is essential for options that are only intended to be used such as
`security.acme.directory`, whose replacement instructions would never
trigger without this change because almost everybody only uses the
option and isn't defining it.
|
|\ \
| | |
| | | |
lib: Add armv7a-linux to doubles.nix
|
| | |
| | |
| | |
| | | |
This is needed for android.
|
|\ \ \
| |_|/
|/| | |
mkRemovedOptionModule: assert on removed options
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We don't want to ignore config that can mess up machines. In general
this should always fail evaluation, as you think you are changing
behaviour and don't, which can easily create run-time errors we can
catch early.
|
|\ \ \
| |/ /
|/| | |
Replace uses of splitString for splitting version strings
|
| | | |
|
| | | |
|
| | | |
|
|/ / |
|
| | |
|
|/
|
|
|
| |
* Markhor is a spiral horned animal that is on the endangered species list
* https://en.wikipedia.org/wiki/Markhor
|
|\ |
|
| |\
| | |
| | | |
lib.cleanSourceWith: Allow name to be set, optional filter, doc
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This change is API-compatible and hash-compatible with the previous
version.
At first I considered to write a rename function too, but adding
it name to cleanSourceWith was a no-brainer for ease of use. It
turns out that a rename function isn't any more useful than
cleanSourceWith.
To avoid having to write the identity predicate when renaming,
the filter is now optional.
builtins.path is supported since Nix 2.0 which is required by nixpkgs
|
| |/ |
|
|\| |
|
| | |
|
| |\ |
|
| | |\ |
|
| | |\ \ |
|
| | | | | |
|
| | |_|/
| |/| | |
|
| |/ / |
|
| | |
| | |
| | |
| | | |
This adds enough logic to nixpkgs to support the `js-unknown-ghcjs` triple.
|
|\ \ \
| | |/
| |/| |
|
| |\ \
| | | |
| | | | |
lib/modules: Use options `apply` function even if no values are defined
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This allows `apply` functions to return a valid value if they completely
ignore their argument, which is the case for the option renaming
functions like `mkAliasOptionModule`. Therefore this solves issue #63693
|
| | | | |
|
|\| | | |
|
| | | | |
|
| |\ \ \ |
|
| | | | | |
|
| |\ \ \ \
| | | |/ /
| | |/| | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The main purpose is to bring attention to `flip map`, which improves
code readablity. It is useful when ad-hoc anonymous function
grows two or more lines in `map` application:
```
map (lcfg:
let port = lcfg.port;
portStr = if port != defaultPort then ":${toString port}" else "";
scheme = if cfg.enableSSL then "https" else "http";
in "${scheme}://cfg.hostName${portStr}"
) (getListen cfg);
```
Compare this to `foreach`-style:
```
foreach (getListen cfg) (lcfg:
let port = lcfg.port;
portStr = if port != defaultPort then ":${toString port}" else "";
scheme = if cfg.enableSSL then "https" else "http";
in "${scheme}://cfg.hostName${portStr}"
);
```
This is similar to Haskell's `for` (http://hackage.haskell.org/package/base-4.12.0.0/docs/Data-Traversable.html#v:for)
|
| |_|/ /
|/| | | |
|
|\ \ \ \
| |_|/ /
|/| | | |
lib/types: Add oneOf, extension of either to a list of types
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | | |
lib/types: change merge strategy for `str`, `int`, `float`, `path` and `enum`
|
| |/ /
| | |
| | |
| | | |
Change to `mergeEqualOption`.
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
`sourceByRegex src regexes` should include a source file if one of the
regular expressions `regexes` matches the path of that file relative
to `src`.
However to compute this relative path `sourceByRegex` uses:
```
relPath = lib.removePrefix (toString src + "/") (toString path);
```
Note that `toString path` evaluates to an absolute file somewhere
under `src` and not under `/nix/store`.
The problem is that this doesn't work if `src` is a `cleanSourceWith`
invocation as well because `toString src` will then evaluate to
`src.outPath` which will evaluate to `builtins.filterSource ...` which
evaluates to a path in `/nix/store` which is not a prefix of `path`.
The solution is to replace `src` with `origSrc` where
```
origSrc = if isFiltered then src.origSrc else src;
isFiltered = src ? _isLibCleanSourceWith;
```
Test this by executing the following from the nixpkgs repo:
```
(cat << 'EOI'
let
pkgs = import ./. {};
in pkgs.runCommand "test-sourceByRegex" {
test_sourceByRegex =
let
src1 = pkgs.lib.sourceByRegex ./. [ "^test-sourceByRegex.nix$" ];
src2 = pkgs.lib.sourceByRegex src1 [ "^test-sourceByRegex.nix$" ];
in src2 + "/test-sourceByRegex.nix";
} ''
cp $test_sourceByRegex $out
''
EOI
) > test-sourceByRegex.nix
nix-build test-sourceByRegex.nix
```
|
| |
| |
| |
| |
| | |
The misc.nix and systems.nix tests were invoked at three different
places. Let's not that.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit ce2f74df2cade57e74c235292c8b074281903e71.
Doubles are treated as -darwin here, to provide some consistency.
There is some ambiguity between “x86_64-darwin” and “i686-darwin”
which could refer to binaries linked between iOS simulator or real
macOS binaries. useiOSPrebuilt can be used to determine which to use,
however.
|
| |
| |
| |
| |
| |
| |
| |
| | |
The lib tests need to be fixed as well.
This unbreaks the tarball job.
This reverts commit 00ba557856d6217121e50ea69c251e9458d9dc08.
|
| |
| |
| |
| |
| |
| | |
These are used in cross-compilation to iOS devices and simulators.
Fallout from #60349.
|
| |
| |
| |
| |
| |
| | |
* treewide: remove unused variables
* making ofborg happy
|
|\ \
| | |
| | | |
NixOS module system: improve one of error messages
|