1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-26 07:31:20 +00:00
Nix Packages collection
Go to file
Maximilian Bosch 76cc15a364
nixos-option: don't abort with shell failures if options are not existant
`nixos-option` basically handles two cases: the given option is either a
valid option defined using `mkOption` or an attribute set which contains
a set of options.

If none of the above cases is valid, `$1` is invalid. Unfortunatley the
script interpreted invalid options as an attribute set which rendered
shell failures when trying to evaluate the arguments.

First of all, `if names=$(attrNames ...)` resulted in `<PRIMOP>` as
`attrNames` simply evaluated `builtins.attrNames $result` which results
in a non-applied function with `$result` being empty. Trying to map over
this string using `nixMap` while applying `escapeQuotes` causes the bash
error as `eval echo "<PRIMOP>"` is invalid syntax.

Explicitly checking if `$result' contains a value (do we have an
attribute set?) and otherwise returning a warning and asking if $option
exists fixes the problem.

Fixes #48060
2018-10-10 13:19:52 +02:00
.github CONTRIBUTING.md: add clarification on periods in commit messages 2018-10-08 21:26:12 +01:00
doc Generate links to function definitions 2018-10-05 11:20:46 -04:00
lib version.nix: extract revision-fetching function 2018-10-05 11:06:28 -04:00
maintainers maintainers: change my email 2018-10-09 00:17:19 +02:00
nixos nixos-option: don't abort with shell failures if options are not existant 2018-10-10 13:19:52 +02:00
pkgs Merge pull request #48077 from Lassulus/bitlbee-discord 2018-10-09 23:32:43 +01:00
.dir-locals.el .dir-locals.el: init 2018-07-06 12:48:43 -04:00
.editorconfig Revert ".version: remove final newline" 2018-04-28 14:23:13 +02:00
.gitattributes gitattributes: disable merge=union in all-packages 2018-03-27 11:03:03 -05:00
.gitignore kde5: consolidate packages into desktops/kde-5 2016-03-01 10:36:00 -06:00
.version 18.09 -> 19.03 2018-09-02 16:45:00 -04:00
COPYING 2018 will be the year of NixOS 2018-01-04 17:59:52 -05:00
default.nix Fix local path to release notes in error message 2018-10-08 05:43:15 -05:00
README.md README: 18.03 -> 18.09 2018-10-05 18:23:57 -04:00

logo

Code Triagers Badge

Nixpkgs is a collection of packages for the Nix package manager. It is periodically built and tested by the Hydra build daemon as so-called channels. To get channel information via git, add nixpkgs-channels as a remote:

% git remote add channels https://github.com/NixOS/nixpkgs-channels.git

For stability and maximum binary package support, it is recommended to maintain custom changes on top of one of the channels, e.g. nixos-18.09 for the latest release and nixos-unstable for the latest successful build of master:

% git remote update channels
% git rebase channels/nixos-18.09

For pull-requests, please rebase onto nixpkgs master.

NixOS Linux distribution source code is located inside nixos/ folder.

Communication: