summary refs log tree commit diff
path: root/lib
Commit message (Collapse)AuthorAge
...
* | | | lib/default.nix: include mesonOption-related functionsAndersonTorres2022-12-06
| | | | | | | | | | | | | | | | To bring them to the scope when calling `lib`.
* | | | lib/strings.nix: add mesonOption utility functionAndersonTorres2022-12-06
| | | | | | | | | | | | | | | | And some friends, to help write Meson commandline invocations.
* | | | Merge pull request #204103 from ncfavier/doc-mkOrderValentin Gagarin2022-12-02
|\ \ \ \ | | | | | | | | | | nixos/doc: document `mkOrder` and friends
| * | | | nixos/doc: document `mkOrder` and friendsNaïm Favier2022-12-02
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a section on ordering option definitions. Also mention `mkDefault` in the section on `mkOverride`. Clarify the code a bit by renaming `defaultPriority` to `defaultOverridePriority` and introducing `defaultOrderPriority`.
* / / / lib/modules: Add context to the "option does not exist" errorRobert Hensing2022-12-02
|/ / / | | | | | | | | | | | | | | | | | | Add trace items that provide context for a failed definition that can not be caught within the Nix language. This also adds a test for the `tryEval` behavior of `showDefs`.
* | | Merge pull request #180964 from amjoseph-nixpkgs/pr/mkSkeletonFromList/simplifyJohn Ericson2022-11-22
|\ \ \ | | | | | | | | lib/systems/parse.nix: mkSkeletonFromList: improve readability
| * | | lib/systems/parse.nix: mkSkeletonFromList: improve readabilityAdam Joseph2022-11-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main purpose of this PR is to make the basis for `mkSkeletonFromList`'s decision between `cpu-kernel-libcabi` vs `cpu-vendor-os` clear, without changing its behavior. The existing code obscures this decision behind a sequence of prioritized matches (i.e. `if-then`) which jump around between different coordinates. Two side benefits of this PR: 1. It makes the root cause of #165836 obvious: we are missing a case for `cpu-vendor-libcabi`. This is why nixpkgs stumbles over `*-none-*`. 2. It illuminates some very weird corner cases in the existing logic, like `*-${vendor}-ghcjs` overriding the `vendor` field, and `mingw32` being transformed into `windows` in some cases. Co-authored-by: John Ericson <git@JohnEricson.me>
* | | | Merge pull request #202370 from Artturin/revertpartof1Artturi2022-11-22
|\ \ \ \ | |_|/ / |/| | | Revert "lib/trivial: fix 'error: cannot decode virtual path '/nix/sto…
| * | | Revert "lib/trivial: fix 'error: cannot decode virtual path ↵Artturin2022-11-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '/nix/store/virtual0000000000000000000000005-source''" This reverts commit b67ee6e861903abb04e9024d605dfc7b00922633. https://github.com/NixOS/nixpkgs/issues/202244 error: a string that refers to a store path cannot be appended to a path, at /etc/nixos/nix/nixos-unstable/lib/sources.nix:193:30 appears to happen when there's a nixpkgs git submodule > So one of the things that is different for a git submodule is that the .git folder isn't a folder, it's a textfile that contains (in my case) this: > $ cat nix/nixos-unstable/.git > gitdir: ../../.git/modules/nixpkgs
* | | | 23.05 is StoatMartin Weinelt2022-11-21
|/ / /
* | | Merge pull request #170737 from amjoseph-nixpkgs/fix-mips32-detectionArtturi2022-11-21
|\ \ \ | | | | | | | | lib/systems/platforms.nix: fix broken mips32 detection
| * | | platforms.nix: use `inherit` syntaxAdam Joseph2022-04-28
| | | |
| * | | lib/systems/platforms.nix: fix broken mips32 detectionAdam Joseph2022-04-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to this commit, nixpkgs would assume that every little-endian mips32 system was a "fuloong2f_n32". Not only are there plenty of mips32 chips other than the fuloong, but the fuloong is actually a mips64 chip! Note that the "n32" ABI is (confusingly) an ABI for 64-bit mips chips (like the "x32" ABI for amd64 chips -- both are ABIs which use 32-bit pointers on an otherwise-64-bit system). This error causes far-ranging problems. One of them was particularly difficult to track down: it caused GCC to select 128-bit `long double` types, which is invalid for the mips32 ABI. This isn't noticed until you try to build musl-libc, which is careful to check for these things. Prior to this commit, nix-build . -A pkgsCross.mipsel-linux-gnu.pkgsStatic.hello would fail. With this commit and #170736, it succeeds.
* | | | Merge pull request #201527 from figsoda/libfigsoda2022-11-21
|\ \ \ \ | | | | | | | | | | lib/attrsets: add concatMapAttrs
| * | | | lib/attrsets: add concatMapAttrsfigsoda2022-11-17
| | | | |
| * | | | lib/attrsets: simplify chooseDevOutputsfigsoda2022-11-17
| | | | |
* | | | | Merge pull request #201946 from Artturin/splicingstuff2Artturi2022-11-20
|\ \ \ \ \ | | | | | | | | | | | | lib.overrideDerivation: override attrs in __spliced && splice.nix: start deprecating nativeDrv and crossDrv
| * | | | | splice.nix: start deprecating nativeDrv and crossDrvArtturin2022-11-19
| | | | | |
| * | | | | lib.overrideDerivation: override attrs in __splicedArtturin2022-11-18
| |/ / / /
* / / / / lib/sources: make commitIdFromGitRepoOrError internal and use # for commentsArtturin2022-11-18
|/ / / / | | | | | | | | | | | | | | | | | | | | so that it doesn't make the manual build fail > Apparently this is related to the combination of this new function not getting exported from the file, while still getting documented.
* | | | Merge pull request #199812 from Artturin/removeusagesoftostringonpath1Artturi2022-11-17
|\ \ \ \ | | | | | | | | | | lib/sources: remove 2 usages of toString on a path which will be read using fileContents
| * | | | lib/sources: Make pathIsGitRepo not evaluate toString pathRobert Hensing2022-11-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This requires us to avoid the `tryEval` + `throw` combination, because throw is strict in its error message, and we don't want to drop our single clue when `commitIdFromGitRepo` is used incorrectly.
| * | | | lib/sources: remove 2 usages of toString on a path which will be read using ↵Artturin2022-11-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fileContents It gives a warning on the lazy-trees branch of Nix (NixOS/nix#6530) "warning: applying 'toString' to path '...' and then accessing it is deprecated, at '...'" 'else toString (/. + "${base}/${path}");' at line 183 may still cause a warning but i don't know how to reach that codepath and test so im leaving it untouched changing it to 'else /. + "${base}/${path}";' caused this error ``` error: a string that refers to a store path cannot be appended to a path at /home/systems/nixpkgs/lib/sources.nix:183:20: 182| then path 183| else /. + "${base}/${path}"; | ^ 184| in if pathIsRegularFile path ```
| * | | | lib/trivial: fix 'error: cannot decode virtual path ↵Artturin2022-11-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '/nix/store/virtual0000000000000000000000005-source'' happens on lazy-trees branch of Nix (NixOS/nix#6530)
* | | | | licenses: add bsd2WithViewsGabriel Arazas2022-11-16
| |_|/ / |/| | |
* | | | Merge pull request #82131 from Ericson2314/bsd-crossJohn Ericson2022-11-13
|\ \ \ \ | |_|_|/ |/| | | FreeBSD packages: Init at 13.1
| * | | lib/systems: Support FreeBSDJohn Ericson2022-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A tricky thing about FreeBSD is that there is no stable ABI across versions. That means that putting in the version as part of the config string is paramount. We have a parsed represenation that separates name versus version to accomplish this. We include FreeBSD versions 12 and 13 to demonstrate how it works.
| * | | lib/systems: Simplify NetBSD examplesJohn Ericson2022-11-04
| | | | | | | | | | | | | | | | The libc will be inferred.
* | | | Merge pull request #200667 from wegank/to-base-digits-typeSilvan Mosberger2022-11-11
|\ \ \ \ | | | | | | | | | | lib.trivial.toBaseDigits: type check
| * | | | lib.trivial.toBaseDigits: type checkWeijia Wang2022-11-11
| | | | |
* | | | | Merge master into haskell-updatesgithub-actions[bot]2022-11-10
|\| | | |
| * | | | Merge pull request #196007 from wegank/fdl11-removeSandro2022-11-09
| |\ \ \ \
| | * | | | licenses: remove fdl13Weijia Wang2022-10-27
| | | | | |
| | * | | | licenses: remove fdl12Weijia Wang2022-10-27
| | | | | |
| | * | | | licenses: remove fdl11Weijia Wang2022-10-27
| | | | | |
* | | | | | Merge master into haskell-updatesgithub-actions[bot]2022-11-09
|\| | | | |
| * | | | | lib/types: add `descriptionClass` for `path`Naïm Favier2022-11-08
| | | | | |
* | | | | | haskell.compiler.ghc92: 9.2.4 -> 9.2.5sternenseemann2022-11-07
|/ / / / /
* | | | | cross/mingw: fix emulator for mingw32Jörg Thalheim2022-11-06
| | | | |
* | | | | Revert "lib,doc: remove obvious usages of toString on paths"Anderson Torres2022-11-05
| | | | |
* | | | | lib,doc: remove obvious usages of toString on pathsArtturin2022-11-06
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It gives a warning on the lazy-trees branch of Nix (NixOS/nix#6530) one of these was also giving me an error (the one in lib/trivial probably) ``` $ nix build warning: applying 'toString' to path '/home/artturin/nixgits/my-nixpkgs/nixos/modules/installer/sd-card/sd -image-aarch64.nix' and then accessing it is deprecated, at /home/artturin/nixgits/my-nixpkgs/lib/modules. nix:349:99 warning: applying 'toString' to path '/home/artturin/nixgits/my-nixpkgs/.git' and then accessing it is dep recated, at /home/artturin/nixgits/my-nixpkgs/lib/sources.nix:35:32 warning: applying 'toString' to path '/home/artturin/nixgits/my-nixpkgs/nixos/modules/system/etc/etc.nix' and then accessing it is deprecated, at «stdin»:0 warning: applying 'toString' to path '/home/artturin/nixgits/my-nixpkgs/nixos/modules/system/etc/etc-activ ation.nix' and then accessing it is deprecated, at «stdin»:0 warning: applying 'toString' to path '/home/artturin/nixgits/my-nixpkgs/nixos/modules/installer/sd-card/sd -image-aarch64.nix' and then accessing it is deprecated, at «stdin»:0 error: cannot decode virtual path '/nix/store/virtual0000000000000000000000005-source' (use '--show-trace' to show detailed location information) ```
* | | | Merge pull request #199244 from markuskowa/fix-licensesmarkuskowa2022-11-05
|\ \ \ \ | |_|/ / |/| | | Fix licenses in various packages
| * | | arkpandora_ttf: add licenseMarkus Kowalewski2022-11-02
| |/ /
* | | lib/tests/modules: Test doRenameRobert Hensing2022-11-03
| | |
* | | lib.modules.doRename: Don't define warning, even as undefined, if not warning.Shea Levy2022-11-03
|/ / | | | | | | This fixes mkAliasOptionModule in systems with no warning option.
* | lib: Automatically generate lib.filesytem docsSilvan Mosberger2022-10-26
| |
* | Merge pull request #173949 from jacoblambda/fix-toInt-zero-paddingRobert Hensing2022-10-24
|\ \ | | | | | | lib: add strings.toIntBase10 to parse zero-padded strings
| * | lib/strings: Update docs and restructured code to improve readability of ↵Jacob Abel2022-10-23
| | | | | | | | | | | | toInt and toIntBase10.
| * | lib/strings: Improve error message for octal ambiguity in toIntJacob Abel2022-10-23
| | |
| * | lib/strings: Refactor toInt into toInt and toIntBase10Jacob Abel2022-10-23
| | |