about summary refs log tree commit diff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2023-07-24Merge pull request #244330 from thillux/bluefield2-remove-cpuAdam Joseph1-1/+0
lib.systems.bluefield2: remove cpu profile
2023-07-23Merge pull request #242035 from Icy-Thought/zsh-abbrSandro1-0/+7
zsh-abbr: init at 5.1.0
2023-07-22lib/generators/toKeyValue: add `indent` parameterNaïm Favier1-2/+3
toKeyValue is generic enough that it is sometimes used as part of other format generators, where it might be useful to specify the indentation level.
2023-07-20lib.lists.commonPrefix: initSilvan Mosberger2-1/+60
2023-07-20Merge pull request #244118 from amjoseph-nixpkgs/pr/fix/244045Adam Joseph1-5/+6
lib.systems.extensions.sharedLibrary: do not `throw`
2023-07-19lib.lists.findFirstIndex: initSilvan Mosberger2-28/+64
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-07-19Merge pull request #238013 from tweag/lib.path.removePrefixRobert Hensing2-1/+71
`lib.path.removePrefix`: init
2023-07-19Merge pull request #244044 from tweag/lib-readmeRobert Hensing5-6/+107
Create a Readme in `lib`
2023-07-19lib.systems.bluefield2: remove cpu profileMarkus Theil1-1/+0
Some software, e.g. systemd, failed to build with set cpu profile. Signed-off-by: Markus Theil <theil.markus@gmail.com>
2023-07-18lib.attrsets.mergeAttrsList: initSilvan Mosberger2-0/+61
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-07-18lib/tests: Unify documentation of individual testable filesSilvan Mosberger4-6/+34
2023-07-18lib: Add READMESilvan Mosberger1-0/+73
Co-authored-by: Alexander Groleau <alex@proof.construction> Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io> Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-07-14lib.lists.removePrefix: initSilvan Mosberger2-0/+36
2023-07-14lib.lists.hasPrefix: initSilvan Mosberger2-0/+36
2023-07-14lib.systems.bluefield2: initMarkus Theil2-0/+12
Add support for Nvidia's Bluefield 2 plattform as a compilation target. There exists a version with and without crypto support, while the crypto supported version is the most common one. Support for the non-crypto version can be easily added in the future, if needed. For a datasheet of the hardware, see: https://www.nvidia.com/content/dam/en-zz/Solutions/Data-Center/documents/datasheet-nvidia-bluefield-2-dpu.pdf Signed-off-by: Markus Theil <theil.markus@gmail.com>
2023-07-12Merge pull request #238154 from amjoseph-nixpkgs/pr/gcc/crossStageStaticAdam Joseph1-1/+20
gccCrossStageStatic: enable dynamic libraries, rename it
2023-07-12lib/tests/modules: Test that _module.args works when a default argument is setRobert Hensing2-0/+31
2023-07-11lib.mergeModules: Add context to error messageRobert Hensing2-2/+5
2023-07-11lib/modules.nix: FormatRobert Hensing1-19/+28
2023-07-11lib/modules.nix: Inline single-use `subtree` bindingsRobert Hensing1-4/+4
2023-07-11lib/modules.nix: Make entire definition list strict in config checkRobert Hensing1-24/+21
This is a non-trivial refactor that slightly changes the semantics of the internal definition lists. Whereas previously only individual list items would trigger the exception, now the error is promoted to the whole list. This is mostly ok, because we compute the value, it is wrong to ignore a definition. However, we don't always compute the value. For instance `readOnly` only needs to count definitions. That won't be possible anymore when the error is raised for one of the items. As a consequence, an error will be raised for the errant definition instead of the number of definitions.
2023-07-11lib/modules.nix: Rename defnsByName -> pushedDownDefinitionsByNameRobert Hensing1-2/+2
2023-07-11lib/modules.nix: Rename defnsByName' -> rawDefinitionsByNameRobert Hensing1-3/+3
2023-07-11lib/modules.nix: Apply argument `module` of old fRobert Hensing1-9/+9
2023-07-11lib/modules.nix: Apply argument `modules` of old old old byNameRobert Hensing1-6/+6
2023-07-11lib/modules.nix: Apply argument `f` of old old byNameRobert Hensing1-15/+21
2023-07-11lib/modules.nix: Apply argument `attr` of old byNameRobert Hensing1-31/+15
2023-07-11lib/modules.nix: Inline byNameRobert Hensing1-27/+43
byName is not an abstraction. This is the first commit in a series that refactors it away.
2023-07-10lib.path.removePrefix: initSilvan Mosberger2-1/+71
2023-07-08doc: Render lib.fixedPointsRobert Hensing1-81/+115
2023-07-07licenses: add Hippocratic License v3.0Icy-Thought1-0/+7
2023-07-05Merge pull request #240825 from r-burns/mips-embeddedRyan Burns3-2/+12
lib.platforms.mips{,64}-embedded: init
2023-07-05Merge pull request #241645 from ncfavier/lib-no-hashesNaïm Favier2-6/+6
lib/tests: invalidate hashes
2023-07-05lib/tests: invalidate hashesNaïm Favier2-6/+6
Having the current bash hash present in the nixpkgs tree makes Nix detect bash as a runtime dependency of nixpkgs, which in turns messes up `fetchFromGitHub` due to https://github.com/NixOS/nix/issues/6660
2023-07-05Merge pull request #239120 from LibreCybernetics/arch-stuffArtturi1-11/+28
2023-07-04lib.systems.extensions.sharedLibrary: do not `throw`Adam Joseph1-5/+6
Because downstream code expects to use `==` on platform attrsets, we are unfortunately not able to throw a useful error message when the `sharedLibrary` attribute is accessed. When users do a comparison like: stdenv.hostPlatform == pkgsStatic.stdenv.hostPlatform ... in a situation where `stdenv.hostPlatform.hasSharedLibraries`, they expect this to return `false`. Unfortunately Nix does a deep equality comparison here, and ends up forcing the `pkgsStatic.stdenv.hostPlatform.extensions.sharedLibrary` attribute, which throws the error. Rather than returning `null`, this commit instead simply omits the `extensions.sharedLibrary` attribute. This provides the user with a more-useful error message: instead of waiting until the `null` is used (and hoping that produces an error), the user will get an error about the `extensions.sharedLibrary` attribute being missing, at the position where it was referenced. Big thanks to @trofi for his PR to add `NIX_VALIDATE_EVAL_NONDETERMINISM` to Nix, which I am now using. It made tracking this down really easy! Fixes #244045
2023-07-04Merge pull request #240555 from Artturin/iniglobsecneedArtturi1-1/+1
2023-07-04lib/trivial: Bump oldestSupportedReleaseto to 23.05Martin Weinelt1-1/+1
2023-07-02Merge pull request #237895 from emilytrau/tartPol Dellaiera1-0/+7
tart: init at 1.6.0
2023-07-01lib.systems: introduce hasSharedLibrariesAdam Joseph1-1/+20
This commit adds `hasSharedLibraries` to `lib.systems`. We need `plat.hasSharedLibraries` in order to know whether or not to expect `gcc` (and many other tools) to emit shared libraries (like `libgcc_s.so`). Many of the GNU build scripts are smart enough that if you configure them with `--enable-shared` on a platform (such as `arm-none-eabi`) that doesn't support dynamic linking, they will simply skip the shared libraries instead of aborting the `configurePhase`. Unfortunately the missing shared libraries in the final build product cause very hard-to-troubleshoot problems later on. The alternative to introducing `hasSharedLibraries` would be to set `isStatic` in these situations. However doing so causes `make-derivation.nix` to insert `-static` between the `pname` and `hostPlatform` suffix, which is undesirable. If at some point in the future we eliminate the `-static` suffix, then `hasSharedLibraries` can be made equal to `!isStatic`.
2023-06-30Merge pull request #239255 from figsoda/stringfigsoda1-1/+2
2023-06-30lib.platforms.mips{,64}-embedded: initRyan Burns3-2/+12
2023-06-29lib.systems: add gnuabin32 to isGnuAdam Joseph1-1/+1
The `isGnu` predicate was missing `gnuabin32`. This commit corrects that by adding it.
2023-06-29lib.generators.toINIWithGlobalSection: give sections a defaultArtturin1-1/+1
often sections aren't needed when using globalSection currently one has to `sections = { }` when using only globalSection ``` lib.generators.toINIWithGlobalSection { } { globalSection = { background_color = "1d202199"; }; sections = { }; }; ````
2023-06-27Merge pull request #237259 from ncfavier/extraDependencies-pathNaïm Favier4-3/+43
nixos/top-level: change extraDependencies from packages to paths
2023-06-27lib/tests: remove experimental-featuresNaïm Favier1-3/+0
Now that the lib is tested with Nix 2.3, this isn't needed any more and causes warnings.
2023-06-27lib/tests/modules.sh: Test types.pathInStoreRobert Hensing2-0/+34
Add missing test cases. I think the .links case should be rejected even though it's technically a path in the store.
2023-06-27lib/types: add pathInStoreNaïm Favier1-0/+9
2023-06-26texlive: fix licensing information for doc-only-packages (#239528)apfelkuchen61-0/+5
* licenses: add opubl * texlive: fix license for npp-for-context and lshort-german This unbreaks evaluation for `texlive.combine { inherit (texlive) scheme-full; pkgFilter = (_: true) }`. The problem doesn't manifest for the default pkgFilter as `npp-for-context` is a doc-only-package (that by the way has recently been removed from texlive).
2023-06-26lib/path/tests/prop.sh: Add --show-traceRobert Hensing1-1/+1