3
0
Fork 0
forked from mirrors/nixpkgs
Commit graph

3391 commits

Author SHA1 Message Date
Robert Hensing fb21e6d7dd
Merge pull request #234070 from tweag/pathType-tests
Init `nixVersions.minimum` and fix `lib` tests for all Nix versions
2023-06-01 20:00:36 +02:00
Silvan Mosberger 013acf2396 lib/tests: Also run with nixVersions.minimum and nixVersions.unstable
The previous commits ensure that the tests also succeed with those
versions
2023-06-01 18:07:33 +02:00
Silvan Mosberger 0b6021ee53 lib/tests: Fix when run with Nix 2.3 2023-06-01 18:07:33 +02:00
Silvan Mosberger de0c11241f lib/tests/filesystem.sh: Check success and failure separately 2023-06-01 18:07:33 +02:00
Alyssa Ross 4e80f80864 lib.systems.doubles: add big-endian MIPS linux doubles
We already have examples for these, but since we didn't actually
recognise the doubles, it wasn't possible to build any packages for
them without setting allowUnsupportedSystem.
2023-06-01 10:42:27 +00:00
Alyssa Ross 94d9a6ce17 lib.systems: remove mipsisa(32|64)r6 triples
These arc the same as the normal triples apart for a difference in
-march, so there's no need for them to be separate triples.
2023-06-01 10:42:27 +00:00
Robert Hensing 5319ddf7dc lib.concatMapAttrs: Simplify stack trace 2023-05-31 14:57:37 +02:00
Silvan Mosberger 04db3589a8 lib.filesystem.pathType: Fix tests for Nix >= 2.14 2023-05-25 22:39:28 +02:00
Robert Hensing a344acdc7f
Merge pull request #224834 from tweag/pathType-and-co
Improvements to pathType, pathIsDirectory and pathIsRegularFile
2023-05-23 09:32:01 +02:00
Raito Bezarius 2c28f1de7c 23.11 is Tapir 2023-05-22 21:16:04 +02:00
Ryan Lahfa f4520c5e78
Merge pull request #233050 from NixOS/bsl-is-redistributable
lib/licenses: Business Source License 1.1 is redistributable
2023-05-22 14:34:36 +02:00
Silvan Mosberger 378bf1a619 lib/filesystem.nix: Update top comment
Co-Authored-By: Robert Hensing <robert@roberthensing.nl>
2023-05-22 14:17:42 +02:00
Silvan Mosberger fcaa2b1097 lib.filesystem.pathType: Use new builtins.readFileType if available
Co-Authored-By: Robert Hensing <robert@roberthensing.nl>
2023-05-22 14:13:57 +02:00
Silvan Mosberger 84a3d633d6 lib.filesystem.pathType and co.: Improve documentation 2023-05-22 14:13:57 +02:00
Silvan Mosberger d064d972f0 lib.filesystem.pathType: Improve error for non-existent paths
Previously it would fail with

  error: attribute 'nonexistent' missing

         at nixpkgs/lib/filesystem.nix:29:10:

             28|     if dirOf path == path then "directory"
             29|     else (readDir (dirOf path)).${baseNameOf path};
               |          ^
             30|
2023-05-22 14:13:57 +02:00
Silvan Mosberger bb6eab0bdb lib.filesystem.pathType: Fix for filesystem root argument
Previously this function couldn't handle / being passed, it would throw
an error:

error: attribute '' missing

       at nixpkgs/lib/filesystem.nix:24:20:

           23|   */
           24|   pathType = path: (readDir (dirOf path)).${baseNameOf path};
             |                    ^
           25|

Consequently this also fixes the
lib.filesystem.{pathIsDirectory,pathIsRegularFile} functions.
2023-05-22 14:13:57 +02:00
Silvan Mosberger 5346636c20 lib.filesystem: Minor refactor
Co-Authored-By: Robert Hensing <robert@roberthensing.nl>
2023-05-22 14:13:57 +02:00
Silvan Mosberger a1dedc908d lib.filesystem.pathType and co.: Add tests
Co-Authored-By: Robert Hensing <robert@roberthensing.nl>
2023-05-22 14:13:45 +02:00
Robert Hensing fc89970a26
Merge pull request #232808 from ncfavier/mkPackageOption-nullable
lib/options: nullable mkPackageOption
2023-05-22 11:59:10 +02:00
Martin Wurm d79d7bdbf4 lens: Change lens' listed license from MIT to their own proprietary license.
Although Lens is based on a free core component ("OpenLens"), the tarballs
provided by Mirantis include a proprietary version of Lens that requires
a subscription.

As the proprietary option offers additional features, it would not be wise
to simply rewrite the derivation and base it on the FOSS source code.
Instead, implementing a new derivation for OpenLens is likely the better
approach.
2023-05-22 09:46:14 +00:00
Raito Bezarius f5b67921f6 lib/licenses: Business Source License 1.1 is redistributable
It is written in its text, still unfree though and cannot be used for *production*.
2023-05-20 19:01:30 +02:00
Naïm Favier ac9915b1ea
lib/tests: add mkPackageOption tests 2023-05-20 18:23:41 +02:00
figsoda c8fc2ec398 lib: fix typos 2023-05-19 22:09:24 -04:00
Naïm Favier 4a56b2655e
lib/options: nullable mkPackageOption
It is sometimes useful to allow setting a package option to `null` to
skip installing the package. See
https://github.com/nix-community/home-manager/pull/3668#issuecomment-1554044171
for example.
2023-05-19 12:22:21 +02:00
Robert Hensing 2e485f2581 lib.types.submoduleWith: Interoperate with older version of submoduleWith 2023-05-17 12:51:09 +02:00
COLAMAroro 10092e1418 licenses: add CC-BY-NC-ND-4.0 2023-05-15 17:32:59 +00:00
Sandro a6e11cd56d
Merge pull request #210461 from benwbooth/jxplorer 2023-05-15 15:41:05 +02:00
Ben Booth 20060ea769 JXplorer: init at 3.3.1.2 2023-05-12 11:35:40 -07:00
Robert Hensing 5c3e59b6d6
Merge pull request #230523 from hercules-ci/fast-nixos-test-eval
Fast nixos test eval
2023-05-11 17:34:46 +02:00
Robert Hensing 16d594a0e2 lib.types.pkgs: init
A nominal type.
2023-05-10 15:55:08 +02:00
Alyssa Ross 91488fb6db
lib.systems: remove (accidental?) rust/rustc alias
I imagine this was supposed to be rustc = args.rustc, like the other
two lines.  This meant that we accepted both rust and rustc
attributes, with the same effect.  I doubt anybody was using the
undocumented, probably-accidental "rust" spelling, but we should
remove it before somebody starts.

In fact, we don't need to set rustc here at all, because no value
platforms.select could return will ever include a rustc key (unlike
the other two), so then rustc will be filled in later, when args is
merged into final.
2023-05-09 17:49:05 +00:00
Adam Joseph 89325a10b0
Merge pull request #228013 from amjoseph-nixpkgs/pr/qemuArch/mips
lib/systems: add mips64[el] entries to qemuArch
2023-05-09 06:39:13 +00:00
Naïm Favier 6674b8a6f1
Merge pull request #230353 from ncfavier/defaultText-only
lib/options: fix rendering of options with only a defaultText
2023-05-08 14:38:35 +02:00
github-actions[bot] 3510094ebe
Merge master into staging-next 2023-05-07 00:02:36 +00:00
Robert Hensing eab660d91e lib.modules: configurationClass -> class
This simplifies the documentation. `configuration` is implied by `_type`.
2023-05-06 18:32:59 +02:00
Robert Hensing 89491bef8d lib.modules: in evalModules return move _module.class -> configurationClass 2023-05-06 18:32:59 +02:00
Robert Hensing fd88c79418 lib.modules: Change class declaration in module to _class 2023-05-06 18:32:59 +02:00
Robert Hensing 7459c02495 lib/tests/modules.sh: Add submodule + class tests 2023-05-06 18:32:59 +02:00
Robert Hensing 8054785157 lib/modules: Move class out of specialArgs 2023-05-06 18:32:58 +02:00
Robert Hensing 73f584c3cc lib/modules.nix: Deduplicate documentation
`file://./..` looks redundant, but makes the url clickable in vscode.
2023-05-06 18:32:58 +02:00
Robert Hensing 84b1b01702 lib/modules: Only interpret class declaration in non-shorthand mode
This is to avoid stealing keys from submodules. `class` might be
common enough that reinterpreting existing `class` attributes in
configurations as a declaration leads to fairly widespread problems.
2023-05-06 18:29:04 +02:00
Robert Hensing 1f4a58ef03 lib/modules.nix: Refactor: extract applyModuleArgs 2023-05-06 18:29:04 +02:00
Robert Hensing 06ca78663c lib/modules.nix: Refactor: evaluate applyModuleArgsIfFunction in attrs case 2023-05-06 18:29:04 +02:00
Robert Hensing 439f6790bd lib/modules.nix: Restore old collectModules interface 2023-05-06 18:29:04 +02:00
Robert Hensing 9714487f74 lib/modules: Explain that a configuration can't be loaded as a module 2023-05-06 18:29:04 +02:00
Robert Hensing 2e689d58cb lib/modules: Improve error when a configuration is imported
This is appears to be a fairly common mistake for beginners who want
to build larger things from the system configurations, such as NixOps
networks, etc. Further explanation seems appropriate.
2023-05-06 18:29:03 +02:00
Robert Hensing 58f385f680 lib/modules: Check against importing things with a _type 2023-05-06 18:29:03 +02:00
Robert Hensing b8ff2807a2 lib/modules: Add class concept to check imports
This improves the error message when an incompatible module is
imported.
2023-05-06 18:29:03 +02:00
Robert Hensing 3633bf98be lib/modules.nix: Make some functions private
The supposedly public nature of these functions has been holding
back module system maintenance, while usages of these functions
are expected to be rare. If used anywhere, presumably they're
emulating module system behavior because some use case isn't supported
properly. We should try to support such a use case directly, if it
even exists.
2023-05-06 18:29:03 +02:00
Robert Hensing fe15279390 lib/modules.nix: Use explicit exports 2023-05-06 18:22:51 +02:00