kapacitor 1.5.7 -> 1.6.6 https://repology.org/project/kapacitor/versions attrpath: kapacitor Checking auto update branch... No auto update branch exists [version] [version] updated version and sha256 [rustCrateVersion] [rustCrateVersion] No cargoSha256 or cargoHash found [golangModuleVersion] [golangModuleVersion] Not a buildGoModule package with vendorSha256 or vendorHash [updateScript] [updateScript] skipping because derivation has no updateScript [quotedUrls] kapacitor 1.5.7 -> 1.6.6 https://repology.org/project/kapacitor/versions [quotedUrls] nothing found to replace Diff after rewrites: diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs deleted file mode 100644 index bf350b0cf8b..00000000000 --- a/.git-blame-ignore-revs +++ /dev/null @@ -1,41 +0,0 @@ -# This file contains a list of commits that are not likely what you -# are looking for in a blame, such as mass reformatting or renaming. -# You can set this file as a default ignore file for blame by running -# the following command. -# -# $ git config blame.ignoreRevsFile .git-blame-ignore-revs -# -# To temporarily not use this file add -# --ignore-revs-file="" -# to your blame command. -# -# The ignoreRevsFile can't be set globally due to blame failing if the file isn't present. -# To not have to set the option in every repository it is needed in, -# save the following script in your path with the name "git-bblame" -# now you can run -# $ git bblame $FILE -# to use the .git-blame-ignore-revs file if it is present. -# -# #!/usr/bin/env bash -# repo_root=$(git rev-parse --show-toplevel) -# if [[ -e $repo_root/.git-blame-ignore-revs ]]; then -# git blame --ignore-revs-file="$repo_root/.git-blame-ignore-revs" $@ -# else -# git blame $@ -# fi - - -# nixos/modules/rename: Sort alphabetically -1f71224fe86605ef4cd23ed327b3da7882dad382 - -# manual: fix typos -feddd5e7f8c6f8167b48a077fa2a5394dc008999 - -# nixos: fix module paths in rename.nix -d08ede042b74b8199dc748323768227b88efcf7c - -# fix indentation in mk-python-derivation.nix -d1c1a0c656ccd8bd3b25d3c4287f2d075faf3cf3 - -# fix indentation in meteor default.nix -a37a6de881ec4c6708e6b88fd16256bbc7f26bbd diff --git a/.gitignore b/.gitignore deleted file mode 100644 index b1018d44b83..00000000000 --- a/.gitignore +++ /dev/null @@ -1,33 +0,0 @@ -*~ -,* -.*.swp -.*.swo -.\#* -\#*\# -.idea/ -.vscode/ -outputs/ -result-* -result -!pkgs/development/python-modules/result -/doc/NEWS.html -/doc/NEWS.txt -/doc/manual.html -/doc/manual.pdf -/result -/source/ -.version-suffix - -.DS_Store -.mypy_cache -__pycache__ - -/pkgs/development/libraries/qt-5/*/tmp/ -/pkgs/desktops/kde-5/*/tmp/ -/pkgs/development/mobile/androidenv/xml/* - -# generated by pkgs/common-updater/update-script.nix -update-git-commits.txt - -# JetBrains IDEA module declaration file -/nixpkgs.iml diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 82f8d022a92..00000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,146 +0,0 @@ -# How to contribute - -Note: contributing implies licensing those contributions -under the terms of [COPYING](COPYING), which is an MIT-like license. - -## Opening issues - -* Make sure you have a [GitHub account](https://github.com/signup/free) -* Make sure there is no open issue on the topic -* [Submit a new issue](https://github.com/NixOS/nixpkgs/issues/new/choose) by choosing the kind of topic and fill out the template - -## Submitting changes - -Read the ["Submitting changes"](https://nixos.org/nixpkgs/manual/#chap-submitting-changes) section of the nixpkgs manual. It explains how to write, test, and iterate on your change, and which branch to base your pull request against. - -Below is a short excerpt of some points in there: - -* Format the commit messages in the following way: - - ``` - (pkg-name | nixos/): (from -> to | init at version | refactor | etc) - - (Motivation for change. Link to release notes. Additional information.) - ``` - - For consistency, there should not be a period at the end of the commit message's summary line (the first line of the commit message). - - Examples: - - * nginx: init at 2.0.1 - * firefox: 54.0.1 -> 55.0 - https://www.mozilla.org/en-US/firefox/55.0/releasenotes/ - * nixos/hydra: add bazBaz option - - Dual baz behavior is needed to do foo. - * nixos/nginx: refactor config generation - - The old config generation system used impure shell scripts and could break in specific circumstances (see #1234). - -* `meta.description` should: - * Be short, just one sentence. - * Be capitalized. - * Not start with the package name. - * More generally, it should not refer to the package name. - * Not end with a period (or any punctuation for that matter). - * Aim to inform while avoiding subjective language. -* `meta.license` must be set and fit the upstream license. - * If there is no upstream license, `meta.license` should default to `lib.licenses.unfree`. - * If in doubt, try to contact the upstream developers for clarification. -* `meta.maintainers` must be set. - -See the nixpkgs manual for more details on [standard meta-attributes](https://nixos.org/nixpkgs/manual/#sec-standard-meta-attributes). - -## Writing good commit messages - -In addition to writing properly formatted commit messages, it's important to include relevant information so other developers can later understand *why* a change was made. While this information usually can be found by digging code, mailing list/Discourse archives, pull request discussions or upstream changes, it may require a lot of work. - -Package version upgrades usually allow for simpler commit messages, including attribute name, old and new version, as well as a reference to the relevant release notes/changelog. Every once in a while a package upgrade requires more extensive changes, and that subsequently warrants a more verbose message. - -Pull requests should not be squash merged in order to keep complete commit messages and GPG signatures intact and must not be when the change doesn't make sense as a single commit. -This means that, when addressing review comments in order to keep the pull request in an always mergeable status, you will sometimes need to rewrite your branch's history and then force-push it with `git push --force-with-lease`. -Useful git commands that can help a lot with this are `git commit --patch --amend` and `git rebase --interactive`. For more details consult the git man pages or online resources like [git-rebase.io](https://git-rebase.io/) or [The Pro Git Book](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History). - -## Rebasing between branches (i.e. from master to staging) - -From time to time, changes between branches must be rebased, for example, if the -number of new rebuilds they would cause is too large for the target branch. When -rebasing, care must be taken to include only the intended changes, otherwise -many CODEOWNERS will be inadvertently requested for review. To achieve this, -rebasing should not be performed directly on the target branch, but on the merge -base between the current and target branch. - -In the following example, we assume that the current branch, called `feature`, -is based on `master`, and we rebase it onto the merge base between -`master` and `staging` so that the PR can eventually be retargeted to -`staging` without causing a mess. The example uses `upstream` as the remote for `NixOS/nixpkgs.git` -while `origin` is the remote you are pushing to. - - -```console -# Rebase your commits onto the common merge base -git rebase --onto upstream/staging... upstream/master -# Force push your changes -git push origin feature --force-with-lease -``` - -The syntax `upstream/staging...` is equivalent to `upstream/staging...HEAD` and -stands for the merge base between `upstream/staging` and `HEAD` (hence between -`upstream/staging` and `upstream/master`). - -Then change the base branch in the GitHub PR using the *Edit* button in the upper -right corner, and switch from `master` to `staging`. *After* the PR has been -retargeted it might be necessary to do a final rebase onto the target branch, to -resolve any outstanding merge conflicts. - -```console -# Rebase onto target branch -git rebase upstream/staging -# Review and fixup possible conflicts -git status -# Force push your changes -git push origin feature --force-with-lease -``` - -## Backporting changes - -Follow these steps to backport a change into a release branch in compliance with the [commit policy](https://nixos.org/nixpkgs/manual/#submitting-changes-stable-release-branches). - -You can add a label such as `backport release-22.11` to a PR, so that merging it will -automatically create a backport (via [a GitHub Action](.github/workflows/backport.yml)). -This also works for PR's that have already been merged, and might take a couple of minutes to trigger. - -You can also create the backport manually: - -1. Take note of the commits in which the change was introduced into `master` branch. -2. Check out the target _release branch_, e.g. `release-22.11`. Do not use a _channel branch_ like `nixos-22.11` or `nixpkgs-22.11-darwin`. -3. Create a branch for your change, e.g. `git checkout -b backport`. -4. When the reason to backport is not obvious from the original commit message, use `git cherry-pick -xe ` and add a reason. Otherwise use `git cherry-pick -x `. That's fine for minor version updates that only include security and bug fixes, commits that fixes an otherwise broken package or similar. Please also ensure the commits exists on the master branch; in the case of squashed or rebased merges, the commit hash will change and the new commits can be found in the merge message at the bottom of the master pull request. -5. Push to GitHub and open a backport pull request. Make sure to select the release branch (e.g. `release-22.11`) as the target branch of the pull request, and link to the pull request in which the original change was committed to `master`. The pull request title should be the commit title with the release version as prefix, e.g. `[22.11]`. -6. When the backport pull request is merged and you have the necessary privileges you can also replace the label `9.needs: port to stable` with `8.has: port to stable` on the original pull request. This way maintainers can keep track of missing backports easier. - -## Criteria for Backporting changes - -Anything that does not cause user or downstream dependency regressions can be backported. This includes: -- New Packages / Modules -- Security / Patch updates -- Version updates which include new functionality (but no breaking changes) -- Services which require a client to be up-to-date regardless. (E.g. `spotify`, `steam`, or `discord`) -- Security critical applications (E.g. `firefox`) - -## Generating 23.05 Release Notes - - -Documentation in nixpkgs is transitioning to a markdown-centric workflow. In the past release notes required a translation step to convert from markdown to a compatible docbook document, but this is no longer necessary. - -Steps for updating 23.05 Release notes: - -1. Edit `nixos/doc/manual/release-notes/rl-2305.section.md` with the desired changes -2. Commit changes to `rl-2305.section.md`. - -## Reviewing contributions - -See the nixpkgs manual for more details on how to [Review contributions](https://nixos.org/nixpkgs/manual/#chap-reviewing-contributions). diff --git a/flake.nix b/flake.nix deleted file mode 100644 index f9442d8ea2d..00000000000 --- a/flake.nix +++ /dev/null @@ -1,62 +0,0 @@ -# Experimental flake interface to Nixpkgs. -# See https://github.com/NixOS/rfcs/pull/49 for details. -{ - description = "A collection of packages for the Nix package manager"; - - outputs = { self }: - let - jobs = import ./pkgs/top-level/release.nix { - nixpkgs = self; - }; - - lib = import ./lib; - - forAllSystems = lib.genAttrs lib.systems.flakeExposed; - in - { - lib = lib.extend (final: prev: { - - nixos = import ./nixos/lib { lib = final; }; - - nixosSystem = args: - import ./nixos/lib/eval-config.nix ( - args // { - modules = args.modules ++ [{ - system.nixos.versionSuffix = - ".${final.substring 0 8 (self.lastModifiedDate or self.lastModified or "19700101")}.${self.shortRev or "dirty"}"; - system.nixos.revision = final.mkIf (self ? rev) self.rev; - }]; - } // lib.optionalAttrs (! args?system) { - # Allow system to be set modularly in nixpkgs.system. - # We set it to null, to remove the "legacy" entrypoint's - # non-hermetic default. - system = null; - } - ); - }); - - checks.x86_64-linux.tarball = jobs.tarball; - - htmlDocs = { - nixpkgsManual = jobs.manual; - nixosManual = (import ./nixos/release-small.nix { - nixpkgs = self; - }).nixos.manual.x86_64-linux; - }; - - # The "legacy" in `legacyPackages` doesn't imply that the packages exposed - # through this attribute are "legacy" packages. Instead, `legacyPackages` - # is used here as a substitute attribute name for `packages`. The problem - # with `packages` is that it makes operations like `nix flake show - # nixpkgs` unusably slow due to the sheer number of packages the Nix CLI - # needs to evaluate. But when the Nix CLI sees a `legacyPackages` - # attribute it displays `omitted` instead of evaluating all packages, - # which keeps `nix flake show` on Nixpkgs reasonably fast, though less - # information rich. - legacyPackages = forAllSystems (system: import ./. { inherit system; }); - - nixosModules = { - notDetected = ./nixos/modules/installer/scan/not-detected.nix; - }; - }; -} diff --git a/lib/ascii-table.nix b/lib/ascii-table.nix deleted file mode 100644 index 74989936ea4..00000000000 --- a/lib/ascii-table.nix +++ /dev/null @@ -1,99 +0,0 @@ -{ "\t" = 9; - "\n" = 10; - "\r" = 13; - " " = 32; - "!" = 33; - "\"" = 34; - "#" = 35; - "$" = 36; - "%" = 37; - "&" = 38; - "'" = 39; - "(" = 40; - ")" = 41; - "*" = 42; - "+" = 43; - "," = 44; - "-" = 45; - "." = 46; - "/" = 47; - "0" = 48; - "1" = 49; - "2" = 50; - "3" = 51; - "4" = 52; - "5" = 53; - "6" = 54; - "7" = 55; - "8" = 56; - "9" = 57; - ":" = 58; - ";" = 59; - "<" = 60; - "=" = 61; - ">" = 62; - "?" = 63; - "@" = 64; - "A" = 65; - "B" = 66; - "C" = 67; - "D" = 68; - "E" = 69; - "F" = 70; - "G" = 71; - "H" = 72; - "I" = 73; - "J" = 74; - "K" = 75; - "L" = 76; - "M" = 77; - "N" = 78; - "O" = 79; - "P" = 80; - "Q" = 81; - "R" = 82; - "S" = 83; - "T" = 84; - "U" = 85; - "V" = 86; - "W" = 87; - "X" = 88; - "Y" = 89; - "Z" = 90; - "[" = 91; - "\\" = 92; - "]" = 93; - "^" = 94; - "_" = 95; - "`" = 96; - "a" = 97; - "b" = 98; - "c" = 99; - "d" = 100; - "e" = 101; - "f" = 102; - "g" = 103; - "h" = 104; - "i" = 105; - "j" = 106; - "k" = 107; - "l" = 108; - "m" = 109; - "n" = 110; - "o" = 111; - "p" = 112; - "q" = 113; - "r" = 114; - "s" = 115; - "t" = 116; - "u" = 117; - "v" = 118; - "w" = 119; - "x" = 120; - "y" = 121; - "z" = 122; - "{" = 123; - "|" = 124; - "}" = 125; - "~" = 126; -} diff --git a/lib/asserts.nix b/lib/asserts.nix deleted file mode 100644 index 98e0b490acf..00000000000 --- a/lib/asserts.nix +++ /dev/null @@ -1,53 +0,0 @@ -{ lib }: - -rec { - - /* Throw if pred is false, else return pred. - Intended to be used to augment asserts with helpful error messages. - - Example: - assertMsg false "nope" - stderr> error: nope - - assert assertMsg ("foo" == "bar") "foo is not bar, silly"; "" - stderr> error: foo is not bar, silly - - Type: - assertMsg :: Bool -> String -> Bool - */ - # TODO(Profpatsch): add tests that check stderr - assertMsg = - # Predicate that needs to succeed, otherwise `msg` is thrown - pred: - # Message to throw in case `pred` fails - msg: - pred || builtins.throw msg; - - /* Specialized `assertMsg` for checking if `val` is one of the elements - of the list `xs`. Useful for checking enums. - - Example: - let sslLibrary = "libressl"; - in assertOneOf "sslLibrary" sslLibrary [ "openssl" "bearssl" ] - stderr> error: sslLibrary must be one of [ - stderr> "openssl" - stderr> "bearssl" - stderr> ], but is: "libressl" - - Type: - assertOneOf :: String -> ComparableVal -> List ComparableVal -> Bool - */ - assertOneOf = - # The name of the variable the user entered `val` into, for inclusion in the error message - name: - # The value of what the user provided, to be compared against the values in `xs` - val: - # The list of valid values - xs: - assertMsg - (lib.elem val xs) - "${name} must be one of ${ - lib.generators.toPretty {} xs}, but is: ${ - lib.generators.toPretty {} val}"; - -} diff --git a/lib/attrsets.nix b/lib/attrsets.nix deleted file mode 100644 index 1f11eaaa823..00000000000 --- a/lib/attrsets.nix +++ /dev/null @@ -1,1014 +0,0 @@ -{ lib }: -# Operations on attribute sets. - -let - inherit (builtins) head tail length; - inherit (lib.trivial) flip id mergeAttrs pipe; - inherit (lib.strings) concatStringsSep concatMapStringsSep escapeNixIdentifier sanitizeDerivationName; - inherit (lib.lists) foldr foldl' concatMap concatLists elemAt all partition groupBy take foldl; -in - -rec { - inherit (builtins) attrNames listToAttrs hasAttr isAttrs getAttr removeAttrs; - - - /* Return an attribute from nested attribute sets. - - Example: - x = { a = { b = 3; }; } - # ["a" "b"] is equivalent to x.a.b - # 6 is a default value to return if the path does not exist in attrset - attrByPath ["a" "b"] 6 x - => 3 - attrByPath ["z" "z"] 6 x - => 6 - - Type: - attrByPath :: [String] -> Any -> AttrSet -> Any - - */ - attrByPath = - # A list of strings representing the attribute path to return from `set` - attrPath: - # Default value if `attrPath` does not resolve to an existing value - default: - # The nested attribute set to select values from - set: - let attr = head attrPath; - in - if attrPath == [] then set - else if set ? ${attr} - then attrByPath (tail attrPath) default set.${attr} - else default; - - /* Return if an attribute from nested attribute set exists. - - Example: - x = { a = { b = 3; }; } - hasAttrByPath ["a" "b"] x - => true - hasAttrByPath ["z" "z"] x - => false - - Type: - hasAttrByPath :: [String] -> AttrSet -> Bool - */ - hasAttrByPath = - # A list of strings representing the attribute path to check from `set` - attrPath: - # The nested attribute set to check - e: - let attr = head attrPath; - in - if attrPath == [] then true - else if e ? ${attr} - then hasAttrByPath (tail attrPath) e.${attr} - else false; - - - /* Create a new attribute set with `value` set at the nested attribute location specified in `attrPath`. - - Example: - setAttrByPath ["a" "b"] 3 - => { a = { b = 3; }; } - - Type: - setAttrByPath :: [String] -> Any -> AttrSet - */ - setAttrByPath = - # A list of strings representing the attribute path to set - attrPath: - # The value to set at the location described by `attrPath` - value: - let - len = length attrPath; - atDepth = n: - if n == len - then value - else { ${elemAt attrPath n} = atDepth (n + 1); }; - in atDepth 0; - - /* Like `attrByPath`, but without a default value. If it doesn't find the - path it will throw an error. - - Example: - x = { a = { b = 3; }; } - getAttrFromPath ["a" "b"] x - => 3 - getAttrFromPath ["z" "z"] x - => error: cannot find attribute `z.z' - - Type: - getAttrFromPath :: [String] -> AttrSet -> Any - */ - getAttrFromPath = - # A list of strings representing the attribute path to get from `set` - attrPath: - # The nested attribute set to find the value in. - set: - let errorMsg = "cannot find attribute `" + concatStringsSep "." attrPath + "'"; - in attrByPath attrPath (abort errorMsg) set; - - /* Map each attribute in the given set and merge them into a new attribute set. - - Type: - concatMapAttrs :: (String -> a -> AttrSet) -> AttrSet -> AttrSet - - Example: - concatMapAttrs - (name: value: { - ${name} = value; - ${name + value} = value; - }) - { x = "a"; y = "b"; } - => { x = "a"; xa = "a"; y = "b"; yb = "b"; } - */ - concatMapAttrs = f: flip pipe [ (mapAttrs f) attrValues (foldl' mergeAttrs { }) ]; - - - /* Update or set specific paths of an attribute set. - - Takes a list of updates to apply and an attribute set to apply them to, - and returns the attribute set with the updates applied. Updates are - represented as `{ path = ...; update = ...; }` values, where `path` is a - list of strings representing the attribute path that should be updated, - and `update` is a function that takes the old value at that attribute path - as an argument and returns the new - value it should be. - - Properties: - - - Updates to deeper attribute paths are applied before updates to more - shallow attribute paths - - - Multiple updates to the same attribute path are applied in the order - they appear in the update list - - - If any but the last `path` element leads into a value that is not an - attribute set, an error is thrown - - - If there is an update for an attribute path that doesn't exist, - accessing the argument in the update function causes an error, but - intermediate attribute sets are implicitly created as needed - - Example: - updateManyAttrsByPath [ - { - path = [ "a" "b" ]; - update = old: { d = old.c; }; - } - { - path = [ "a" "b" "c" ]; - update = old: old + 1; - } - { - path = [ "x" "y" ]; - update = old: "xy"; - } - ] { a.b.c = 0; } - => { a = { b = { d = 1; }; }; x = { y = "xy"; }; } - - Type: updateManyAttrsByPath :: [{ path :: [String]; update :: (Any -> Any); }] -> AttrSet -> AttrSet - */ - updateManyAttrsByPath = let - # When recursing into attributes, instead of updating the `path` of each - # update using `tail`, which needs to allocate an entirely new list, - # we just pass a prefix length to use and make sure to only look at the - # path without the prefix length, so that we can reuse the original list - # entries. - go = prefixLength: hasValue: value: updates: - let - # Splits updates into ones on this level (split.right) - # And ones on levels further down (split.wrong) - split = partition (el: length el.path == prefixLength) updates; - - # Groups updates on further down levels into the attributes they modify - nested = groupBy (el: elemAt el.path prefixLength) split.wrong; - - # Applies only nested modification to the input value - withNestedMods = - # Return the value directly if we don't have any nested modifications - if split.wrong == [] then - if hasValue then value - else - # Throw an error if there is no value. This `head` call here is - # safe, but only in this branch since `go` could only be called - # with `hasValue == false` for nested updates, in which case - # it's also always called with at least one update - let updatePath = (head split.right).path; in - throw - ( "updateManyAttrsByPath: Path '${showAttrPath updatePath}' does " - + "not exist in the given value, but the first update to this " - + "path tries to access the existing value.") - else - # If there are nested modifications, try to apply them to the value - if ! hasValue then - # But if we don't have a value, just use an empty attribute set - # as the value, but simplify the code a bit - mapAttrs (name: go (prefixLength + 1) false null) nested - else if isAttrs value then - # If we do have a value and it's an attribute set, override it - # with the nested modifications - value // - mapAttrs (name: go (prefixLength + 1) (value ? ${name}) value.${name}) nested - else - # However if it's not an attribute set, we can't apply the nested - # modifications, throw an error - let updatePath = (head split.wrong).path; in - throw - ( "updateManyAttrsByPath: Path '${showAttrPath updatePath}' needs to " - + "be updated, but path '${showAttrPath (take prefixLength updatePath)}' " - + "of the given value is not an attribute set, so we can't " - + "update an attribute inside of it."); - - # We get the final result by applying all the updates on this level - # after having applied all the nested updates - # We use foldl instead of foldl' so that in case of multiple updates, - # intermediate values aren't evaluated if not needed - in foldl (acc: el: el.update acc) withNestedMods split.right; - - in updates: value: go 0 true value updates; - - /* Return the specified attributes from a set. - - Example: - attrVals ["a" "b" "c"] as - => [as.a as.b as.c] - - Type: - attrVals :: [String] -> AttrSet -> [Any] - */ - attrVals = - # The list of attributes to fetch from `set`. Each attribute name must exist on the attrbitue set - nameList: - # The set to get attribute values from - set: map (x: set.${x}) nameList; - - - /* Return the values of all attributes in the given set, sorted by - attribute name. - - Example: - attrValues {c = 3; a = 1; b = 2;} - => [1 2 3] - - Type: - attrValues :: AttrSet -> [Any] - */ - attrValues = builtins.attrValues or (attrs: attrVals (attrNames attrs) attrs); - - - /* Given a set of attribute names, return the set of the corresponding - attributes from the given set. - - Example: - getAttrs [ "a" "b" ] { a = 1; b = 2; c = 3; } - => { a = 1; b = 2; } - - Type: - getAttrs :: [String] -> AttrSet -> AttrSet - */ - getAttrs = - # A list of attribute names to get out of `set` - names: - # The set to get the named attributes from - attrs: genAttrs names (name: attrs.${name}); - - /* Collect each attribute named `attr` from a list of attribute - sets. Sets that don't contain the named attribute are ignored. - - Example: - catAttrs "a" [{a = 1;} {b = 0;} {a = 2;}] - => [1 2] - - Type: - catAttrs :: String -> [AttrSet] -> [Any] - */ - catAttrs = builtins.catAttrs or - (attr: l: concatLists (map (s: if s ? ${attr} then [s.${attr}] else []) l)); - - - /* Filter an attribute set by removing all attributes for which the - given predicate return false. - - Example: - filterAttrs (n: v: n == "foo") { foo = 1; bar = 2; } - => { foo = 1; } - - Type: - filterAttrs :: (String -> Any -> Bool) -> AttrSet -> AttrSet - */ - filterAttrs = - # Predicate taking an attribute name and an attribute value, which returns `true` to include the attribute, or `false` to exclude the attribute. - pred: - # The attribute set to filter - set: - listToAttrs (concatMap (name: let v = set.${name}; in if pred name v then [(nameValuePair name v)] else []) (attrNames set)); - - - /* Filter an attribute set recursively by removing all attributes for - which the given predicate return false. - - Example: - filterAttrsRecursive (n: v: v != null) { foo = { bar = null; }; } - => { foo = {}; } - - Type: - filterAttrsRecursive :: (String -> Any -> Bool) -> AttrSet -> AttrSet - */ - filterAttrsRecursive = - # Predicate taking an attribute name and an attribute value, which returns `true` to include the attribute, or `false` to exclude the attribute. - pred: - # The attribute set to filter - set: - listToAttrs ( - concatMap (name: - let v = set.${name}; in - if pred name v then [ - (nameValuePair name ( - if isAttrs v then filterAttrsRecursive pred v - else v - )) - ] else [] - ) (attrNames set) - ); - - /* - Like builtins.foldl' but for attribute sets. - Iterates over every name-value pair in the given attribute set. - The result of the callback function is often called `acc` for accumulator. It is passed between callbacks from left to right and the final `acc` is the return value of `foldlAttrs`. - - Attention: - There is a completely different function - `lib.foldAttrs` - which has nothing to do with this function, despite the similar name. - - Example: - foldlAttrs - (acc: name: value: { - sum = acc.sum + value; - names = acc.names ++ [name]; - }) - { sum = 0; names = []; } - { - foo = 1; - bar = 10; - } - -> - { - sum = 11; - names = ["bar" "foo"]; - } - - foldlAttrs - (throw "function not needed") - 123 - {}; - -> - 123 - - foldlAttrs - (_: _: v: v) - (throw "initial accumulator not needed") - { z = 3; a = 2; }; - -> - 3 - - The accumulator doesn't have to be an attrset. - It can be as simple as a number or string. - - foldlAttrs - (acc: _: v: acc * 10 + v) - 1 - { z = 1; a = 2; }; - -> - 121 - - Type: - foldlAttrs :: ( a -> String -> b -> a ) -> a -> { ... :: b } -> a - */ - foldlAttrs = f: init: set: - foldl' - (acc: name: f acc name set.${name}) - init - (attrNames set); - - /* Apply fold functions to values grouped by key. - - Example: - foldAttrs (item: acc: [item] ++ acc) [] [{ a = 2; } { a = 3; }] - => { a = [ 2 3 ]; } - - Type: - foldAttrs :: (Any -> Any -> Any) -> Any -> [AttrSets] -> Any - - */ - foldAttrs = - # A function, given a value and a collector combines the two. - op: - # The starting value. - nul: - # A list of attribute sets to fold together by key. - list_of_attrs: - foldr (n: a: - foldr (name: o: - o // { ${name} = op n.${name} (a.${name} or nul); } - ) a (attrNames n) - ) {} list_of_attrs; - - - /* Recursively collect sets that verify a given predicate named `pred` - from the set `attrs`. The recursion is stopped when the predicate is - verified. - - Example: - collect isList { a = { b = ["b"]; }; c = [1]; } - => [["b"] [1]] - - collect (x: x ? outPath) - { a = { outPath = "a/"; }; b = { outPath = "b/"; }; } - => [{ outPath = "a/"; } { outPath = "b/"; }] - - Type: - collect :: (AttrSet -> Bool) -> AttrSet -> [x] - */ - collect = - # Given an attribute's value, determine if recursion should stop. - pred: - # The attribute set to recursively collect. - attrs: - if pred attrs then - [ attrs ] - else if isAttrs attrs then - concatMap (collect pred) (attrValues attrs) - else - []; - - /* Return the cartesian product of attribute set value combinations. - - Example: - cartesianProductOfSets { a = [ 1 2 ]; b = [ 10 20 ]; } - => [ - { a = 1; b = 10; } - { a = 1; b = 20; } - { a = 2; b = 10; } - { a = 2; b = 20; } - ] - Type: - cartesianProductOfSets :: AttrSet -> [AttrSet] - */ - cartesianProductOfSets = - # Attribute set with attributes that are lists of values - attrsOfLists: - foldl' (listOfAttrs: attrName: - concatMap (attrs: - map (listValue: attrs // { ${attrName} = listValue; }) attrsOfLists.${attrName} - ) listOfAttrs - ) [{}] (attrNames attrsOfLists); - - - /* Utility function that creates a `{name, value}` pair as expected by `builtins.listToAttrs`. - - Example: - nameValuePair "some" 6 - => { name = "some"; value = 6; } - - Type: - nameValuePair :: String -> Any -> { name :: String; value :: Any; } - */ - nameValuePair = - # Attribute name - name: - # Attribute value - value: - { inherit name value; }; - - - /* Apply a function to each element in an attribute set, creating a new attribute set. - - Example: - mapAttrs (name: value: name + "-" + value) - { x = "foo"; y = "bar"; } - => { x = "x-foo"; y = "y-bar"; } - - Type: - mapAttrs :: (String -> Any -> Any) -> AttrSet -> AttrSet - */ - mapAttrs = builtins.mapAttrs or - (f: set: - listToAttrs (map (attr: { name = attr; value = f attr set.${attr}; }) (attrNames set))); - - - /* Like `mapAttrs`, but allows the name of each attribute to be - changed in addition to the value. The applied function should - return both the new name and value as a `nameValuePair`. - - Example: - mapAttrs' (name: value: nameValuePair ("foo_" + name) ("bar-" + value)) - { x = "a"; y = "b"; } - => { foo_x = "bar-a"; foo_y = "bar-b"; } - - Type: - mapAttrs' :: (String -> Any -> { name :: String; value :: Any; }) -> AttrSet -> AttrSet - */ - mapAttrs' = - # A function, given an attribute's name and value, returns a new `nameValuePair`. - f: - # Attribute set to map over. - set: - listToAttrs (map (attr: f attr set.${attr}) (attrNames set)); - - - /* Call a function for each attribute in the given set and return - the result in a list. - - Example: - mapAttrsToList (name: value: name + value) - { x = "a"; y = "b"; } - => [ "xa" "yb" ] - - Type: - mapAttrsToList :: (String -> a -> b) -> AttrSet -> [b] - - */ - mapAttrsToList = - # A function, given an attribute's name and value, returns a new value. - f: - # Attribute set to map over. - attrs: - map (name: f name attrs.${name}) (attrNames attrs); - - - /* Like `mapAttrs`, except that it recursively applies itself to - the *leaf* attributes of a potentially-nested attribute set: - the second argument of the function will never be an attrset. - Also, the first argument of the argument function is a *list* - of the attribute names that form the path to the leaf attribute. - - For a function that gives you control over what counts as a leaf, - see `mapAttrsRecursiveCond`. - - Example: - mapAttrsRecursive (path: value: concatStringsSep "-" (path ++ [value])) - { n = { a = "A"; m = { b = "B"; c = "C"; }; }; d = "D"; } - => { n = { a = "n-a-A"; m = { b = "n-m-b-B"; c = "n-m-c-C"; }; }; d = "d-D"; } - - Type: - mapAttrsRecursive :: ([String] -> a -> b) -> AttrSet -> AttrSet - */ - mapAttrsRecursive = - # A function, given a list of attribute names and a value, returns a new value. - f: - # Set to recursively map over. - set: - mapAttrsRecursiveCond (as: true) f set; - - - /* Like `mapAttrsRecursive`, but it takes an additional predicate - function that tells it whether to recurse into an attribute - set. If it returns false, `mapAttrsRecursiveCond` does not - recurse, but does apply the map function. If it returns true, it - does recurse, and does not apply the map function. - - Example: - # To prevent recursing into derivations (which are attribute - # sets with the attribute "type" equal to "derivation"): - mapAttrsRecursiveCond - (as: !(as ? "type" && as.type == "derivation")) - (x: ... do something ...) - attrs - - Type: - mapAttrsRecursiveCond :: (AttrSet -> Bool) -> ([String] -> a -> b) -> AttrSet -> AttrSet - */ - mapAttrsRecursiveCond = - # A function, given the attribute set the recursion is currently at, determine if to recurse deeper into that attribute set. - cond: - # A function, given a list of attribute names and a value, returns a new value. - f: - # Attribute set to recursively map over. - set: - let - recurse = path: - let - g = - name: value: - if isAttrs value && cond value - then recurse (path ++ [name]) value - else f (path ++ [name]) value; - in mapAttrs g; - in recurse [] set; - - - /* Generate an attribute set by mapping a function over a list of - attribute names. - - Example: - genAttrs [ "foo" "bar" ] (name: "x_" + name) - => { foo = "x_foo"; bar = "x_bar"; } - - Type: - genAttrs :: [ String ] -> (String -> Any) -> AttrSet - */ - genAttrs = - # Names of values in the resulting attribute set. - names: - # A function, given the name of the attribute, returns the attribute's value. - f: - listToAttrs (map (n: nameValuePair n (f n)) names); - - - /* Check whether the argument is a derivation. Any set with - `{ type = "derivation"; }` counts as a derivation. - - Example: - nixpkgs = import {} - isDerivation nixpkgs.ruby - => true - isDerivation "foobar" - => false - - Type: - isDerivation :: Any -> Bool - */ - isDerivation = - # Value to check. - value: value.type or null == "derivation"; - - /* Converts a store path to a fake derivation. - - Type: - toDerivation :: Path -> Derivation - */ - toDerivation = - # A store path to convert to a derivation. - path: - let - path' = builtins.storePath path; - res = - { type = "derivation"; - name = sanitizeDerivationName (builtins.substring 33 (-1) (baseNameOf path')); - outPath = path'; - outputs = [ "out" ]; - out = res; - outputName = "out"; - }; - in res; - - - /* If `cond` is true, return the attribute set `as`, - otherwise an empty attribute set. - - Example: - optionalAttrs (true) { my = "set"; } - => { my = "set"; } - optionalAttrs (false) { my = "set"; } - => { } - - Type: - optionalAttrs :: Bool -> AttrSet -> AttrSet - */ - optionalAttrs = - # Condition under which the `as` attribute set is returned. - cond: - # The attribute set to return if `cond` is `true`. - as: - if cond then as else {}; - - - /* Merge sets of attributes and use the function `f` to merge attributes - values. - - Example: - zipAttrsWithNames ["a"] (name: vs: vs) [{a = "x";} {a = "y"; b = "z";}] - => { a = ["x" "y"]; } - - Type: - zipAttrsWithNames :: [ String ] -> (String -> [ Any ] -> Any) -> [ AttrSet ] -> AttrSet - */ - zipAttrsWithNames = - # List of attribute names to zip. - names: - # A function, accepts an attribute name, all the values, and returns a combined value. - f: - # List of values from the list of attribute sets. - sets: - listToAttrs (map (name: { - inherit name; - value = f name (catAttrs name sets); - }) names); - - - /* Merge sets of attributes and use the function f to merge attribute values. - Like `lib.attrsets.zipAttrsWithNames` with all key names are passed for `names`. - - Implementation note: Common names appear multiple times in the list of - names, hopefully this does not affect the system because the maximal - laziness avoid computing twice the same expression and `listToAttrs` does - not care about duplicated attribute names. - - Example: - zipAttrsWith (name: values: values) [{a = "x";} {a = "y"; b = "z";}] - => { a = ["x" "y"]; b = ["z"]; } - - Type: - zipAttrsWith :: (String -> [ Any ] -> Any) -> [ AttrSet ] -> AttrSet - */ - zipAttrsWith = - builtins.zipAttrsWith or (f: sets: zipAttrsWithNames (concatMap attrNames sets) f sets); - - - /* Merge sets of attributes and combine each attribute value in to a list. - - Like `lib.attrsets.zipAttrsWith` with `(name: values: values)` as the function. - - Example: - zipAttrs [{a = "x";} {a = "y"; b = "z";}] - => { a = ["x" "y"]; b = ["z"]; } - - Type: - zipAttrs :: [ AttrSet ] -> AttrSet - */ - zipAttrs = - # List of attribute sets to zip together. - sets: - zipAttrsWith (name: values: values) sets; - - - /* Does the same as the update operator '//' except that attributes are - merged until the given predicate is verified. The predicate should - accept 3 arguments which are the path to reach the attribute, a part of - the first attribute set and a part of the second attribute set. When - the predicate is satisfied, the value of the first attribute set is - replaced by the value of the second attribute set. - - Example: - recursiveUpdateUntil (path: l: r: path == ["foo"]) { - # first attribute set - foo.bar = 1; - foo.baz = 2; - bar = 3; - } { - #second attribute set - foo.bar = 1; - foo.quz = 2; - baz = 4; - } - - => { - foo.bar = 1; # 'foo.*' from the second set - foo.quz = 2; # - bar = 3; # 'bar' from the first set - baz = 4; # 'baz' from the second set - } - - Type: - recursiveUpdateUntil :: ( [ String ] -> AttrSet -> AttrSet -> Bool ) -> AttrSet -> AttrSet -> AttrSet - */ - recursiveUpdateUntil = - # Predicate, taking the path to the current attribute as a list of strings for attribute names, and the two values at that path from the original arguments. - pred: - # Left attribute set of the merge. - lhs: - # Right attribute set of the merge. - rhs: - let f = attrPath: - zipAttrsWith (n: values: - let here = attrPath ++ [n]; in - if length values == 1 - || pred here (elemAt values 1) (head values) then - head values - else - f here values - ); - in f [] [rhs lhs]; - - - /* A recursive variant of the update operator ‘//’. The recursion - stops when one of the attribute values is not an attribute set, - in which case the right hand side value takes precedence over the - left hand side value. - - Example: - recursiveUpdate { - boot.loader.grub.enable = true; - boot.loader.grub.device = "/dev/hda"; - } { - boot.loader.grub.device = ""; - } - - returns: { - boot.loader.grub.enable = true; - boot.loader.grub.device = ""; - } - - Type: - recursiveUpdate :: AttrSet -> AttrSet -> AttrSet - */ - recursiveUpdate = - # Left attribute set of the merge. - lhs: - # Right attribute set of the merge. - rhs: - recursiveUpdateUntil (path: lhs: rhs: !(isAttrs lhs && isAttrs rhs)) lhs rhs; - - - /* Returns true if the pattern is contained in the set. False otherwise. - - Example: - matchAttrs { cpu = {}; } { cpu = { bits = 64; }; } - => true - - Type: - matchAttrs :: AttrSet -> AttrSet -> Bool - */ - matchAttrs = - # Attribute set structure to match - pattern: - # Attribute set to find patterns in - attrs: - assert isAttrs pattern; - all id (attrValues (zipAttrsWithNames (attrNames pattern) (n: values: - let pat = head values; val = elemAt values 1; in - if length values == 1 then false - else if isAttrs pat then isAttrs val && matchAttrs pat val - else pat == val - ) [pattern attrs])); - - - /* Override only the attributes that are already present in the old set - useful for deep-overriding. - - Example: - overrideExisting {} { a = 1; } - => {} - overrideExisting { b = 2; } { a = 1; } - => { b = 2; } - overrideExisting { a = 3; b = 2; } { a = 1; } - => { a = 1; b = 2; } - - Type: - overrideExisting :: AttrSet -> AttrSet -> AttrSet - */ - overrideExisting = - # Original attribute set - old: - # Attribute set with attributes to override in `old`. - new: - mapAttrs (name: value: new.${name} or value) old; - - - /* Turns a list of strings into a human-readable description of those - strings represented as an attribute path. The result of this function is - not intended to be machine-readable. - Create a new attribute set with `value` set at the nested attribute location specified in `attrPath`. - - Example: - showAttrPath [ "foo" "10" "bar" ] - => "foo.\"10\".bar" - showAttrPath [] - => "" - - Type: - showAttrPath :: [String] -> String - */ - showAttrPath = - # Attribute path to render to a string - path: - if path == [] then "" - else concatMapStringsSep "." escapeNixIdentifier path; - - - /* Get a package output. - If no output is found, fallback to `.out` and then to the default. - - Example: - getOutput "dev" pkgs.openssl - => "/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r-dev" - - Type: - getOutput :: String -> Derivation -> String - */ - getOutput = output: pkg: - if ! pkg ? outputSpecified || ! pkg.outputSpecified - then pkg.${output} or pkg.out or pkg - else pkg; - - /* Get a package's `bin` output. - If the output does not exist, fallback to `.out` and then to the default. - - Example: - getBin pkgs.openssl - => "/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r" - - Type: - getBin :: Derivation -> String - */ - getBin = getOutput "bin"; - - - /* Get a package's `lib` output. - If the output does not exist, fallback to `.out` and then to the default. - - Example: - getLib pkgs.openssl - => "/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r-lib" - - Type: - getLib :: Derivation -> String - */ - getLib = getOutput "lib"; - - - /* Get a package's `dev` output. - If the output does not exist, fallback to `.out` and then to the default. - - Example: - getDev pkgs.openssl - => "/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r-dev" - - Type: - getDev :: Derivation -> String - */ - getDev = getOutput "dev"; - - - /* Get a package's `man` output. - If the output does not exist, fallback to `.out` and then to the default. - - Example: - getMan pkgs.openssl - => "/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r-man" - - Type: - getMan :: Derivation -> String - */ - getMan = getOutput "man"; - - /* Pick the outputs of packages to place in `buildInputs` - - Type: chooseDevOutputs :: [Derivation] -> [String] - - */ - chooseDevOutputs = - # List of packages to pick `dev` outputs from - drvs: - builtins.map getDev drvs; - - /* Make various Nix tools consider the contents of the resulting - attribute set when looking for what to build, find, etc. - - This function only affects a single attribute set; it does not - apply itself recursively for nested attribute sets. - - Example: - { pkgs ? import {} }: - { - myTools = pkgs.lib.recurseIntoAttrs { - inherit (pkgs) hello figlet; - }; - } - - Type: - recurseIntoAttrs :: AttrSet -> AttrSet - - */ - recurseIntoAttrs = - # An attribute set to scan for derivations. - attrs: - attrs // { recurseForDerivations = true; }; - - /* Undo the effect of recurseIntoAttrs. - - Type: - dontRecurseIntoAttrs :: AttrSet -> AttrSet - */ - dontRecurseIntoAttrs = - # An attribute set to not scan for derivations. - attrs: - attrs // { recurseForDerivations = false; }; - - /* `unionOfDisjoint x y` is equal to `x // y // z` where the - attrnames in `z` are the intersection of the attrnames in `x` and - `y`, and all values `assert` with an error message. This - operator is commutative, unlike (//). - - Type: unionOfDisjoint :: AttrSet -> AttrSet -> AttrSet - */ - unionOfDisjoint = x: y: - let - intersection = builtins.intersectAttrs x y; - collisions = lib.concatStringsSep " " (builtins.attrNames intersection); - mask = builtins.mapAttrs (name: value: builtins.throw - "unionOfDisjoint: collision on ${name}; complete list: ${collisions}") - intersection; - in - (x // y) // mask; - - # DEPRECATED - zipWithNames = zipAttrsWithNames; - - # DEPRECATED - zip = builtins.trace - "lib.zip is deprecated, use lib.zipAttrsWith instead" zipAttrsWith; -} diff --git a/lib/cli.nix b/lib/cli.nix deleted file mode 100644 index c96d4dbb043..00000000000 --- a/lib/cli.nix +++ /dev/null @@ -1,83 +0,0 @@ -{ lib }: - -rec { - /* Automatically convert an attribute set to command-line options. - - This helps protect against malformed command lines and also to reduce - boilerplate related to command-line construction for simple use cases. - - `toGNUCommandLine` returns a list of nix strings. - `toGNUCommandLineShell` returns an escaped shell string. - - Example: - cli.toGNUCommandLine {} { - data = builtins.toJSON { id = 0; }; - X = "PUT"; - retry = 3; - retry-delay = null; - url = [ "https://example.com/foo" "https://example.com/bar" ]; - silent = false; - verbose = true; - } - => [ - "-X" "PUT" - "--data" "{\"id\":0}" - "--retry" "3" - "--url" "https://example.com/foo" - "--url" "https://example.com/bar" - "--verbose" - ] - - cli.toGNUCommandLineShell {} { - data = builtins.toJSON { id = 0; }; - X = "PUT"; - retry = 3; - retry-delay = null; - url = [ "https://example.com/foo" "https://example.com/bar" ]; - silent = false; - verbose = true; - } - => "'-X' 'PUT' '--data' '{\"id\":0}' '--retry' '3' '--url' 'https://example.com/foo' '--url' 'https://example.com/bar' '--verbose'"; - */ - toGNUCommandLineShell = - options: attrs: lib.escapeShellArgs (toGNUCommandLine options attrs); - - toGNUCommandLine = { - # how to string-format the option name; - # by default one character is a short option (`-`), - # more than one characters a long option (`--`). - mkOptionName ? - k: if builtins.stringLength k == 1 - then "-${k}" - else "--${k}", - - # how to format a boolean value to a command list; - # by default it’s a flag option - # (only the option name if true, left out completely if false). - mkBool ? k: v: lib.optional v (mkOptionName k), - - # how to format a list value to a command list; - # by default the option name is repeated for each value - # and `mkOption` is applied to the values themselves. - mkList ? k: v: lib.concatMap (mkOption k) v, - - # how to format any remaining value to a command list; - # on the toplevel, booleans and lists are handled by `mkBool` and `mkList`, - # though they can still appear as values of a list. - # By default, everything is printed verbatim and complex types - # are forbidden (lists, attrsets, functions). `null` values are omitted. - mkOption ? - k: v: if v == null - then [] - else [ (mkOptionName k) (lib.generators.mkValueStringDefault {} v) ] - }: - options: - let - render = k: v: - if builtins.isBool v then mkBool k v - else if builtins.isList v then mkList k v - else mkOption k v; - - in - builtins.concatLists (lib.mapAttrsToList render options); -} diff --git a/lib/customisation.nix b/lib/customisation.nix deleted file mode 100644 index fe32e890f35..00000000000 --- a/lib/customisation.nix +++ /dev/null @@ -1,315 +0,0 @@ -{ lib }: - -rec { - - - /* `overrideDerivation drv f` takes a derivation (i.e., the result - of a call to the builtin function `derivation`) and returns a new - derivation in which the attributes of the original are overridden - according to the function `f`. The function `f` is called with - the original derivation attributes. - - `overrideDerivation` allows certain "ad-hoc" customisation - scenarios (e.g. in ~/.config/nixpkgs/config.nix). For instance, - if you want to "patch" the derivation returned by a package - function in Nixpkgs to build another version than what the - function itself provides, you can do something like this: - - mySed = overrideDerivation pkgs.gnused (oldAttrs: { - name = "sed-4.2.2-pre"; - src = fetchurl { - url = ftp://alpha.gnu.org/gnu/sed/sed-4.2.2-pre.tar.bz2; - sha256 = "11nq06d131y4wmf3drm0yk502d2xc6n5qy82cg88rb9nqd2lj41k"; - }; - patches = []; - }); - - For another application, see build-support/vm, where this - function is used to build arbitrary derivations inside a QEMU - virtual machine. - - Note that in order to preserve evaluation errors, the new derivation's - outPath depends on the old one's, which means that this function cannot - be used in circular situations when the old derivation also depends on the - new one. - - You should in general prefer `drv.overrideAttrs` over this function; - see the nixpkgs manual for more information on overriding. - */ - overrideDerivation = drv: f: - let - newDrv = derivation (drv.drvAttrs // (f drv)); - in lib.flip (extendDerivation (builtins.seq drv.drvPath true)) newDrv ( - { meta = drv.meta or {}; - passthru = if drv ? passthru then drv.passthru else {}; - } - // - (drv.passthru or {}) - // - # TODO(@Artturin): remove before release 23.05 and only have __spliced. - (lib.optionalAttrs (drv ? crossDrv && drv ? nativeDrv) { - crossDrv = overrideDerivation drv.crossDrv f; - nativeDrv = overrideDerivation drv.nativeDrv f; - }) - // - lib.optionalAttrs (drv ? __spliced) { - __spliced = {} // (lib.mapAttrs (_: sDrv: overrideDerivation sDrv f) drv.__spliced); - }); - - - /* `makeOverridable` takes a function from attribute set to attribute set and - injects `override` attribute which can be used to override arguments of - the function. - - nix-repl> x = {a, b}: { result = a + b; } - - nix-repl> y = lib.makeOverridable x { a = 1; b = 2; } - - nix-repl> y - { override = «lambda»; overrideDerivation = «lambda»; result = 3; } - - nix-repl> y.override { a = 10; } - { override = «lambda»; overrideDerivation = «lambda»; result = 12; } - - Please refer to "Nixpkgs Contributors Guide" section - ".overrideDerivation" to learn about `overrideDerivation` and caveats - related to its use. - */ - makeOverridable = f: origArgs: - let - result = f origArgs; - - # Creates a functor with the same arguments as f - copyArgs = g: lib.setFunctionArgs g (lib.functionArgs f); - # Changes the original arguments with (potentially a function that returns) a set of new attributes - overrideWith = newArgs: origArgs // (if lib.isFunction newArgs then newArgs origArgs else newArgs); - - # Re-call the function but with different arguments - overrideArgs = copyArgs (newArgs: makeOverridable f (overrideWith newArgs)); - # Change the result of the function call by applying g to it - overrideResult = g: makeOverridable (copyArgs (args: g (f args))) origArgs; - in - if builtins.isAttrs result then - result // { - override = overrideArgs; - overrideDerivation = fdrv: overrideResult (x: overrideDerivation x fdrv); - ${if result ? overrideAttrs then "overrideAttrs" else null} = fdrv: - overrideResult (x: x.overrideAttrs fdrv); - } - else if lib.isFunction result then - # Transform the result into a functor while propagating its arguments - lib.setFunctionArgs result (lib.functionArgs result) // { - override = overrideArgs; - } - else result; - - - /* Call the package function in the file `fn` with the required - arguments automatically. The function is called with the - arguments `args`, but any missing arguments are obtained from - `autoArgs`. This function is intended to be partially - parameterised, e.g., - - callPackage = callPackageWith pkgs; - pkgs = { - libfoo = callPackage ./foo.nix { }; - libbar = callPackage ./bar.nix { }; - }; - - If the `libbar` function expects an argument named `libfoo`, it is - automatically passed as an argument. Overrides or missing - arguments can be supplied in `args`, e.g. - - libbar = callPackage ./bar.nix { - libfoo = null; - enableX11 = true; - }; - */ - callPackageWith = autoArgs: fn: args: - let - f = if lib.isFunction fn then fn else import fn; - fargs = lib.functionArgs f; - - # All arguments that will be passed to the function - # This includes automatic ones and ones passed explicitly - allArgs = builtins.intersectAttrs fargs autoArgs // args; - - # A list of argument names that the function requires, but - # wouldn't be passed to it - missingArgs = lib.attrNames - # Filter out arguments that have a default value - (lib.filterAttrs (name: value: ! value) - # Filter out arguments that would be passed - (removeAttrs fargs (lib.attrNames allArgs))); - - # Get a list of suggested argument names for a given missing one - getSuggestions = arg: lib.pipe (autoArgs // args) [ - lib.attrNames - # Only use ones that are at most 2 edits away. While mork would work, - # levenshteinAtMost is only fast for 2 or less. - (lib.filter (lib.strings.levenshteinAtMost 2 arg)) - # Put strings with shorter distance first - (lib.sort (x: y: lib.strings.levenshtein x arg < lib.strings.levenshtein y arg)) - # Only take the first couple results - (lib.take 3) - # Quote all entries - (map (x: "\"" + x + "\"")) - ]; - - prettySuggestions = suggestions: - if suggestions == [] then "" - else if lib.length suggestions == 1 then ", did you mean ${lib.elemAt suggestions 0}?" - else ", did you mean ${lib.concatStringsSep ", " (lib.init suggestions)} or ${lib.last suggestions}?"; - - errorForArg = arg: - let - loc = builtins.unsafeGetAttrPos arg fargs; - # loc' can be removed once lib/minver.nix is >2.3.4, since that includes - # https://github.com/NixOS/nix/pull/3468 which makes loc be non-null - loc' = if loc != null then loc.file + ":" + toString loc.line - else if ! lib.isFunction fn then - toString fn + lib.optionalString (lib.sources.pathIsDirectory fn) "/default.nix" - else ""; - in "Function called without required argument \"${arg}\" at " - + "${loc'}${prettySuggestions (getSuggestions arg)}"; - - # Only show the error for the first missing argument - error = errorForArg (lib.head missingArgs); - - in if missingArgs == [] then makeOverridable f allArgs else abort error; - - - /* Like callPackage, but for a function that returns an attribute - set of derivations. The override function is added to the - individual attributes. */ - callPackagesWith = autoArgs: fn: args: - let - f = if lib.isFunction fn then fn else import fn; - auto = builtins.intersectAttrs (lib.functionArgs f) autoArgs; - origArgs = auto // args; - pkgs = f origArgs; - mkAttrOverridable = name: _: makeOverridable (newArgs: (f newArgs).${name}) origArgs; - in - if lib.isDerivation pkgs then throw - ("function `callPackages` was called on a *single* derivation " - + ''"${pkgs.name or ""}";'' - + " did you mean to use `callPackage` instead?") - else lib.mapAttrs mkAttrOverridable pkgs; - - - /* Add attributes to each output of a derivation without changing - the derivation itself and check a given condition when evaluating. */ - extendDerivation = condition: passthru: drv: - let - outputs = drv.outputs or [ "out" ]; - - commonAttrs = drv // (builtins.listToAttrs outputsList) // - ({ all = map (x: x.value) outputsList; }) // passthru; - - outputToAttrListElement = outputName: - { name = outputName; - value = commonAttrs // { - inherit (drv.${outputName}) type outputName; - outputSpecified = true; - drvPath = assert condition; drv.${outputName}.drvPath; - outPath = assert condition; drv.${outputName}.outPath; - } // - # TODO: give the derivation control over the outputs. - # `overrideAttrs` may not be the only attribute that needs - # updating when switching outputs. - lib.optionalAttrs (passthru?overrideAttrs) { - # TODO: also add overrideAttrs when overrideAttrs is not custom, e.g. when not splicing. - overrideAttrs = f: (passthru.overrideAttrs f).${outputName}; - }; - }; - - outputsList = map outputToAttrListElement outputs; - in commonAttrs // { - drvPath = assert condition; drv.drvPath; - outPath = assert condition; drv.outPath; - }; - - /* Strip a derivation of all non-essential attributes, returning - only those needed by hydra-eval-jobs. Also strictly evaluate the - result to ensure that there are no thunks kept alive to prevent - garbage collection. */ - hydraJob = drv: - let - outputs = drv.outputs or ["out"]; - - commonAttrs = - { inherit (drv) name system meta; inherit outputs; } - // lib.optionalAttrs (drv._hydraAggregate or false) { - _hydraAggregate = true; - constituents = map hydraJob (lib.flatten drv.constituents); - } - // (lib.listToAttrs outputsList); - - makeOutput = outputName: - let output = drv.${outputName}; in - { name = outputName; - value = commonAttrs // { - outPath = output.outPath; - drvPath = output.drvPath; - type = "derivation"; - inherit outputName; - }; - }; - - outputsList = map makeOutput outputs; - - drv' = (lib.head outputsList).value; - in if drv == null then null else - lib.deepSeq drv' drv'; - - /* Make a set of packages with a common scope. All packages called - with the provided `callPackage` will be evaluated with the same - arguments. Any package in the set may depend on any other. The - `overrideScope'` function allows subsequent modification of the package - set in a consistent way, i.e. all packages in the set will be - called with the overridden packages. The package sets may be - hierarchical: the packages in the set are called with the scope - provided by `newScope` and the set provides a `newScope` attribute - which can form the parent scope for later package sets. */ - makeScope = newScope: f: - let self = f self // { - newScope = scope: newScope (self // scope); - callPackage = self.newScope {}; - overrideScope = g: lib.warn - "`overrideScope` (from `lib.makeScope`) is deprecated. Do `overrideScope' (self: super: { … })` instead of `overrideScope (super: self: { … })`. All other overrides have the parameters in that order, including other definitions of `overrideScope`. This was the only definition violating the pattern." - (makeScope newScope (lib.fixedPoints.extends (lib.flip g) f)); - overrideScope' = g: makeScope newScope (lib.fixedPoints.extends g f); - packages = f; - }; - in self; - - /* Like the above, but aims to support cross compilation. It's still ugly, but - hopefully it helps a little bit. */ - makeScopeWithSplicing = splicePackages: newScope: otherSplices: keep: extra: f: - let - spliced0 = splicePackages { - pkgsBuildBuild = otherSplices.selfBuildBuild; - pkgsBuildHost = otherSplices.selfBuildHost; - pkgsBuildTarget = otherSplices.selfBuildTarget; - pkgsHostHost = otherSplices.selfHostHost; - pkgsHostTarget = self; # Not `otherSplices.selfHostTarget`; - pkgsTargetTarget = otherSplices.selfTargetTarget; - }; - spliced = extra spliced0 // spliced0 // keep self; - self = f self // { - newScope = scope: newScope (spliced // scope); - callPackage = newScope spliced; # == self.newScope {}; - # N.B. the other stages of the package set spliced in are *not* - # overridden. - overrideScope = g: makeScopeWithSplicing - splicePackages - newScope - otherSplices - keep - extra - (lib.fixedPoints.extends g f); - packages = f; - }; - in self; - -} diff --git a/lib/debug.nix b/lib/debug.nix deleted file mode 100644 index a851cd74778..00000000000 --- a/lib/debug.nix +++ /dev/null @@ -1,253 +0,0 @@ -/* Collection of functions useful for debugging - broken nix expressions. - - * `trace`-like functions take two values, print - the first to stderr and return the second. - * `traceVal`-like functions take one argument - which both printed and returned. - * `traceSeq`-like functions fully evaluate their - traced value before printing (not just to “weak - head normal form” like trace does by default). - * Functions that end in `-Fn` take an additional - function as their first argument, which is applied - to the traced value before it is printed. -*/ -{ lib }: -let - inherit (lib) - isInt - attrNames - isList - isAttrs - substring - addErrorContext - attrValues - concatLists - concatStringsSep - const - elem - generators - head - id - isDerivation - isFunction - mapAttrs - trace; -in - -rec { - - # -- TRACING -- - - /* Conditionally trace the supplied message, based on a predicate. - - Type: traceIf :: bool -> string -> a -> a - - Example: - traceIf true "hello" 3 - trace: hello - => 3 - */ - traceIf = - # Predicate to check - pred: - # Message that should be traced - msg: - # Value to return - x: if pred then trace msg x else x; - - /* Trace the supplied value after applying a function to it, and - return the original value. - - Type: traceValFn :: (a -> b) -> a -> a - - Example: - traceValFn (v: "mystring ${v}") "foo" - trace: mystring foo - => "foo" - */ - traceValFn = - # Function to apply - f: - # Value to trace and return - x: trace (f x) x; - - /* Trace the supplied value and return it. - - Type: traceVal :: a -> a - - Example: - traceVal 42 - # trace: 42 - => 42 - */ - traceVal = traceValFn id; - - /* `builtins.trace`, but the value is `builtins.deepSeq`ed first. - - Type: traceSeq :: a -> b -> b - - Example: - trace { a.b.c = 3; } null - trace: { a = ; } - => null - traceSeq { a.b.c = 3; } null - trace: { a = { b = { c = 3; }; }; } - => null - */ - traceSeq = - # The value to trace - x: - # The value to return - y: trace (builtins.deepSeq x x) y; - - /* Like `traceSeq`, but only evaluate down to depth n. - This is very useful because lots of `traceSeq` usages - lead to an infinite recursion. - - Example: - traceSeqN 2 { a.b.c = 3; } null - trace: { a = { b = {…}; }; } - => null - - Type: traceSeqN :: Int -> a -> b -> b - */ - traceSeqN = depth: x: y: - let snip = v: if isList v then noQuotes "[…]" v - else if isAttrs v then noQuotes "{…}" v - else v; - noQuotes = str: v: { __pretty = const str; val = v; }; - modify = n: fn: v: if (n == 0) then fn v - else if isList v then map (modify (n - 1) fn) v - else if isAttrs v then mapAttrs - (const (modify (n - 1) fn)) v - else v; - in trace (generators.toPretty { allowPrettyValues = true; } - (modify depth snip x)) y; - - /* A combination of `traceVal` and `traceSeq` that applies a - provided function to the value to be traced after `deepSeq`ing - it. - */ - traceValSeqFn = - # Function to apply - f: - # Value to trace - v: traceValFn f (builtins.deepSeq v v); - - /* A combination of `traceVal` and `traceSeq`. */ - traceValSeq = traceValSeqFn id; - - /* A combination of `traceVal` and `traceSeqN` that applies a - provided function to the value to be traced. */ - traceValSeqNFn = - # Function to apply - f: - depth: - # Value to trace - v: traceSeqN depth (f v) v; - - /* A combination of `traceVal` and `traceSeqN`. */ - traceValSeqN = traceValSeqNFn id; - - /* Trace the input and output of a function `f` named `name`, - both down to `depth`. - - This is useful for adding around a function call, - to see the before/after of values as they are transformed. - - Example: - traceFnSeqN 2 "id" (x: x) { a.b.c = 3; } - trace: { fn = "id"; from = { a.b = {…}; }; to = { a.b = {…}; }; } - => { a.b.c = 3; } - */ - traceFnSeqN = depth: name: f: v: - let res = f v; - in lib.traceSeqN - (depth + 1) - { - fn = name; - from = v; - to = res; - } - res; - - - # -- TESTING -- - - /* Evaluates a set of tests. - - A test is an attribute set `{expr, expected}`, - denoting an expression and its expected result. - - The result is a `list` of __failed tests__, each represented as - `{name, expected, result}`, - - - expected - - What was passed as `expected` - - result - - The actual `result` of the test - - Used for regression testing of the functions in lib; see - tests.nix for more examples. - - Important: Only attributes that start with `test` are executed. - - - If you want to run only a subset of the tests add the attribute `tests = ["testName"];` - - Example: - - runTests { - testAndOk = { - expr = lib.and true false; - expected = false; - }; - testAndFail = { - expr = lib.and true false; - expected = true; - }; - } - -> - [ - { - name = "testAndFail"; - expected = true; - result = false; - } - ] - - Type: - runTests :: { - tests = [ String ]; - ${testName} :: { - expr :: a; - expected :: a; - }; - } - -> - [ - { - name :: String; - expected :: a; - result :: a; - } - ] - */ - runTests = - # Tests to run - tests: concatLists (attrValues (mapAttrs (name: test: - let testsToRun = if tests ? tests then tests.tests else []; - in if (substring 0 4 name == "test" || elem name testsToRun) - && ((testsToRun == []) || elem name tests.tests) - && (test.expr != test.expected) - - then [ { inherit name; expected = test.expected; result = test.expr; } ] - else [] ) tests)); - - /* Create a test assuming that list elements are `true`. - - Example: - { testX = allTrue [ true ]; } - */ - testAllTrue = expr: { inherit expr; expected = map (x: true) expr; }; -} diff --git a/lib/default.nix b/lib/default.nix deleted file mode 100644 index 0424db36b2e..00000000000 --- a/lib/default.nix +++ /dev/null @@ -1,165 +0,0 @@ -/* Library of low-level helper functions for nix expressions. - * - * Please implement (mostly) exhaustive unit tests - * for new functions in `./tests.nix`. - */ -let - - inherit (import ./fixed-points.nix { inherit lib; }) makeExtensible; - - lib = makeExtensible (self: let - callLibs = file: import file { lib = self; }; - in { - - # often used, or depending on very little - trivial = callLibs ./trivial.nix; - fixedPoints = callLibs ./fixed-points.nix; - - # datatypes - attrsets = callLibs ./attrsets.nix; - lists = callLibs ./lists.nix; - strings = callLibs ./strings.nix; - stringsWithDeps = callLibs ./strings-with-deps.nix; - - # packaging - customisation = callLibs ./customisation.nix; - derivations = callLibs ./derivations.nix; - maintainers = import ../maintainers/maintainer-list.nix; - teams = callLibs ../maintainers/team-list.nix; - meta = callLibs ./meta.nix; - versions = callLibs ./versions.nix; - - # module system - modules = callLibs ./modules.nix; - options = callLibs ./options.nix; - types = callLibs ./types.nix; - - # constants - licenses = callLibs ./licenses.nix; - sourceTypes = callLibs ./source-types.nix; - systems = callLibs ./systems; - - # serialization - cli = callLibs ./cli.nix; - generators = callLibs ./generators.nix; - - # misc - asserts = callLibs ./asserts.nix; - debug = callLibs ./debug.nix; - misc = callLibs ./deprecated.nix; - - # domain-specific - fetchers = callLibs ./fetchers.nix; - - # Eval-time filesystem handling - path = callLibs ./path; - filesystem = callLibs ./filesystem.nix; - sources = callLibs ./sources.nix; - - # back-compat aliases - platforms = self.systems.doubles; - - # linux kernel configuration - kernel = callLibs ./kernel.nix; - - inherit (builtins) add addErrorContext attrNames concatLists - deepSeq elem elemAt filter genericClosure genList getAttr - hasAttr head isAttrs isBool isInt isList isPath isString length - lessThan listToAttrs pathExists readFile replaceStrings seq - stringLength sub substring tail trace; - inherit (self.trivial) id const pipe concat or and bitAnd bitOr bitXor - bitNot boolToString mergeAttrs flip mapNullable inNixShell isFloat min max - importJSON importTOML warn warnIf warnIfNot throwIf throwIfNot checkListOfEnum - info showWarnings nixpkgsVersion version isInOldestRelease - mod compare splitByAndCompare - functionArgs setFunctionArgs isFunction toFunction - toHexString toBaseDigits inPureEvalMode; - inherit (self.fixedPoints) fix fix' converge extends composeExtensions - composeManyExtensions makeExtensible makeExtensibleWithCustomName; - inherit (self.attrsets) attrByPath hasAttrByPath setAttrByPath - getAttrFromPath attrVals attrValues getAttrs catAttrs filterAttrs - filterAttrsRecursive foldlAttrs foldAttrs collect nameValuePair mapAttrs - mapAttrs' mapAttrsToList concatMapAttrs mapAttrsRecursive mapAttrsRecursiveCond - genAttrs isDerivation toDerivation optionalAttrs - zipAttrsWithNames zipAttrsWith zipAttrs recursiveUpdateUntil - recursiveUpdate matchAttrs overrideExisting showAttrPath getOutput getBin - getLib getDev getMan chooseDevOutputs zipWithNames zip - recurseIntoAttrs dontRecurseIntoAttrs cartesianProductOfSets - updateManyAttrsByPath; - inherit (self.lists) singleton forEach foldr fold foldl foldl' imap0 imap1 - concatMap flatten remove findSingle findFirst any all count - optional optionals toList range replicate partition zipListsWith zipLists - reverseList listDfs toposort sort naturalSort compareLists take - drop sublist last init crossLists unique intersectLists - subtractLists mutuallyExclusive groupBy groupBy'; - inherit (self.strings) concatStrings concatMapStrings concatImapStrings - intersperse concatStringsSep concatMapStringsSep - concatImapStringsSep concatLines makeSearchPath makeSearchPathOutput - makeLibraryPath makeBinPath optionalString - hasInfix hasPrefix hasSuffix stringToCharacters stringAsChars escape - escapeShellArg escapeShellArgs - isStorePath isStringLike - isValidPosixName toShellVar toShellVars - escapeRegex escapeURL escapeXML replaceChars lowerChars - upperChars toLower toUpper addContextFrom splitString - removePrefix removeSuffix versionOlder versionAtLeast - getName getVersion - mesonOption mesonBool mesonEnable - nameFromURL enableFeature enableFeatureAs withFeature - withFeatureAs fixedWidthString fixedWidthNumber - toInt toIntBase10 readPathsFromFile fileContents; - inherit (self.stringsWithDeps) textClosureList textClosureMap - noDepEntry fullDepEntry packEntry stringAfter; - inherit (self.customisation) overrideDerivation makeOverridable - callPackageWith callPackagesWith extendDerivation hydraJob - makeScope makeScopeWithSplicing; - inherit (self.derivations) lazyDerivation; - inherit (self.meta) addMetaAttrs dontDistribute setName updateName - appendToName mapDerivationAttrset setPrio lowPrio lowPrioSet hiPrio - hiPrioSet getLicenseFromSpdxId getExe; - inherit (self.sources) pathType pathIsDirectory cleanSourceFilter - cleanSource sourceByRegex sourceFilesBySuffices - commitIdFromGitRepo cleanSourceWith pathHasContext - canCleanSource pathIsRegularFile pathIsGitRepo; - inherit (self.modules) evalModules setDefaultModuleLocation - unifyModuleSyntax applyModuleArgsIfFunction mergeModules - mergeModules' mergeOptionDecls evalOptionValue mergeDefinitions - pushDownProperties dischargeProperties filterOverrides - sortProperties fixupOptionType mkIf mkAssert mkMerge mkOverride - mkOptionDefault mkDefault mkImageMediaOverride mkForce mkVMOverride - mkFixStrictness mkOrder mkBefore mkAfter mkAliasDefinitions - mkAliasAndWrapDefinitions fixMergeModules mkRemovedOptionModule - mkRenamedOptionModule mkRenamedOptionModuleWith - mkMergedOptionModule mkChangedOptionModule - mkAliasOptionModule mkDerivedConfig doRename - mkAliasOptionModuleMD; - inherit (self.options) isOption mkEnableOption mkSinkUndeclaredOptions - mergeDefaultOption mergeOneOption mergeEqualOption mergeUniqueOption - getValues getFiles - optionAttrSetToDocList optionAttrSetToDocList' - scrubOptionValue literalExpression literalExample literalDocBook - showOption showOptionWithDefLocs showFiles - unknownModule mkOption mkPackageOption mkPackageOptionMD - mdDoc literalMD; - inherit (self.types) isType setType defaultTypeMerge defaultFunctor - isOptionType mkOptionType; - inherit (self.asserts) - assertMsg assertOneOf; - inherit (self.debug) traceIf traceVal traceValFn - traceSeq traceSeqN traceValSeq - traceValSeqFn traceValSeqN traceValSeqNFn traceFnSeqN - runTests testAllTrue; - inherit (self.misc) maybeEnv defaultMergeArg defaultMerge foldArgs - maybeAttrNullable maybeAttr ifEnable checkFlag getValue - checkReqs uniqList uniqListExt condConcat lazyGenericClosure - innerModifySumArgs modifySumArgs innerClosePropagation - closePropagation mapAttrsFlatten nvs setAttr setAttrMerge - mergeAttrsWithFunc mergeAttrsConcatenateValues - mergeAttrsNoOverride mergeAttrByFunc mergeAttrsByFuncDefaults - mergeAttrsByFuncDefaultsClean mergeAttrBy - fakeHash fakeSha256 fakeSha512 - nixType imap; - inherit (self.versions) - splitVersion; - }); -in lib diff --git a/lib/deprecated.nix b/lib/deprecated.nix deleted file mode 100644 index ed14e04bbd6..00000000000 --- a/lib/deprecated.nix +++ /dev/null @@ -1,307 +0,0 @@ -{ lib }: -let - inherit (builtins) head tail isList isAttrs isInt attrNames; - -in - -with lib.lists; -with lib.attrsets; -with lib.strings; - -rec { - - # returns default if env var is not set - maybeEnv = name: default: - let value = builtins.getEnv name; in - if value == "" then default else value; - - defaultMergeArg = x : y: if builtins.isAttrs y then - y - else - (y x); - defaultMerge = x: y: x // (defaultMergeArg x y); - foldArgs = merger: f: init: x: - let arg = (merger init (defaultMergeArg init x)); - # now add the function with composed args already applied to the final attrs - base = (setAttrMerge "passthru" {} (f arg) - ( z: z // { - function = foldArgs merger f arg; - args = (lib.attrByPath ["passthru" "args"] {} z) // x; - } )); - withStdOverrides = base // { - override = base.passthru.function; - }; - in - withStdOverrides; - - - # shortcut for attrByPath ["name"] default attrs - maybeAttrNullable = maybeAttr; - - # shortcut for attrByPath ["name"] default attrs - maybeAttr = name: default: attrs: attrs.${name} or default; - - - # Return the second argument if the first one is true or the empty version - # of the second argument. - ifEnable = cond: val: - if cond then val - else if builtins.isList val then [] - else if builtins.isAttrs val then {} - # else if builtins.isString val then "" - else if val == true || val == false then false - else null; - - - # Return true only if there is an attribute and it is true. - checkFlag = attrSet: name: - if name == "true" then true else - if name == "false" then false else - if (elem name (attrByPath ["flags"] [] attrSet)) then true else - attrByPath [name] false attrSet ; - - - # Input : attrSet, [ [name default] ... ], name - # Output : its value or default. - getValue = attrSet: argList: name: - ( attrByPath [name] (if checkFlag attrSet name then true else - if argList == [] then null else - let x = builtins.head argList; in - if (head x) == name then - (head (tail x)) - else (getValue attrSet - (tail argList) name)) attrSet ); - - - # Input : attrSet, [[name default] ...], [ [flagname reqs..] ... ] - # Output : are reqs satisfied? It's asserted. - checkReqs = attrSet: argList: condList: - ( - foldr lib.and true - (map (x: let name = (head x); in - - ((checkFlag attrSet name) -> - (foldr lib.and true - (map (y: let val=(getValue attrSet argList y); in - (val!=null) && (val!=false)) - (tail x))))) condList)); - - - # This function has O(n^2) performance. - uniqList = { inputList, acc ? [] }: - let go = xs: acc: - if xs == [] - then [] - else let x = head xs; - y = if elem x acc then [] else [x]; - in y ++ go (tail xs) (y ++ acc); - in go inputList acc; - - uniqListExt = { inputList, - outputList ? [], - getter ? (x: x), - compare ? (x: y: x==y) }: - if inputList == [] then outputList else - let x = head inputList; - isX = y: (compare (getter y) (getter x)); - newOutputList = outputList ++ - (if any isX outputList then [] else [x]); - in uniqListExt { outputList = newOutputList; - inputList = (tail inputList); - inherit getter compare; - }; - - condConcat = name: list: checker: - if list == [] then name else - if checker (head list) then - condConcat - (name + (head (tail list))) - (tail (tail list)) - checker - else condConcat - name (tail (tail list)) checker; - - lazyGenericClosure = {startSet, operator}: - let - work = list: doneKeys: result: - if list == [] then - result - else - let x = head list; key = x.key; in - if elem key doneKeys then - work (tail list) doneKeys result - else - work (tail list ++ operator x) ([key] ++ doneKeys) ([x] ++ result); - in - work startSet [] []; - - innerModifySumArgs = f: x: a: b: if b == null then (f a b) // x else - innerModifySumArgs f x (a // b); - modifySumArgs = f: x: innerModifySumArgs f x {}; - - - innerClosePropagation = acc: xs: - if xs == [] - then acc - else let y = head xs; - ys = tail xs; - in if ! isAttrs y - then innerClosePropagation acc ys - else let acc' = [y] ++ acc; - in innerClosePropagation - acc' - (uniqList { inputList = (maybeAttrNullable "propagatedBuildInputs" [] y) - ++ (maybeAttrNullable "propagatedNativeBuildInputs" [] y) - ++ ys; - acc = acc'; - } - ); - - closePropagationSlow = list: (uniqList {inputList = (innerClosePropagation [] list);}); - - # This is an optimisation of lib.closePropagation which avoids the O(n^2) behavior - # Using a list of derivations, it generates the full closure of the propagatedXXXBuildInputs - # The ordering / sorting / comparison is done based on the `outPath` - # attribute of each derivation. - # On some benchmarks, it performs up to 15 times faster than lib.closePropagation. - # See https://github.com/NixOS/nixpkgs/pull/194391 for details. - closePropagationFast = list: - builtins.map (x: x.val) (builtins.genericClosure { - startSet = builtins.map (x: { - key = x.outPath; - val = x; - }) (builtins.filter (x: x != null) list); - operator = item: - if !builtins.isAttrs item.val then - [ ] - else - builtins.concatMap (x: - if x != null then [{ - key = x.outPath; - val = x; - }] else - [ ]) ((item.val.propagatedBuildInputs or [ ]) - ++ (item.val.propagatedNativeBuildInputs or [ ])); - }); - - closePropagation = if builtins ? genericClosure - then closePropagationFast - else closePropagationSlow; - - # calls a function (f attr value ) for each record item. returns a list - mapAttrsFlatten = f: r: map (attr: f attr r.${attr}) (attrNames r); - - # attribute set containing one attribute - nvs = name: value: listToAttrs [ (nameValuePair name value) ]; - # adds / replaces an attribute of an attribute set - setAttr = set: name: v: set // (nvs name v); - - # setAttrMerge (similar to mergeAttrsWithFunc but only merges the values of a particular name) - # setAttrMerge "a" [] { a = [2];} (x: x ++ [3]) -> { a = [2 3]; } - # setAttrMerge "a" [] { } (x: x ++ [3]) -> { a = [ 3]; } - setAttrMerge = name: default: attrs: f: - setAttr attrs name (f (maybeAttr name default attrs)); - - # Using f = a: b = b the result is similar to // - # merge attributes with custom function handling the case that the attribute - # exists in both sets - mergeAttrsWithFunc = f: set1: set2: - foldr (n: set: if set ? ${n} - then setAttr set n (f set.${n} set2.${n}) - else set ) - (set2 // set1) (attrNames set2); - - # merging two attribute set concatenating the values of same attribute names - # eg { a = 7; } { a = [ 2 3 ]; } becomes { a = [ 7 2 3 ]; } - mergeAttrsConcatenateValues = mergeAttrsWithFunc ( a: b: (toList a) ++ (toList b) ); - - # merges attributes using //, if a name exists in both attributes - # an error will be triggered unless its listed in mergeLists - # so you can mergeAttrsNoOverride { buildInputs = [a]; } { buildInputs = [a]; } {} to get - # { buildInputs = [a b]; } - # merging buildPhase doesn't really make sense. The cases will be rare where appending /prefixing will fit your needs? - # in these cases the first buildPhase will override the second one - # ! deprecated, use mergeAttrByFunc instead - mergeAttrsNoOverride = { mergeLists ? ["buildInputs" "propagatedBuildInputs"], - overrideSnd ? [ "buildPhase" ] - }: attrs1: attrs2: - foldr (n: set: - setAttr set n ( if set ? ${n} - then # merge - if elem n mergeLists # attribute contains list, merge them by concatenating - then attrs2.${n} ++ attrs1.${n} - else if elem n overrideSnd - then attrs1.${n} - else throw "error mergeAttrsNoOverride, attribute ${n} given in both attributes - no merge func defined" - else attrs2.${n} # add attribute not existing in attr1 - )) attrs1 (attrNames attrs2); - - - # example usage: - # mergeAttrByFunc { - # inherit mergeAttrBy; # defined below - # buildInputs = [ a b ]; - # } { - # buildInputs = [ c d ]; - # }; - # will result in - # { mergeAttrsBy = [...]; buildInputs = [ a b c d ]; } - # is used by defaultOverridableDelayableArgs and can be used when composing using - # foldArgs, composedArgsAndFun or applyAndFun. Example: composableDerivation in all-packages.nix - mergeAttrByFunc = x: y: - let - mergeAttrBy2 = { mergeAttrBy = lib.mergeAttrs; } - // (maybeAttr "mergeAttrBy" {} x) - // (maybeAttr "mergeAttrBy" {} y); in - foldr lib.mergeAttrs {} [ - x y - (mapAttrs ( a: v: # merge special names using given functions - if x ? ${a} - then if y ? ${a} - then v x.${a} y.${a} # both have attr, use merge func - else x.${a} # only x has attr - else y.${a} # only y has attr) - ) (removeAttrs mergeAttrBy2 - # don't merge attrs which are neither in x nor y - (filter (a: ! x ? ${a} && ! y ? ${a}) - (attrNames mergeAttrBy2)) - ) - ) - ]; - mergeAttrsByFuncDefaults = foldl mergeAttrByFunc { inherit mergeAttrBy; }; - mergeAttrsByFuncDefaultsClean = list: removeAttrs (mergeAttrsByFuncDefaults list) ["mergeAttrBy"]; - - # sane defaults (same name as attr name so that inherit can be used) - mergeAttrBy = # { buildInputs = concatList; [...]; passthru = mergeAttr; [..]; } - listToAttrs (map (n: nameValuePair n lib.concat) - [ "nativeBuildInputs" "buildInputs" "propagatedBuildInputs" "configureFlags" "prePhases" "postAll" "patches" ]) - // listToAttrs (map (n: nameValuePair n lib.mergeAttrs) [ "passthru" "meta" "cfg" "flags" ]) - // listToAttrs (map (n: nameValuePair n (a: b: "${a}\n${b}") ) [ "preConfigure" "postInstall" ]) - ; - - nixType = x: - if isAttrs x then - if x ? outPath then "derivation" - else "attrs" - else if lib.isFunction x then "function" - else if isList x then "list" - else if x == true then "bool" - else if x == false then "bool" - else if x == null then "null" - else if isInt x then "int" - else "string"; - - /* deprecated: - - For historical reasons, imap has an index starting at 1. - - But for consistency with the rest of the library we want an index - starting at zero. - */ - imap = imap1; - - # Fake hashes. Can be used as hash placeholders, when computing hash ahead isn't trivial - fakeHash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; - fakeSha256 = "0000000000000000000000000000000000000000000000000000000000000000"; - fakeSha512 = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"; -} diff --git a/lib/derivations.nix b/lib/derivations.nix deleted file mode 100644 index dce98b46ddb..00000000000 --- a/lib/derivations.nix +++ /dev/null @@ -1,101 +0,0 @@ -{ lib }: - -let - inherit (lib) throwIfNot; -in -{ - /* - Restrict a derivation to a predictable set of attribute names, so - that the returned attrset is not strict in the actual derivation, - saving a lot of computation when the derivation is non-trivial. - - This is useful in situations where a derivation might only be used for its - passthru attributes, improving evaluation performance. - - The returned attribute set is lazy in `derivation`. Specifically, this - means that the derivation will not be evaluated in at least the - situations below. - - For illustration and/or testing, we define derivation such that its - evaluation is very noticeable. - - let derivation = throw "This won't be evaluated."; - - In the following expressions, `derivation` will _not_ be evaluated: - - (lazyDerivation { inherit derivation; }).type - - attrNames (lazyDerivation { inherit derivation; }) - - (lazyDerivation { inherit derivation; } // { foo = true; }).foo - - (lazyDerivation { inherit derivation; meta.foo = true; }).meta - - In these expressions, it `derivation` _will_ be evaluated: - - "${lazyDerivation { inherit derivation }}" - - (lazyDerivation { inherit derivation }).outPath - - (lazyDerivation { inherit derivation }).meta - - And the following expressions are not valid, because the refer to - implementation details and/or attributes that may not be present on - some derivations: - - (lazyDerivation { inherit derivation }).buildInputs - - (lazyDerivation { inherit derivation }).passthru - - (lazyDerivation { inherit derivation }).pythonPath - - */ - lazyDerivation = - args@{ - # The derivation to be wrapped. - derivation - , # Optional meta attribute. - # - # While this function is primarily about derivations, it can improve - # the `meta` package attribute, which is usually specified through - # `mkDerivation`. - meta ? null - , # Optional extra values to add to the returned attrset. - # - # This can be used for adding package attributes, such as `tests`. - passthru ? { } - }: - let - # These checks are strict in `drv` and some `drv` attributes, but the - # attrset spine returned by lazyDerivation does not depend on it. - # Instead, the individual derivation attributes do depend on it. - checked = - throwIfNot (derivation.type or null == "derivation") - "lazySimpleDerivation: input must be a derivation." - throwIfNot - (derivation.outputs == [ "out" ]) - # Supporting multiple outputs should be a matter of inheriting more attrs. - "The derivation ${derivation.name or ""} has multiple outputs. This is not supported by lazySimpleDerivation yet. Support could be added, and be useful as long as the set of outputs is known in advance, without evaluating the actual derivation." - derivation; - in - { - # Hardcoded `type` - # - # `lazyDerivation` requires its `derivation` argument to be a derivation, - # so if it is not, that is a programming error by the caller and not - # something that `lazyDerivation` consumers should be able to correct - # for after the fact. - # So, to improve laziness, we assume correctness here and check it only - # when actual derivation values are accessed later. - type = "derivation"; - - # A fixed set of derivation values, so that `lazyDerivation` can return - # its attrset before evaluating `derivation`. - # This must only list attributes that are available on _all_ derivations. - inherit (checked) outputs out outPath outputName drvPath name system; - - # The meta attribute can either be taken from the derivation, or if the - # `lazyDerivation` caller knew a shortcut, be taken from there. - meta = args.meta or checked.meta; - } // passthru; -} diff --git a/lib/fetchers.nix b/lib/fetchers.nix deleted file mode 100644 index 1107353b51d..00000000000 --- a/lib/fetchers.nix +++ /dev/null @@ -1,13 +0,0 @@ -# snippets that can be shared by multiple fetchers (pkgs/build-support) -{ lib }: -{ - - proxyImpureEnvVars = [ - # We borrow these environment variables from the caller to allow - # easy proxy configuration. This is impure, but a fixed-output - # derivation like fetchurl is allowed to do so since its result is - # by definition pure. - "http_proxy" "https_proxy" "ftp_proxy" "all_proxy" "no_proxy" - ]; - -} diff --git a/lib/filesystem.nix b/lib/filesystem.nix deleted file mode 100644 index 94819605520..00000000000 --- a/lib/filesystem.nix +++ /dev/null @@ -1,79 +0,0 @@ -# Functions for copying sources to the Nix store. -{ lib }: - -let - inherit (lib.strings) - hasPrefix - ; -in - -{ - /* - A map of all haskell packages defined in the given path, - identified by having a cabal file with the same name as the - directory itself. - - Type: Path -> Map String Path - */ - haskellPathsInDir = - # The directory within to search - root: - let # Files in the root - root-files = builtins.attrNames (builtins.readDir root); - # Files with their full paths - root-files-with-paths = - map (file: - { name = file; value = root + "/${file}"; } - ) root-files; - # Subdirectories of the root with a cabal file. - cabal-subdirs = - builtins.filter ({ name, value }: - builtins.pathExists (value + "/${name}.cabal") - ) root-files-with-paths; - in builtins.listToAttrs cabal-subdirs; - /* - Find the first directory containing a file matching 'pattern' - upward from a given 'file'. - Returns 'null' if no directories contain a file matching 'pattern'. - - Type: RegExp -> Path -> Nullable { path : Path; matches : [ MatchResults ]; } - */ - locateDominatingFile = - # The pattern to search for - pattern: - # The file to start searching upward from - file: - let go = path: - let files = builtins.attrNames (builtins.readDir path); - matches = builtins.filter (match: match != null) - (map (builtins.match pattern) files); - in - if builtins.length matches != 0 - then { inherit path matches; } - else if path == /. - then null - else go (dirOf path); - parent = dirOf file; - isDir = - let base = baseNameOf file; - type = (builtins.readDir parent).${base} or null; - in file == /. || type == "directory"; - in go (if isDir then file else parent); - - - /* - Given a directory, return a flattened list of all files within it recursively. - - Type: Path -> [ Path ] - */ - listFilesRecursive = - # The path to recursively list - dir: - lib.flatten (lib.mapAttrsToList (name: type: - if type == "directory" then - lib.filesystem.listFilesRecursive (dir + "/${name}") - else - dir + "/${name}" - ) (builtins.readDir dir)); - -} diff --git a/lib/fixed-points.nix b/lib/fixed-points.nix deleted file mode 100644 index 926428293c1..00000000000 --- a/lib/fixed-points.nix +++ /dev/null @@ -1,113 +0,0 @@ -{ lib, ... }: -rec { - # Compute the fixed point of the given function `f`, which is usually an - # attribute set that expects its final, non-recursive representation as an - # argument: - # - # f = self: { foo = "foo"; bar = "bar"; foobar = self.foo + self.bar; } - # - # Nix evaluates this recursion until all references to `self` have been - # resolved. At that point, the final result is returned and `f x = x` holds: - # - # nix-repl> fix f - # { bar = "bar"; foo = "foo"; foobar = "foobar"; } - # - # Type: fix :: (a -> a) -> a - # - # See https://en.wikipedia.org/wiki/Fixed-point_combinator for further - # details. - fix = f: let x = f x; in x; - - # A variant of `fix` that records the original recursive attribute set in the - # result. This is useful in combination with the `extends` function to - # implement deep overriding. See pkgs/development/haskell-modules/default.nix - # for a concrete example. - fix' = f: let x = f x // { __unfix__ = f; }; in x; - - # Return the fixpoint that `f` converges to when called recursively, starting - # with the input `x`. - # - # nix-repl> converge (x: x / 2) 16 - # 0 - converge = f: x: - let - x' = f x; - in - if x' == x - then x - else converge f x'; - - # Modify the contents of an explicitly recursive attribute set in a way that - # honors `self`-references. This is accomplished with a function - # - # g = self: super: { foo = super.foo + " + "; } - # - # that has access to the unmodified input (`super`) as well as the final - # non-recursive representation of the attribute set (`self`). `extends` - # differs from the native `//` operator insofar as that it's applied *before* - # references to `self` are resolved: - # - # nix-repl> fix (extends g f) - # { bar = "bar"; foo = "foo + "; foobar = "foo + bar"; } - # - # The name of the function is inspired by object-oriented inheritance, i.e. - # think of it as an infix operator `g extends f` that mimics the syntax from - # Java. It may seem counter-intuitive to have the "base class" as the second - # argument, but it's nice this way if several uses of `extends` are cascaded. - # - # To get a better understanding how `extends` turns a function with a fix - # point (the package set we start with) into a new function with a different fix - # point (the desired packages set) lets just see, how `extends g f` - # unfolds with `g` and `f` defined above: - # - # extends g f = self: let super = f self; in super // g self super; - # = self: let super = { foo = "foo"; bar = "bar"; foobar = self.foo + self.bar; }; in super // g self super - # = self: { foo = "foo"; bar = "bar"; foobar = self.foo + self.bar; } // g self { foo = "foo"; bar = "bar"; foobar = self.foo + self.bar; } - # = self: { foo = "foo"; bar = "bar"; foobar = self.foo + self.bar; } // { foo = "foo" + " + "; } - # = self: { foo = "foo + "; bar = "bar"; foobar = self.foo + self.bar; } - # - extends = f: rattrs: self: let super = rattrs self; in super // f self super; - - # Compose two extending functions of the type expected by 'extends' - # into one where changes made in the first are available in the - # 'super' of the second - composeExtensions = - f: g: final: prev: - let fApplied = f final prev; - prev' = prev // fApplied; - in fApplied // g final prev'; - - # Compose several extending functions of the type expected by 'extends' into - # one where changes made in preceding functions are made available to - # subsequent ones. - # - # composeManyExtensions : [packageSet -> packageSet -> packageSet] -> packageSet -> packageSet -> packageSet - # ^final ^prev ^overrides ^final ^prev ^overrides - composeManyExtensions = - lib.foldr (x: y: composeExtensions x y) (final: prev: {}); - - # Create an overridable, recursive attribute set. For example: - # - # nix-repl> obj = makeExtensible (self: { }) - # - # nix-repl> obj - # { __unfix__ = «lambda»; extend = «lambda»; } - # - # nix-repl> obj = obj.extend (self: super: { foo = "foo"; }) - # - # nix-repl> obj - # { __unfix__ = «lambda»; extend = «lambda»; foo = "foo"; } - # - # nix-repl> obj = obj.extend (self: super: { foo = super.foo + " + "; bar = "bar"; foobar = self.foo + self.bar; }) - # - # nix-repl> obj - # { __unfix__ = «lambda»; bar = "bar"; extend = «lambda»; foo = "foo + "; foobar = "foo + bar"; } - makeExtensible = makeExtensibleWithCustomName "extend"; - - # Same as `makeExtensible` but the name of the extending attribute is - # customized. - makeExtensibleWithCustomName = extenderName: rattrs: - fix' (self: (rattrs self) // { - ${extenderName} = f: makeExtensibleWithCustomName extenderName (extends f rattrs); - }); -} diff --git a/lib/flake.nix b/lib/flake.nix deleted file mode 100644 index 0b5e54d547c..00000000000 --- a/lib/flake.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - description = "Library of low-level helper functions for nix expressions."; - - outputs = { self }: { lib = import ./.; }; -} diff --git a/lib/generators.nix b/lib/generators.nix deleted file mode 100644 index c46ecca58c6..00000000000 --- a/lib/generators.nix +++ /dev/null @@ -1,524 +0,0 @@ -/* Functions that generate widespread file - * formats from nix data structures. - * - * They all follow a similar interface: - * generator { config-attrs } data - * - * `config-attrs` are “holes” in the generators - * with sensible default implementations that - * can be overwritten. The default implementations - * are mostly generators themselves, called with - * their respective default values; they can be reused. - * - * Tests can be found in ./tests/misc.nix - * Documentation in the manual, #sec-generators - */ -{ lib }: -with (lib).trivial; -let - libStr = lib.strings; - libAttr = lib.attrsets; - - inherit (lib) isFunction; -in - -rec { - - ## -- HELPER FUNCTIONS & DEFAULTS -- - - /* Convert a value to a sensible default string representation. - * The builtin `toString` function has some strange defaults, - * suitable for bash scripts but not much else. - */ - mkValueStringDefault = {}: v: with builtins; - let err = t: v: abort - ("generators.mkValueStringDefault: " + - "${t} not supported: ${toPretty {} v}"); - in if isInt v then toString v - # convert derivations to store paths - else if lib.isDerivation v then toString v - # we default to not quoting strings - else if isString v then v - # isString returns "1", which is not a good default - else if true == v then "true" - # here it returns to "", which is even less of a good default - else if false == v then "false" - else if null == v then "null" - # if you have lists you probably want to replace this - else if isList v then err "lists" v - # same as for lists, might want to replace - else if isAttrs v then err "attrsets" v - # functions can’t be printed of course - else if isFunction v then err "functions" v - # Floats currently can't be converted to precise strings, - # condition warning on nix version once this isn't a problem anymore - # See https://github.com/NixOS/nix/pull/3480 - else if isFloat v then libStr.floatToString v - else err "this value is" (toString v); - - - /* Generate a line of key k and value v, separated by - * character sep. If sep appears in k, it is escaped. - * Helper for synaxes with different separators. - * - * mkValueString specifies how values should be formatted. - * - * mkKeyValueDefault {} ":" "f:oo" "bar" - * > "f\:oo:bar" - */ - mkKeyValueDefault = { - mkValueString ? mkValueStringDefault {} - }: sep: k: v: - "${libStr.escape [sep] k}${sep}${mkValueString v}"; - - - ## -- FILE FORMAT GENERATORS -- - - - /* Generate a key-value-style config file from an attrset. - * - * mkKeyValue is the same as in toINI. - */ - toKeyValue = { - mkKeyValue ? mkKeyValueDefault {} "=", - listsAsDuplicateKeys ? false - }: - let mkLine = k: v: mkKeyValue k v + "\n"; - mkLines = if listsAsDuplicateKeys - then k: v: map (mkLine k) (if lib.isList v then v else [v]) - else k: v: [ (mkLine k v) ]; - in attrs: libStr.concatStrings (lib.concatLists (libAttr.mapAttrsToList mkLines attrs)); - - - /* Generate an INI-style config file from an - * attrset of sections to an attrset of key-value pairs. - * - * generators.toINI {} { - * foo = { hi = "${pkgs.hello}"; ciao = "bar"; }; - * baz = { "also, integers" = 42; }; - * } - * - *> [baz] - *> also, integers=42 - *> - *> [foo] - *> ciao=bar - *> hi=/nix/store/y93qql1p5ggfnaqjjqhxcw0vqw95rlz0-hello-2.10 - * - * The mk* configuration attributes can generically change - * the way sections and key-value strings are generated. - * - * For more examples see the test cases in ./tests/misc.nix. - */ - toINI = { - # apply transformations (e.g. escapes) to section names - mkSectionName ? (name: libStr.escape [ "[" "]" ] name), - # format a setting line from key and value - mkKeyValue ? mkKeyValueDefault {} "=", - # allow lists as values for duplicate keys - listsAsDuplicateKeys ? false - }: attrsOfAttrs: - let - # map function to string for each key val - mapAttrsToStringsSep = sep: mapFn: attrs: - libStr.concatStringsSep sep - (libAttr.mapAttrsToList mapFn attrs); - mkSection = sectName: sectValues: '' - [${mkSectionName sectName}] - '' + toKeyValue { inherit mkKeyValue listsAsDuplicateKeys; } sectValues; - in - # map input to ini sections - mapAttrsToStringsSep "\n" mkSection attrsOfAttrs; - - /* Generate an INI-style config file from an attrset - * specifying the global section (no header), and an - * attrset of sections to an attrset of key-value pairs. - * - * generators.toINIWithGlobalSection {} { - * globalSection = { - * someGlobalKey = "hi"; - * }; - * sections = { - * foo = { hi = "${pkgs.hello}"; ciao = "bar"; }; - * baz = { "also, integers" = 42; }; - * } - * - *> someGlobalKey=hi - *> - *> [baz] - *> also, integers=42 - *> - *> [foo] - *> ciao=bar - *> hi=/nix/store/y93qql1p5ggfnaqjjqhxcw0vqw95rlz0-hello-2.10 - * - * The mk* configuration attributes can generically change - * the way sections and key-value strings are generated. - * - * For more examples see the test cases in ./tests/misc.nix. - * - * If you don’t need a global section, you can also use - * `generators.toINI` directly, which only takes - * the part in `sections`. - */ - toINIWithGlobalSection = { - # apply transformations (e.g. escapes) to section names - mkSectionName ? (name: libStr.escape [ "[" "]" ] name), - # format a setting line from key and value - mkKeyValue ? mkKeyValueDefault {} "=", - # allow lists as values for duplicate keys - listsAsDuplicateKeys ? false - }: { globalSection, sections }: - ( if globalSection == {} - then "" - else (toKeyValue { inherit mkKeyValue listsAsDuplicateKeys; } globalSection) - + "\n") - + (toINI { inherit mkSectionName mkKeyValue listsAsDuplicateKeys; } sections); - - /* Generate a git-config file from an attrset. - * - * It has two major differences from the regular INI format: - * - * 1. values are indented with tabs - * 2. sections can have sub-sections - * - * generators.toGitINI { - * url."ssh://git@github.com/".insteadOf = "https://github.com"; - * user.name = "edolstra"; - * } - * - *> [url "ssh://git@github.com/"] - *> insteadOf = https://github.com/ - *> - *> [user] - *> name = edolstra - */ - toGitINI = attrs: - with builtins; - let - mkSectionName = name: - let - containsQuote = libStr.hasInfix ''"'' name; - sections = libStr.splitString "." name; - section = head sections; - subsections = tail sections; - subsection = concatStringsSep "." subsections; - in if containsQuote || subsections == [ ] then - name - else - ''${section} "${subsection}"''; - - # generation for multiple ini values - mkKeyValue = k: v: - let mkKeyValue = mkKeyValueDefault { } " = " k; - in concatStringsSep "\n" (map (kv: "\t" + mkKeyValue kv) (lib.toList v)); - - # converts { a.b.c = 5; } to { "a.b".c = 5; } for toINI - gitFlattenAttrs = let - recurse = path: value: - if isAttrs value && !lib.isDerivation value then - lib.mapAttrsToList (name: value: recurse ([ name ] ++ path) value) value - else if length path > 1 then { - ${concatStringsSep "." (lib.reverseList (tail path))}.${head path} = value; - } else { - ${head path} = value; - }; - in attrs: lib.foldl lib.recursiveUpdate { } (lib.flatten (recurse [ ] attrs)); - - toINI_ = toINI { inherit mkKeyValue mkSectionName; }; - in - toINI_ (gitFlattenAttrs attrs); - - /* Generates JSON from an arbitrary (non-function) value. - * For more information see the documentation of the builtin. - */ - toJSON = {}: builtins.toJSON; - - - /* YAML has been a strict superset of JSON since 1.2, so we - * use toJSON. Before it only had a few differences referring - * to implicit typing rules, so it should work with older - * parsers as well. - */ - toYAML = toJSON; - - withRecursion = - { - /* If this option is not null, the given value will stop evaluating at a certain depth */ - depthLimit - /* If this option is true, an error will be thrown, if a certain given depth is exceeded */ - , throwOnDepthLimit ? true - }: - assert builtins.isInt depthLimit; - let - specialAttrs = [ - "__functor" - "__functionArgs" - "__toString" - "__pretty" - ]; - stepIntoAttr = evalNext: name: - if builtins.elem name specialAttrs - then id - else evalNext; - transform = depth: - if depthLimit != null && depth > depthLimit then - if throwOnDepthLimit - then throw "Exceeded maximum eval-depth limit of ${toString depthLimit} while trying to evaluate with `generators.withRecursion'!" - else const "" - else id; - mapAny = with builtins; depth: v: - let - evalNext = x: mapAny (depth + 1) (transform (depth + 1) x); - in - if isAttrs v then mapAttrs (stepIntoAttr evalNext) v - else if isList v then map evalNext v - else transform (depth + 1) v; - in - mapAny 0; - - /* Pretty print a value, akin to `builtins.trace`. - * Should probably be a builtin as well. - * The pretty-printed string should be suitable for rendering default values - * in the NixOS manual. In particular, it should be as close to a valid Nix expression - * as possible. - */ - toPretty = { - /* If this option is true, attrsets like { __pretty = fn; val = …; } - will use fn to convert val to a pretty printed representation. - (This means fn is type Val -> String.) */ - allowPrettyValues ? false, - /* If this option is true, the output is indented with newlines for attribute sets and lists */ - multiline ? true, - /* Initial indentation level */ - indent ? "" - }: - let - go = indent: v: with builtins; - let isPath = v: typeOf v == "path"; - introSpace = if multiline then "\n${indent} " else " "; - outroSpace = if multiline then "\n${indent}" else " "; - in if isInt v then toString v - # toString loses precision on floats, so we use toJSON instead. This isn't perfect - # as the resulting string may not parse back as a float (e.g. 42, 1e-06), but for - # pretty-printing purposes this is acceptable. - else if isFloat v then builtins.toJSON v - else if isString v then - let - lines = filter (v: ! isList v) (builtins.split "\n" v); - escapeSingleline = libStr.escape [ "\\" "\"" "\${" ]; - escapeMultiline = libStr.replaceStrings [ "\${" "''" ] [ "''\${" "'''" ]; - singlelineResult = "\"" + concatStringsSep "\\n" (map escapeSingleline lines) + "\""; - multilineResult = let - escapedLines = map escapeMultiline lines; - # The last line gets a special treatment: if it's empty, '' is on its own line at the "outer" - # indentation level. Otherwise, '' is appended to the last line. - lastLine = lib.last escapedLines; - in "''" + introSpace + concatStringsSep introSpace (lib.init escapedLines) - + (if lastLine == "" then outroSpace else introSpace + lastLine) + "''"; - in - if multiline && length lines > 1 then multilineResult else singlelineResult - else if true == v then "true" - else if false == v then "false" - else if null == v then "null" - else if isPath v then toString v - else if isList v then - if v == [] then "[ ]" - else "[" + introSpace - + libStr.concatMapStringsSep introSpace (go (indent + " ")) v - + outroSpace + "]" - else if isFunction v then - let fna = lib.functionArgs v; - showFnas = concatStringsSep ", " (libAttr.mapAttrsToList - (name: hasDefVal: if hasDefVal then name + "?" else name) - fna); - in if fna == {} then "" - else "" - else if isAttrs v then - # apply pretty values if allowed - if allowPrettyValues && v ? __pretty && v ? val - then v.__pretty v.val - else if v == {} then "{ }" - else if v ? type && v.type == "derivation" then - "" - else "{" + introSpace - + libStr.concatStringsSep introSpace (libAttr.mapAttrsToList - (name: value: - "${libStr.escapeNixIdentifier name} = ${ - builtins.addErrorContext "while evaluating an attribute `${name}`" - (go (indent + " ") value) - };") v) - + outroSpace + "}" - else abort "generators.toPretty: should never happen (v = ${v})"; - in go indent; - - # PLIST handling - toPlist = {}: v: let - isFloat = builtins.isFloat or (x: false); - expr = ind: x: with builtins; - if x == null then "" else - if isBool x then bool ind x else - if isInt x then int ind x else - if isString x then str ind x else - if isList x then list ind x else - if isAttrs x then attrs ind x else - if isFloat x then float ind x else - abort "generators.toPlist: should never happen (v = ${v})"; - - literal = ind: x: ind + x; - - bool = ind: x: literal ind (if x then "" else ""); - int = ind: x: literal ind "${toString x}"; - str = ind: x: literal ind "${x}"; - key = ind: x: literal ind "${x}"; - float = ind: x: literal ind "${toString x}"; - - indent = ind: expr "\t${ind}"; - - item = ind: libStr.concatMapStringsSep "\n" (indent ind); - - list = ind: x: libStr.concatStringsSep "\n" [ - (literal ind "") - (item ind x) - (literal ind "") - ]; - - attrs = ind: x: libStr.concatStringsSep "\n" [ - (literal ind "") - (attr ind x) - (literal ind "") - ]; - - attr = let attrFilter = name: value: name != "_module" && value != null; - in ind: x: libStr.concatStringsSep "\n" (lib.flatten (lib.mapAttrsToList - (name: value: lib.optionals (attrFilter name value) [ - (key "\t${ind}" name) - (expr "\t${ind}" value) - ]) x)); - - in '' - - -${expr "" v} -''; - - /* Translate a simple Nix expression to Dhall notation. - * Note that integers are translated to Integer and never - * the Natural type. - */ - toDhall = { }@args: v: - with builtins; - let concatItems = lib.strings.concatStringsSep ", "; - in if isAttrs v then - "{ ${ - concatItems (lib.attrsets.mapAttrsToList - (key: value: "${key} = ${toDhall args value}") v) - } }" - else if isList v then - "[ ${concatItems (map (toDhall args) v)} ]" - else if isInt v then - "${if v < 0 then "" else "+"}${toString v}" - else if isBool v then - (if v then "True" else "False") - else if isFunction v then - abort "generators.toDhall: cannot convert a function to Dhall" - else if v == null then - abort "generators.toDhall: cannot convert a null to Dhall" - else - builtins.toJSON v; - - /* - Translate a simple Nix expression to Lua representation with occasional - Lua-inlines that can be construted by mkLuaInline function. - - Configuration: - * multiline - by default is true which results in indented block-like view. - * indent - initial indent. - * asBindings - by default generate single value, but with this use attrset to set global vars. - - Attention: - Regardless of multiline parameter there is no trailing newline. - - Example: - generators.toLua {} - { - cmd = [ "typescript-language-server" "--stdio" ]; - settings.workspace.library = mkLuaInline ''vim.api.nvim_get_runtime_file("", true)''; - } - -> - { - ["cmd"] = { - "typescript-language-server", - "--stdio" - }, - ["settings"] = { - ["workspace"] = { - ["library"] = (vim.api.nvim_get_runtime_file("", true)) - } - } - } - - Type: - toLua :: AttrSet -> Any -> String - */ - toLua = { - /* If this option is true, the output is indented with newlines for attribute sets and lists */ - multiline ? true, - /* Initial indentation level */ - indent ? "", - /* Interpret as variable bindings */ - asBindings ? false, - }@args: v: - with builtins; - let - innerIndent = "${indent} "; - introSpace = if multiline then "\n${innerIndent}" else " "; - outroSpace = if multiline then "\n${indent}" else " "; - innerArgs = args // { - indent = if asBindings then indent else innerIndent; - asBindings = false; - }; - concatItems = concatStringsSep ",${introSpace}"; - isLuaInline = { _type ? null, ... }: _type == "lua-inline"; - - generatedBindings = - assert lib.assertMsg (badVarNames == []) "Bad Lua var names: ${toPretty {} badVarNames}"; - libStr.concatStrings ( - lib.attrsets.mapAttrsToList (key: value: "${indent}${key} = ${toLua innerArgs value}\n") v - ); - - # https://en.wikibooks.org/wiki/Lua_Programming/variable#Variable_names - matchVarName = match "[[:alpha:]_][[:alnum:]_]*(\\.[[:alpha:]_][[:alnum:]_]*)*"; - badVarNames = filter (name: matchVarName name == null) (attrNames v); - in - if asBindings then - generatedBindings - else if v == null then - "nil" - else if isInt v || isFloat v || isString v || isBool v then - builtins.toJSON v - else if isList v then - (if v == [ ] then "{}" else - "{${introSpace}${concatItems (map (value: "${toLua innerArgs value}") v)}${outroSpace}}") - else if isAttrs v then - ( - if isLuaInline v then - "(${v.expr})" - else if v == { } then - "{}" - else - "{${introSpace}${concatItems ( - lib.attrsets.mapAttrsToList (key: value: "[${builtins.toJSON key}] = ${toLua innerArgs value}") v - )}${outroSpace}}" - ) - else - abort "generators.toLua: type ${typeOf v} is unsupported"; - - /* - Mark string as Lua expression to be inlined when processed by toLua. - - Type: - mkLuaInline :: String -> AttrSet - */ - mkLuaInline = expr: { _type = "lua-inline"; inherit expr; }; -} diff --git a/lib/kernel.nix b/lib/kernel.nix deleted file mode 100644 index 33da9663a8e..00000000000 --- a/lib/kernel.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ lib }: - -with lib; -{ - - - # Keeping these around in case we decide to change this horrible implementation :) - option = x: - x // { optional = true; }; - - yes = { tristate = "y"; optional = false; }; - no = { tristate = "n"; optional = false; }; - module = { tristate = "m"; optional = false; }; - unset = { tristate = null; optional = false; }; - freeform = x: { freeform = x; optional = false; }; - - /* - Common patterns/legacy used in common-config/hardened/config.nix - */ - whenHelpers = version: { - whenAtLeast = ver: mkIf (versionAtLeast version ver); - whenOlder = ver: mkIf (versionOlder version ver); - # range is (inclusive, exclusive) - whenBetween = verLow: verHigh: mkIf (versionAtLeast version verLow && versionOlder version verHigh); - }; - -} diff --git a/lib/licenses.nix b/lib/licenses.nix deleted file mode 100644 index 873056d2fa5..00000000000 --- a/lib/licenses.nix +++ /dev/null @@ -1,1074 +0,0 @@ -{ lib }: - -lib.mapAttrs (lname: lset: let - defaultLicense = rec { - shortName = lname; - free = true; # Most of our licenses are Free, explicitly declare unfree additions as such! - deprecated = false; - }; - - mkLicense = licenseDeclaration: let - applyDefaults = license: defaultLicense // license; - applySpdx = license: - if license ? spdxId - then license // { url = "https://spdx.org/licenses/${license.spdxId}.html"; } - else license; - applyRedistributable = license: { redistributable = license.free; } // license; - in lib.pipe licenseDeclaration [ - applyDefaults - applySpdx - applyRedistributable - ]; -in mkLicense lset) ({ - /* License identifiers from spdx.org where possible. - * If you cannot find your license here, then look for a similar license or - * add it to this list. The URL mentioned above is a good source for inspiration. - */ - - abstyles = { - spdxId = "Abstyles"; - fullName = "Abstyles License"; - }; - - afl20 = { - spdxId = "AFL-2.0"; - fullName = "Academic Free License v2.0"; - }; - - afl21 = { - spdxId = "AFL-2.1"; - fullName = "Academic Free License v2.1"; - }; - - afl3 = { - spdxId = "AFL-3.0"; - fullName = "Academic Free License v3.0"; - }; - - agpl3Only = { - spdxId = "AGPL-3.0-only"; - fullName = "GNU Affero General Public License v3.0 only"; - }; - - agpl3Plus = { - spdxId = "AGPL-3.0-or-later"; - fullName = "GNU Affero General Public License v3.0 or later"; - }; - - aladdin = { - spdxId = "Aladdin"; - fullName = "Aladdin Free Public License"; - free = false; - }; - - amazonsl = { - fullName = "Amazon Software License"; - url = "https://aws.amazon.com/asl/"; - free = false; - }; - - amd = { - fullName = "AMD License Agreement"; - url = "https://developer.amd.com/amd-license-agreement/"; - free = false; - }; - - aom = { - fullName = "Alliance for Open Media Patent License 1.0"; - url = "https://aomedia.org/license/patent-license/"; - }; - - apsl10 = { - spdxId = "APSL-1.0"; - fullName = "Apple Public Source License 1.0"; - }; - - apsl20 = { - spdxId = "APSL-2.0"; - fullName = "Apple Public Source License 2.0"; - }; - - arphicpl = { - fullName = "Arphic Public License"; - url = "https://www.freedesktop.org/wiki/Arphic_Public_License/"; - }; - - artistic1 = { - spdxId = "Artistic-1.0"; - fullName = "Artistic License 1.0"; - }; - - artistic2 = { - spdxId = "Artistic-2.0"; - fullName = "Artistic License 2.0"; - }; - - asl20 = { - spdxId = "Apache-2.0"; - fullName = "Apache License 2.0"; - }; - - asl20-llvm = { - spdxId = "Apache-2.0 WITH LLVM-exception"; - fullName = "Apache License 2.0 with LLVM Exceptions"; - }; - - bitstreamVera = { - spdxId = "Bitstream-Vera"; - fullName = "Bitstream Vera Font License"; - }; - - bitTorrent10 = { - spdxId = "BitTorrent-1.0"; - fullName = " BitTorrent Open Source License v1.0"; - }; - - bitTorrent11 = { - spdxId = "BitTorrent-1.1"; - fullName = " BitTorrent Open Source License v1.1"; - }; - - bola11 = { - url = "https://blitiri.com.ar/p/bola/"; - fullName = "Buena Onda License Agreement 1.1"; - }; - - boost = { - spdxId = "BSL-1.0"; - fullName = "Boost Software License 1.0"; - }; - - beerware = { - spdxId = "Beerware"; - fullName = "Beerware License"; - }; - - blueOak100 = { - spdxId = "BlueOak-1.0.0"; - fullName = "Blue Oak Model License 1.0.0"; - }; - - bsd0 = { - spdxId = "0BSD"; - fullName = "BSD Zero Clause License"; - }; - - bsd1 = { - spdxId = "BSD-1-Clause"; - fullName = "BSD 1-Clause License"; - }; - - bsd2 = { - spdxId = "BSD-2-Clause"; - fullName = ''BSD 2-clause "Simplified" License''; - }; - - bsd2Patent = { - spdxId = "BSD-2-Clause-Patent"; - fullName = "BSD-2-Clause Plus Patent License"; - }; - - bsd2WithViews = { - spdxId = "BSD-2-Clause-Views"; - fullName = "BSD 2-Clause with views sentence"; - }; - - bsd3 = { - spdxId = "BSD-3-Clause"; - fullName = ''BSD 3-clause "New" or "Revised" License''; - }; - - bsdOriginal = { - spdxId = "BSD-4-Clause"; - fullName = ''BSD 4-clause "Original" or "Old" License''; - }; - - bsdOriginalShortened = { - spdxId = "BSD-4-Clause-Shortened"; - fullName = "BSD 4 Clause Shortened"; - }; - - bsdOriginalUC = { - spdxId = "BSD-4-Clause-UC"; - fullName = "BSD 4-Clause University of California-Specific"; - }; - - bsdProtection = { - spdxId = "BSD-Protection"; - fullName = "BSD Protection License"; - }; - - bsl11 = { - fullName = "Business Source License 1.1"; - url = "https://mariadb.com/bsl11"; - free = false; - }; - - cal10 = { - fullName = "Cryptographic Autonomy License version 1.0 (CAL-1.0)"; - url = "https://opensource.org/licenses/CAL-1.0"; - }; - - capec = { - fullName = "Common Attack Pattern Enumeration and Classification"; - url = "https://capec.mitre.org/about/termsofuse.html"; - }; - - clArtistic = { - spdxId = "ClArtistic"; - fullName = "Clarified Artistic License"; - }; - - cc0 = { - spdxId = "CC0-1.0"; - fullName = "Creative Commons Zero v1.0 Universal"; - }; - - cc-by-nc-nd-30 = { - spdxId = "CC-BY-NC-ND-3.0"; - fullName = "Creative Commons Attribution Non Commercial No Derivative Works 3.0 Unported"; - free = false; - }; - - cc-by-nc-sa-20 = { - spdxId = "CC-BY-NC-SA-2.0"; - fullName = "Creative Commons Attribution Non Commercial Share Alike 2.0"; - free = false; - }; - - cc-by-nc-sa-25 = { - spdxId = "CC-BY-NC-SA-2.5"; - fullName = "Creative Commons Attribution Non Commercial Share Alike 2.5"; - free = false; - }; - - cc-by-nc-sa-30 = { - spdxId = "CC-BY-NC-SA-3.0"; - fullName = "Creative Commons Attribution Non Commercial Share Alike 3.0"; - free = false; - }; - - cc-by-nc-sa-40 = { - spdxId = "CC-BY-NC-SA-4.0"; - fullName = "Creative Commons Attribution Non Commercial Share Alike 4.0"; - free = false; - }; - - cc-by-nc-30 = { - spdxId = "CC-BY-NC-3.0"; - fullName = "Creative Commons Attribution Non Commercial 3.0 Unported"; - free = false; - }; - - cc-by-nc-40 = { - spdxId = "CC-BY-NC-4.0"; - fullName = "Creative Commons Attribution Non Commercial 4.0 International"; - free = false; - }; - - cc-by-nd-30 = { - spdxId = "CC-BY-ND-3.0"; - fullName = "Creative Commons Attribution-No Derivative Works v3.00"; - free = false; - }; - - cc-by-sa-25 = { - spdxId = "CC-BY-SA-2.5"; - fullName = "Creative Commons Attribution Share Alike 2.5"; - }; - - cc-by-30 = { - spdxId = "CC-BY-3.0"; - fullName = "Creative Commons Attribution 3.0"; - }; - - cc-by-sa-30 = { - spdxId = "CC-BY-SA-3.0"; - fullName = "Creative Commons Attribution Share Alike 3.0"; - }; - - cc-by-40 = { - spdxId = "CC-BY-4.0"; - fullName = "Creative Commons Attribution 4.0"; - }; - - cc-by-sa-40 = { - spdxId = "CC-BY-SA-4.0"; - fullName = "Creative Commons Attribution Share Alike 4.0"; - }; - - cddl = { - spdxId = "CDDL-1.0"; - fullName = "Common Development and Distribution License 1.0"; - }; - - cecill20 = { - spdxId = "CECILL-2.0"; - fullName = "CeCILL Free Software License Agreement v2.0"; - }; - - cecill21 = { - spdxId = "CECILL-2.1"; - fullName = "CeCILL Free Software License Agreement v2.1"; - }; - - cecill-b = { - spdxId = "CECILL-B"; - fullName = "CeCILL-B Free Software License Agreement"; - }; - - cecill-c = { - spdxId = "CECILL-C"; - fullName = "CeCILL-C Free Software License Agreement"; - }; - - cpal10 = { - spdxId = "CPAL-1.0"; - fullName = "Common Public Attribution License 1.0"; - }; - - cpl10 = { - spdxId = "CPL-1.0"; - fullName = "Common Public License 1.0"; - }; - - curl = { - spdxId = "curl"; - fullName = "curl License"; - }; - - doc = { - spdxId = "DOC"; - fullName = "DOC License"; - }; - - drl10 = { - spdxId = "DRL-1.0"; - fullName = "Detection Rule License 1.0"; - }; - - eapl = { - fullName = "EPSON AVASYS PUBLIC LICENSE"; - url = "https://avasys.jp/hp/menu000000700/hpg000000603.htm"; - free = false; - }; - - ecl20 = { - fullName = "Educational Community License, Version 2.0"; - url = "https://opensource.org/licenses/ECL-2.0"; - shortName = "ECL 2.0"; - spdxId = "ECL-2.0"; - }; - - efl10 = { - spdxId = "EFL-1.0"; - fullName = "Eiffel Forum License v1.0"; - }; - - efl20 = { - spdxId = "EFL-2.0"; - fullName = "Eiffel Forum License v2.0"; - }; - - elastic = { - fullName = "ELASTIC LICENSE"; - url = "https://github.com/elastic/elasticsearch/blob/master/licenses/ELASTIC-LICENSE.txt"; - free = false; - }; - - epl10 = { - spdxId = "EPL-1.0"; - fullName = "Eclipse Public License 1.0"; - }; - - epl20 = { - spdxId = "EPL-2.0"; - fullName = "Eclipse Public License 2.0"; - }; - - epson = { - fullName = "Seiko Epson Corporation Software License Agreement for Linux"; - url = "https://download.ebz.epson.net/dsc/du/02/eula/global/LINUX_EN.html"; - free = false; - }; - - eupl11 = { - spdxId = "EUPL-1.1"; - fullName = "European Union Public License 1.1"; - }; - - eupl12 = { - spdxId = "EUPL-1.2"; - fullName = "European Union Public License 1.2"; - }; - - fdl11Only = { - spdxId = "GFDL-1.1-only"; - fullName = "GNU Free Documentation License v1.1 only"; - }; - - fdl11Plus = { - spdxId = "GFDL-1.1-or-later"; - fullName = "GNU Free Documentation License v1.1 or later"; - }; - - fdl12Only = { - spdxId = "GFDL-1.2-only"; - fullName = "GNU Free Documentation License v1.2 only"; - }; - - fdl12Plus = { - spdxId = "GFDL-1.2-or-later"; - fullName = "GNU Free Documentation License v1.2 or later"; - }; - - fdl13Only = { - spdxId = "GFDL-1.3-only"; - fullName = "GNU Free Documentation License v1.3 only"; - }; - - fdl13Plus = { - spdxId = "GFDL-1.3-or-later"; - fullName = "GNU Free Documentation License v1.3 or later"; - }; - - ffsl = { - fullName = "Floodgap Free Software License"; - url = "https://www.floodgap.com/software/ffsl/license.html"; - free = false; - }; - - free = { - fullName = "Unspecified free software license"; - }; - - ftl = { - spdxId = "FTL"; - fullName = "Freetype Project License"; - }; - - g4sl = { - fullName = "Geant4 Software License"; - url = "https://geant4.web.cern.ch/geant4/license/LICENSE.html"; - }; - - geogebra = { - fullName = "GeoGebra Non-Commercial License Agreement"; - url = "https://www.geogebra.org/license"; - free = false; - }; - - generaluser = { - fullName = "GeneralUser GS License v2.0"; - url = "http://www.schristiancollins.com/generaluser.php"; # license included in sources - }; - - gpl1Only = { - spdxId = "GPL-1.0-only"; - fullName = "GNU General Public License v1.0 only"; - }; - - gpl1Plus = { - spdxId = "GPL-1.0-or-later"; - fullName = "GNU General Public License v1.0 or later"; - }; - - gpl2Only = { - spdxId = "GPL-2.0-only"; - fullName = "GNU General Public License v2.0 only"; - }; - - gpl2Classpath = { - spdxId = "GPL-2.0-with-classpath-exception"; - fullName = "GNU General Public License v2.0 only (with Classpath exception)"; - }; - - gpl2ClasspathPlus = { - fullName = "GNU General Public License v2.0 or later (with Classpath exception)"; - url = "https://fedoraproject.org/wiki/Licensing/GPL_Classpath_Exception"; - }; - - gpl2Oss = { - fullName = "GNU General Public License version 2 only (with OSI approved licenses linking exception)"; - url = "https://www.mysql.com/about/legal/licensing/foss-exception"; - }; - - gpl2Plus = { - spdxId = "GPL-2.0-or-later"; - fullName = "GNU General Public License v2.0 or later"; - }; - - gpl3Only = { - spdxId = "GPL-3.0-only"; - fullName = "GNU General Public License v3.0 only"; - }; - - gpl3Plus = { - spdxId = "GPL-3.0-or-later"; - fullName = "GNU General Public License v3.0 or later"; - }; - - gpl3ClasspathPlus = { - fullName = "GNU General Public License v3.0 or later (with Classpath exception)"; - url = "https://fedoraproject.org/wiki/Licensing/GPL_Classpath_Exception"; - }; - - hpnd = { - spdxId = "HPND"; - fullName = "Historic Permission Notice and Disclaimer"; - }; - - hpndSellVariant = { - fullName = "Historical Permission Notice and Disclaimer - sell variant"; - spdxId = "HPND-sell-variant"; - }; - - # Intel's license, seems free - iasl = { - fullName = "iASL"; - url = "https://old.calculate-linux.org/packages/licenses/iASL"; - }; - - ijg = { - spdxId = "IJG"; - fullName = "Independent JPEG Group License"; - }; - - imagemagick = { - fullName = "ImageMagick License"; - spdxId = "imagemagick"; - }; - - imlib2 = { - spdxId = "Imlib2"; - fullName = "Imlib2 License"; - }; - - inria-compcert = { - fullName = "INRIA Non-Commercial License Agreement for the CompCert verified compiler"; - url = "https://compcert.org/doc/LICENSE.txt"; - free = false; - }; - - inria-icesl = { - fullName = "INRIA Non-Commercial License Agreement for IceSL"; - url = "https://icesl.loria.fr/assets/pdf/EULA_IceSL_binary.pdf"; - free = false; - }; - - ipa = { - spdxId = "IPA"; - fullName = "IPA Font License"; - }; - - ipl10 = { - spdxId = "IPL-1.0"; - fullName = "IBM Public License v1.0"; - }; - - isc = { - spdxId = "ISC"; - fullName = "ISC License"; - }; - - # Proprietary binaries; free to redistribute without modification. - databricks = { - fullName = "Databricks Proprietary License"; - url = "https://pypi.org/project/databricks-connect"; - free = false; - }; - - databricks-dbx = { - fullName = "DataBricks eXtensions aka dbx License"; - url = "https://github.com/databrickslabs/dbx/blob/743b579a4ac44531f764c6e522dbe5a81a7dc0e4/LICENSE"; - free = false; - redistributable = false; - }; - - fair = { - fullName = "Fair License"; - spdxId = "Fair"; - free = true; - }; - - issl = { - fullName = "Intel Simplified Software License"; - url = "https://software.intel.com/en-us/license/intel-simplified-software-license"; - free = false; - }; - - lal12 = { - spdxId = "LAL-1.2"; - fullName = "Licence Art Libre 1.2"; - }; - - lal13 = { - spdxId = "LAL-1.3"; - fullName = "Licence Art Libre 1.3"; - }; - - lgpl2Only = { - spdxId = "LGPL-2.0-only"; - fullName = "GNU Library General Public License v2 only"; - }; - - lgpl2Plus = { - spdxId = "LGPL-2.0-or-later"; - fullName = "GNU Library General Public License v2 or later"; - }; - - lgpl21Only = { - spdxId = "LGPL-2.1-only"; - fullName = "GNU Lesser General Public License v2.1 only"; - }; - - lgpl21Plus = { - spdxId = "LGPL-2.1-or-later"; - fullName = "GNU Lesser General Public License v2.1 or later"; - }; - - lgpl3Only = { - spdxId = "LGPL-3.0-only"; - fullName = "GNU Lesser General Public License v3.0 only"; - }; - - lgpl3Plus = { - spdxId = "LGPL-3.0-or-later"; - fullName = "GNU Lesser General Public License v3.0 or later"; - }; - - lgpllr = { - spdxId = "LGPLLR"; - fullName = "Lesser General Public License For Linguistic Resources"; - }; - - libpng = { - spdxId = "Libpng"; - fullName = "libpng License"; - }; - - libpng2 = { - spdxId = "libpng-2.0"; # Used since libpng 1.6.36. - fullName = "PNG Reference Library version 2"; - }; - - libssh2 = { - fullName = "libssh2 License"; - url = "https://www.libssh2.org/license.html"; - }; - - libtiff = { - spdxId = "libtiff"; - fullName = "libtiff License"; - }; - - llgpl21 = { - fullName = "Lisp LGPL; GNU Lesser General Public License version 2.1 with Franz Inc. preamble for clarification of LGPL terms in context of Lisp"; - url = "https://opensource.franz.com/preamble.html"; - }; - - lppl12 = { - spdxId = "LPPL-1.2"; - fullName = "LaTeX Project Public License v1.2"; - }; - - lppl13c = { - spdxId = "LPPL-1.3c"; - fullName = "LaTeX Project Public License v1.3c"; - }; - - lpl-102 = { - spdxId = "LPL-1.02"; - fullName = "Lucent Public License v1.02"; - }; - - miros = { - fullName = "MirOS License"; - url = "https://opensource.org/licenses/MirOS"; - }; - - # spdx.org does not (yet) differentiate between the X11 and Expat versions - # for details see https://en.wikipedia.org/wiki/MIT_License#Various_versions - mit = { - spdxId = "MIT"; - fullName = "MIT License"; - }; - # https://spdx.org/licenses/MIT-feh.html - mit-feh = { - spdxId = "MIT-feh"; - fullName = "feh License"; - }; - - mitAdvertising = { - spdxId = "MIT-advertising"; - fullName = "Enlightenment License (e16)"; - }; - - mit0 = { - spdxId = "MIT-0"; - fullName = "MIT No Attribution"; - }; - - mpl10 = { - spdxId = "MPL-1.0"; - fullName = "Mozilla Public License 1.0"; - }; - - mpl11 = { - spdxId = "MPL-1.1"; - fullName = "Mozilla Public License 1.1"; - }; - - mpl20 = { - spdxId = "MPL-2.0"; - fullName = "Mozilla Public License 2.0"; - }; - - mspl = { - spdxId = "MS-PL"; - fullName = "Microsoft Public License"; - }; - - nasa13 = { - spdxId = "NASA-1.3"; - fullName = "NASA Open Source Agreement 1.3"; - free = false; - }; - - ncsa = { - spdxId = "NCSA"; - fullName = "University of Illinois/NCSA Open Source License"; - }; - - nlpl = { - spdxId = "NLPL"; - fullName = "No Limit Public License"; - }; - - nposl3 = { - spdxId = "NPOSL-3.0"; - fullName = "Non-Profit Open Software License 3.0"; - }; - - obsidian = { - fullName = "Obsidian End User Agreement"; - url = "https://obsidian.md/eula"; - free = false; - }; - - ocamlpro_nc = { - fullName = "OCamlPro Non Commercial license version 1"; - url = "https://alt-ergo.ocamlpro.com/http/alt-ergo-2.2.0/OCamlPro-Non-Commercial-License.pdf"; - free = false; - }; - - odbl = { - spdxId = "ODbL-1.0"; - fullName = "Open Data Commons Open Database License v1.0"; - }; - - ofl = { - spdxId = "OFL-1.1"; - fullName = "SIL Open Font License 1.1"; - }; - - oml = { - spdxId = "OML"; - fullName = "Open Market License"; - }; - - openldap = { - spdxId = "OLDAP-2.8"; - fullName = "Open LDAP Public License v2.8"; - }; - - openssl = { - spdxId = "OpenSSL"; - fullName = "OpenSSL License"; - }; - - osl2 = { - spdxId = "OSL-2.0"; - fullName = "Open Software License 2.0"; - }; - - osl21 = { - spdxId = "OSL-2.1"; - fullName = "Open Software License 2.1"; - }; - - osl3 = { - spdxId = "OSL-3.0"; - fullName = "Open Software License 3.0"; - }; - - parity70 = { - spdxId = "Parity-7.0.0"; - fullName = "Parity Public License 7.0.0"; - url = "https://paritylicense.com/versions/7.0.0.html"; - }; - - php301 = { - spdxId = "PHP-3.01"; - fullName = "PHP License v3.01"; - }; - - postgresql = { - spdxId = "PostgreSQL"; - fullName = "PostgreSQL License"; - }; - - postman = { - fullName = "Postman EULA"; - url = "https://www.getpostman.com/licenses/postman_base_app"; - free = false; - }; - - psfl = { - spdxId = "Python-2.0"; - fullName = "Python Software Foundation License version 2"; - url = "https://docs.python.org/license.html"; - }; - - publicDomain = { - fullName = "Public Domain"; - }; - - purdueBsd = { - fullName = " Purdue BSD-Style License"; # also know as lsof license - url = "https://enterprise.dejacode.com/licenses/public/purdue-bsd"; - }; - - prosperity30 = { - fullName = "Prosperity-3.0.0"; - free = false; - url = "https://prosperitylicense.com/versions/3.0.0.html"; - }; - - qhull = { - spdxId = "Qhull"; - fullName = "Qhull License"; - }; - - qpl = { - spdxId = "QPL-1.0"; - fullName = "Q Public License 1.0"; - }; - - qwt = { - fullName = "Qwt License, Version 1.0"; - url = "https://qwt.sourceforge.io/qwtlicense.html"; - }; - - ruby = { - spdxId = "Ruby"; - fullName = "Ruby License"; - }; - - sendmail = { - spdxId = "Sendmail"; - fullName = "Sendmail License"; - }; - - sgi-b-20 = { - spdxId = "SGI-B-2.0"; - fullName = "SGI Free Software License B v2.0"; - }; - - # Gentoo seems to treat it as a license: - # https://gitweb.gentoo.org/repo/gentoo.git/tree/licenses/SGMLUG?id=7d999af4a47bf55e53e54713d98d145f935935c1 - sgmlug = { - fullName = "SGML UG SGML Parser Materials license"; - }; - - sleepycat = { - spdxId = "Sleepycat"; - fullName = "Sleepycat License"; - }; - - smail = { - shortName = "smail"; - fullName = "SMAIL General Public License"; - url = "https://sources.debian.org/copyright/license/debianutils/4.9.1/"; - }; - - sspl = { - shortName = "SSPL"; - fullName = "Server Side Public License"; - url = "https://www.mongodb.com/licensing/server-side-public-license"; - free = false; - # NOTE Debatable. - # The license a slightly modified AGPL but still considered unfree by the - # OSI for what seem like political reasons - redistributable = true; # Definitely redistributable though, it's an AGPL derivative - }; - - stk = { - shortName = "stk"; - fullName = "Synthesis Tool Kit 4.3"; - url = "https://github.com/thestk/stk/blob/master/LICENSE"; - }; - - tsl = { - shortName = "TSL"; - fullName = "Timescale License Agreegment"; - url = "https://github.com/timescale/timescaledb/blob/main/tsl/LICENSE-TIMESCALE"; - unfree = true; - }; - - tcltk = { - spdxId = "TCL"; - fullName = "TCL/TK License"; - }; - - ucd = { - fullName = "Unicode Character Database License"; - url = "https://fedoraproject.org/wiki/Licensing:UCD"; - }; - - ufl = { - fullName = "Ubuntu Font License 1.0"; - url = "https://ubuntu.com/legal/font-licence"; - }; - - unfree = { - fullName = "Unfree"; - free = false; - }; - - unfreeRedistributable = { - fullName = "Unfree redistributable"; - free = false; - redistributable = true; - }; - - unfreeRedistributableFirmware = { - fullName = "Unfree redistributable firmware"; - redistributable = true; - # Note: we currently consider these "free" for inclusion in the - # channel and NixOS images. - }; - - unicode-dfs-2015 = { - spdxId = "Unicode-DFS-2015"; - fullName = "Unicode License Agreement - Data Files and Software (2015)"; - }; - - unicode-dfs-2016 = { - spdxId = "Unicode-DFS-2016"; - fullName = "Unicode License Agreement - Data Files and Software (2016)"; - }; - - unlicense = { - spdxId = "Unlicense"; - fullName = "The Unlicense"; - }; - - upl = { - fullName = "Universal Permissive License"; - url = "https://oss.oracle.com/licenses/upl/"; - }; - - vim = { - spdxId = "Vim"; - fullName = "Vim License"; - }; - - virtualbox-puel = { - fullName = "Oracle VM VirtualBox Extension Pack Personal Use and Evaluation License (PUEL)"; - url = "https://www.virtualbox.org/wiki/VirtualBox_PUEL"; - free = false; - }; - - vol-sl = { - fullName = "Volatility Software License, Version 1.0"; - url = "https://www.volatilityfoundation.org/license/vsl-v1.0"; - }; - - vsl10 = { - spdxId = "VSL-1.0"; - fullName = "Vovida Software License v1.0"; - }; - - watcom = { - spdxId = "Watcom-1.0"; - fullName = "Sybase Open Watcom Public License 1.0"; - }; - - w3c = { - spdxId = "W3C"; - fullName = "W3C Software Notice and License"; - }; - - wadalab = { - fullName = "Wadalab Font License"; - url = "https://fedoraproject.org/wiki/Licensing:Wadalab?rd=Licensing/Wadalab"; - }; - - wtfpl = { - spdxId = "WTFPL"; - fullName = "Do What The F*ck You Want To Public License"; - }; - - wxWindows = { - spdxId = "wxWindows"; - fullName = "wxWindows Library Licence, Version 3.1"; - }; - - x11 = { - spdxId = "X11"; - fullName = "X11 License"; - }; - - xfig = { - fullName = "xfig"; - url = "http://mcj.sourceforge.net/authors.html#xfig"; # https is broken - }; - - zlib = { - spdxId = "Zlib"; - fullName = "zlib License"; - }; - - zpl20 = { - spdxId = "ZPL-2.0"; - fullName = "Zope Public License 2.0"; - }; - - zpl21 = { - spdxId = "ZPL-2.1"; - fullName = "Zope Public License 2.1"; - }; -} // { - # TODO: remove legacy aliases - agpl3 = { - spdxId = "AGPL-3.0"; - fullName = "GNU Affero General Public License v3.0"; - deprecated = true; - }; - gpl2 = { - spdxId = "GPL-2.0"; - fullName = "GNU General Public License v2.0"; - deprecated = true; - }; - gpl3 = { - spdxId = "GPL-3.0"; - fullName = "GNU General Public License v3.0"; - deprecated = true; - }; - lgpl2 = { - spdxId = "LGPL-2.0"; - fullName = "GNU Library General Public License v2"; - deprecated = true; - }; - lgpl21 = { - spdxId = "LGPL-2.1"; - fullName = "GNU Lesser General Public License v2.1"; - deprecated = true; - }; - lgpl3 = { - spdxId = "LGPL-3.0"; - fullName = "GNU Lesser General Public License v3.0"; - deprecated = true; - }; -}) diff --git a/lib/lists.nix b/lib/lists.nix deleted file mode 100644 index 2186cd4a79f..00000000000 --- a/lib/lists.nix +++ /dev/null @@ -1,681 +0,0 @@ -# General list operations. - -{ lib }: -let - inherit (lib.strings) toInt; - inherit (lib.trivial) compare min; - inherit (lib.attrsets) mapAttrs; -in -rec { - - inherit (builtins) head tail length isList elemAt concatLists filter elem genList map; - - /* Create a list consisting of a single element. `singleton x` is - sometimes more convenient with respect to indentation than `[x]` - when x spans multiple lines. - - Type: singleton :: a -> [a] - - Example: - singleton "foo" - => [ "foo" ] - */ - singleton = x: [x]; - - /* Apply the function to each element in the list. Same as `map`, but arguments - flipped. - - Type: forEach :: [a] -> (a -> b) -> [b] - - Example: - forEach [ 1 2 ] (x: - toString x - ) - => [ "1" "2" ] - */ - forEach = xs: f: map f xs; - - /* “right fold” a binary function `op` between successive elements of - `list` with `nul` as the starting value, i.e., - `foldr op nul [x_1 x_2 ... x_n] == op x_1 (op x_2 ... (op x_n nul))`. - - Type: foldr :: (a -> b -> b) -> b -> [a] -> b - - Example: - concat = foldr (a: b: a + b) "z" - concat [ "a" "b" "c" ] - => "abcz" - # different types - strange = foldr (int: str: toString (int + 1) + str) "a" - strange [ 1 2 3 4 ] - => "2345a" - */ - foldr = op: nul: list: - let - len = length list; - fold' = n: - if n == len - then nul - else op (elemAt list n) (fold' (n + 1)); - in fold' 0; - - /* `fold` is an alias of `foldr` for historic reasons */ - # FIXME(Profpatsch): deprecate? - fold = foldr; - - - /* “left fold”, like `foldr`, but from the left: - `foldl op nul [x_1 x_2 ... x_n] == op (... (op (op nul x_1) x_2) ... x_n)`. - - Type: foldl :: (b -> a -> b) -> b -> [a] -> b - - Example: - lconcat = foldl (a: b: a + b) "z" - lconcat [ "a" "b" "c" ] - => "zabc" - # different types - lstrange = foldl (str: int: str + toString (int + 1)) "a" - lstrange [ 1 2 3 4 ] - => "a2345" - */ - foldl = op: nul: list: - let - foldl' = n: - if n == -1 - then nul - else op (foldl' (n - 1)) (elemAt list n); - in foldl' (length list - 1); - - /* Strict version of `foldl`. - - The difference is that evaluation is forced upon access. Usually used - with small whole results (in contrast with lazily-generated list or large - lists where only a part is consumed.) - - Type: foldl' :: (b -> a -> b) -> b -> [a] -> b - */ - foldl' = builtins.foldl' or foldl; - - /* Map with index starting from 0 - - Type: imap0 :: (int -> a -> b) -> [a] -> [b] - - Example: - imap0 (i: v: "${v}-${toString i}") ["a" "b"] - => [ "a-0" "b-1" ] - */ - imap0 = f: list: genList (n: f n (elemAt list n)) (length list); - - /* Map with index starting from 1 - - Type: imap1 :: (int -> a -> b) -> [a] -> [b] - - Example: - imap1 (i: v: "${v}-${toString i}") ["a" "b"] - => [ "a-1" "b-2" ] - */ - imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list); - - /* Map and concatenate the result. - - Type: concatMap :: (a -> [b]) -> [a] -> [b] - - Example: - concatMap (x: [x] ++ ["z"]) ["a" "b"] - => [ "a" "z" "b" "z" ] - */ - concatMap = builtins.concatMap or (f: list: concatLists (map f list)); - - /* Flatten the argument into a single list; that is, nested lists are - spliced into the top-level lists. - - Example: - flatten [1 [2 [3] 4] 5] - => [1 2 3 4 5] - flatten 1 - => [1] - */ - flatten = x: - if isList x - then concatMap (y: flatten y) x - else [x]; - - /* Remove elements equal to 'e' from a list. Useful for buildInputs. - - Type: remove :: a -> [a] -> [a] - - Example: - remove 3 [ 1 3 4 3 ] - => [ 1 4 ] - */ - remove = - # Element to remove from the list - e: filter (x: x != e); - - /* Find the sole element in the list matching the specified - predicate, returns `default` if no such element exists, or - `multiple` if there are multiple matching elements. - - Type: findSingle :: (a -> bool) -> a -> a -> [a] -> a - - Example: - findSingle (x: x == 3) "none" "multiple" [ 1 3 3 ] - => "multiple" - findSingle (x: x == 3) "none" "multiple" [ 1 3 ] - => 3 - findSingle (x: x == 3) "none" "multiple" [ 1 9 ] - => "none" - */ - findSingle = - # Predicate - pred: - # Default value to return if element was not found. - default: - # Default value to return if more than one element was found - multiple: - # Input list - list: - let found = filter pred list; len = length found; - in if len == 0 then default - else if len != 1 then multiple - else head found; - - /* Find the first element in the list matching the specified - predicate or return `default` if no such element exists. - - Type: findFirst :: (a -> bool) -> a -> [a] -> a - - Example: - findFirst (x: x > 3) 7 [ 1 6 4 ] - => 6 - findFirst (x: x > 9) 7 [ 1 6 4 ] - => 7 - */ - findFirst = - # Predicate - pred: - # Default value to return - default: - # Input list - list: - let found = filter pred list; - in if found == [] then default else head found; - - /* Return true if function `pred` returns true for at least one - element of `list`. - - Type: any :: (a -> bool) -> [a] -> bool - - Example: - any isString [ 1 "a" { } ] - => true - any isString [ 1 { } ] - => false - */ - any = builtins.any or (pred: foldr (x: y: if pred x then true else y) false); - - /* Return true if function `pred` returns true for all elements of - `list`. - - Type: all :: (a -> bool) -> [a] -> bool - - Example: - all (x: x < 3) [ 1 2 ] - => true - all (x: x < 3) [ 1 2 3 ] - => false - */ - all = builtins.all or (pred: foldr (x: y: if pred x then y else false) true); - - /* Count how many elements of `list` match the supplied predicate - function. - - Type: count :: (a -> bool) -> [a] -> int - - Example: - count (x: x == 3) [ 3 2 3 4 6 ] - => 2 - */ - count = - # Predicate - pred: foldl' (c: x: if pred x then c + 1 else c) 0; - - /* Return a singleton list or an empty list, depending on a boolean - value. Useful when building lists with optional elements - (e.g. `++ optional (system == "i686-linux") firefox`). - - Type: optional :: bool -> a -> [a] - - Example: - optional true "foo" - => [ "foo" ] - optional false "foo" - => [ ] - */ - optional = cond: elem: if cond then [elem] else []; - - /* Return a list or an empty list, depending on a boolean value. - - Type: optionals :: bool -> [a] -> [a] - - Example: - optionals true [ 2 3 ] - => [ 2 3 ] - optionals false [ 2 3 ] - => [ ] - */ - optionals = - # Condition - cond: - # List to return if condition is true - elems: if cond then elems else []; - - - /* If argument is a list, return it; else, wrap it in a singleton - list. If you're using this, you should almost certainly - reconsider if there isn't a more "well-typed" approach. - - Example: - toList [ 1 2 ] - => [ 1 2 ] - toList "hi" - => [ "hi "] - */ - toList = x: if isList x then x else [x]; - - /* Return a list of integers from `first` up to and including `last`. - - Type: range :: int -> int -> [int] - - Example: - range 2 4 - => [ 2 3 4 ] - range 3 2 - => [ ] - */ - range = - # First integer in the range - first: - # Last integer in the range - last: - if first > last then - [] - else - genList (n: first + n) (last - first + 1); - - /* Return a list with `n` copies of an element. - - Type: replicate :: int -> a -> [a] - - Example: - replicate 3 "a" - => [ "a" "a" "a" ] - replicate 2 true - => [ true true ] - */ - replicate = n: elem: genList (_: elem) n; - - /* Splits the elements of a list in two lists, `right` and - `wrong`, depending on the evaluation of a predicate. - - Type: (a -> bool) -> [a] -> { right :: [a]; wrong :: [a]; } - - Example: - partition (x: x > 2) [ 5 1 2 3 4 ] - => { right = [ 5 3 4 ]; wrong = [ 1 2 ]; } - */ - partition = builtins.partition or (pred: - foldr (h: t: - if pred h - then { right = [h] ++ t.right; wrong = t.wrong; } - else { right = t.right; wrong = [h] ++ t.wrong; } - ) { right = []; wrong = []; }); - - /* Splits the elements of a list into many lists, using the return value of a predicate. - Predicate should return a string which becomes keys of attrset `groupBy` returns. - - `groupBy'` allows to customise the combining function and initial value - - Example: - groupBy (x: boolToString (x > 2)) [ 5 1 2 3 4 ] - => { true = [ 5 3 4 ]; false = [ 1 2 ]; } - groupBy (x: x.name) [ {name = "icewm"; script = "icewm &";} - {name = "xfce"; script = "xfce4-session &";} - {name = "icewm"; script = "icewmbg &";} - {name = "mate"; script = "gnome-session &";} - ] - => { icewm = [ { name = "icewm"; script = "icewm &"; } - { name = "icewm"; script = "icewmbg &"; } ]; - mate = [ { name = "mate"; script = "gnome-session &"; } ]; - xfce = [ { name = "xfce"; script = "xfce4-session &"; } ]; - } - - groupBy' builtins.add 0 (x: boolToString (x > 2)) [ 5 1 2 3 4 ] - => { true = 12; false = 3; } - */ - groupBy' = op: nul: pred: lst: mapAttrs (name: foldl op nul) (groupBy pred lst); - - groupBy = builtins.groupBy or ( - pred: foldl' (r: e: - let - key = pred e; - in - r // { ${key} = (r.${key} or []) ++ [e]; } - ) {}); - - /* Merges two lists of the same size together. If the sizes aren't the same - the merging stops at the shortest. How both lists are merged is defined - by the first argument. - - Type: zipListsWith :: (a -> b -> c) -> [a] -> [b] -> [c] - - Example: - zipListsWith (a: b: a + b) ["h" "l"] ["e" "o"] - => ["he" "lo"] - */ - zipListsWith = - # Function to zip elements of both lists - f: - # First list - fst: - # Second list - snd: - genList - (n: f (elemAt fst n) (elemAt snd n)) (min (length fst) (length snd)); - - /* Merges two lists of the same size together. If the sizes aren't the same - the merging stops at the shortest. - - Type: zipLists :: [a] -> [b] -> [{ fst :: a; snd :: b; }] - - Example: - zipLists [ 1 2 ] [ "a" "b" ] - => [ { fst = 1; snd = "a"; } { fst = 2; snd = "b"; } ] - */ - zipLists = zipListsWith (fst: snd: { inherit fst snd; }); - - /* Reverse the order of the elements of a list. - - Type: reverseList :: [a] -> [a] - - Example: - - reverseList [ "b" "o" "j" ] - => [ "j" "o" "b" ] - */ - reverseList = xs: - let l = length xs; in genList (n: elemAt xs (l - n - 1)) l; - - /* Depth-First Search (DFS) for lists `list != []`. - - `before a b == true` means that `b` depends on `a` (there's an - edge from `b` to `a`). - - Example: - listDfs true hasPrefix [ "/home/user" "other" "/" "/home" ] - == { minimal = "/"; # minimal element - visited = [ "/home/user" ]; # seen elements (in reverse order) - rest = [ "/home" "other" ]; # everything else - } - - listDfs true hasPrefix [ "/home/user" "other" "/" "/home" "/" ] - == { cycle = "/"; # cycle encountered at this element - loops = [ "/" ]; # and continues to these elements - visited = [ "/" "/home/user" ]; # elements leading to the cycle (in reverse order) - rest = [ "/home" "other" ]; # everything else - - */ - listDfs = stopOnCycles: before: list: - let - dfs' = us: visited: rest: - let - c = filter (x: before x us) visited; - b = partition (x: before x us) rest; - in if stopOnCycles && (length c > 0) - then { cycle = us; loops = c; inherit visited rest; } - else if length b.right == 0 - then # nothing is before us - { minimal = us; inherit visited rest; } - else # grab the first one before us and continue - dfs' (head b.right) - ([ us ] ++ visited) - (tail b.right ++ b.wrong); - in dfs' (head list) [] (tail list); - - /* Sort a list based on a partial ordering using DFS. This - implementation is O(N^2), if your ordering is linear, use `sort` - instead. - - `before a b == true` means that `b` should be after `a` - in the result. - - Example: - - toposort hasPrefix [ "/home/user" "other" "/" "/home" ] - == { result = [ "/" "/home" "/home/user" "other" ]; } - - toposort hasPrefix [ "/home/user" "other" "/" "/home" "/" ] - == { cycle = [ "/home/user" "/" "/" ]; # path leading to a cycle - loops = [ "/" ]; } # loops back to these elements - - toposort hasPrefix [ "other" "/home/user" "/home" "/" ] - == { result = [ "other" "/" "/home" "/home/user" ]; } - - toposort (a: b: a < b) [ 3 2 1 ] == { result = [ 1 2 3 ]; } - - */ - toposort = before: list: - let - dfsthis = listDfs true before list; - toporest = toposort before (dfsthis.visited ++ dfsthis.rest); - in - if length list < 2 - then # finish - { result = list; } - else if dfsthis ? cycle - then # there's a cycle, starting from the current vertex, return it - { cycle = reverseList ([ dfsthis.cycle ] ++ dfsthis.visited); - inherit (dfsthis) loops; } - else if toporest ? cycle - then # there's a cycle somewhere else in the graph, return it - toporest - # Slow, but short. Can be made a bit faster with an explicit stack. - else # there are no cycles - { result = [ dfsthis.minimal ] ++ toporest.result; }; - - /* Sort a list based on a comparator function which compares two - elements and returns true if the first argument is strictly below - the second argument. The returned list is sorted in an increasing - order. The implementation does a quick-sort. - - Example: - sort (a: b: a < b) [ 5 3 7 ] - => [ 3 5 7 ] - */ - sort = builtins.sort or ( - strictLess: list: - let - len = length list; - first = head list; - pivot' = n: acc@{ left, right }: let el = elemAt list n; next = pivot' (n + 1); in - if n == len - then acc - else if strictLess first el - then next { inherit left; right = [ el ] ++ right; } - else - next { left = [ el ] ++ left; inherit right; }; - pivot = pivot' 1 { left = []; right = []; }; - in - if len < 2 then list - else (sort strictLess pivot.left) ++ [ first ] ++ (sort strictLess pivot.right)); - - /* Compare two lists element-by-element. - - Example: - compareLists compare [] [] - => 0 - compareLists compare [] [ "a" ] - => -1 - compareLists compare [ "a" ] [] - => 1 - compareLists compare [ "a" "b" ] [ "a" "c" ] - => -1 - */ - compareLists = cmp: a: b: - if a == [] - then if b == [] - then 0 - else -1 - else if b == [] - then 1 - else let rel = cmp (head a) (head b); in - if rel == 0 - then compareLists cmp (tail a) (tail b) - else rel; - - /* Sort list using "Natural sorting". - Numeric portions of strings are sorted in numeric order. - - Example: - naturalSort ["disk11" "disk8" "disk100" "disk9"] - => ["disk8" "disk9" "disk11" "disk100"] - naturalSort ["10.46.133.149" "10.5.16.62" "10.54.16.25"] - => ["10.5.16.62" "10.46.133.149" "10.54.16.25"] - naturalSort ["v0.2" "v0.15" "v0.0.9"] - => [ "v0.0.9" "v0.2" "v0.15" ] - */ - naturalSort = lst: - let - vectorise = s: map (x: if isList x then toInt (head x) else x) (builtins.split "(0|[1-9][0-9]*)" s); - prepared = map (x: [ (vectorise x) x ]) lst; # remember vectorised version for O(n) regex splits - less = a: b: (compareLists compare (head a) (head b)) < 0; - in - map (x: elemAt x 1) (sort less prepared); - - /* Return the first (at most) N elements of a list. - - Type: take :: int -> [a] -> [a] - - Example: - take 2 [ "a" "b" "c" "d" ] - => [ "a" "b" ] - take 2 [ ] - => [ ] - */ - take = - # Number of elements to take - count: sublist 0 count; - - /* Remove the first (at most) N elements of a list. - - Type: drop :: int -> [a] -> [a] - - Example: - drop 2 [ "a" "b" "c" "d" ] - => [ "c" "d" ] - drop 2 [ ] - => [ ] - */ - drop = - # Number of elements to drop - count: - # Input list - list: sublist count (length list) list; - - /* Return a list consisting of at most `count` elements of `list`, - starting at index `start`. - - Type: sublist :: int -> int -> [a] -> [a] - - Example: - sublist 1 3 [ "a" "b" "c" "d" "e" ] - => [ "b" "c" "d" ] - sublist 1 3 [ ] - => [ ] - */ - sublist = - # Index at which to start the sublist - start: - # Number of elements to take - count: - # Input list - list: - let len = length list; in - genList - (n: elemAt list (n + start)) - (if start >= len then 0 - else if start + count > len then len - start - else count); - - /* Return the last element of a list. - - This function throws an error if the list is empty. - - Type: last :: [a] -> a - - Example: - last [ 1 2 3 ] - => 3 - */ - last = list: - assert lib.assertMsg (list != []) "lists.last: list must not be empty!"; - elemAt list (length list - 1); - - /* Return all elements but the last. - - This function throws an error if the list is empty. - - Type: init :: [a] -> [a] - - Example: - init [ 1 2 3 ] - => [ 1 2 ] - */ - init = list: - assert lib.assertMsg (list != []) "lists.init: list must not be empty!"; - take (length list - 1) list; - - - /* Return the image of the cross product of some lists by a function. - - Example: - crossLists (x:y: "${toString x}${toString y}") [[1 2] [3 4]] - => [ "13" "14" "23" "24" ] - */ - crossLists = builtins.trace - "lib.crossLists is deprecated, use lib.cartesianProductOfSets instead" - (f: foldl (fs: args: concatMap (f: map f args) fs) [f]); - - - /* Remove duplicate elements from the list. O(n^2) complexity. - - Type: unique :: [a] -> [a] - - Example: - unique [ 3 2 3 4 ] - => [ 3 2 4 ] - */ - unique = foldl' (acc: e: if elem e acc then acc else acc ++ [ e ]) []; - - /* Intersects list 'e' and another list. O(nm) complexity. - - Example: - intersectLists [ 1 2 3 ] [ 6 3 2 ] - => [ 3 2 ] - */ - intersectLists = e: filter (x: elem x e); - - /* Subtracts list 'e' from another list. O(nm) complexity. - - Example: - subtractLists [ 3 2 ] [ 1 2 3 4 5 3 ] - => [ 1 4 5 ] - */ - subtractLists = e: filter (x: !(elem x e)); - - /* Test if two lists have no common element. - It should be slightly more efficient than (intersectLists a b == []) - */ - mutuallyExclusive = a: b: length a == 0 || !(any (x: elem x a) b); - -} diff --git a/lib/meta.nix b/lib/meta.nix deleted file mode 100644 index 5fd55c4e90d..00000000000 --- a/lib/meta.nix +++ /dev/null @@ -1,148 +0,0 @@ -/* Some functions for manipulating meta attributes, as well as the - name attribute. */ - -{ lib }: - -rec { - - - /* Add to or override the meta attributes of the given - derivation. - - Example: - addMetaAttrs {description = "Bla blah";} somePkg - */ - addMetaAttrs = newAttrs: drv: - drv // { meta = (drv.meta or {}) // newAttrs; }; - - - /* Disable Hydra builds of given derivation. - */ - dontDistribute = drv: addMetaAttrs { hydraPlatforms = []; } drv; - - - /* Change the symbolic name of a package for presentation purposes - (i.e., so that nix-env users can tell them apart). - */ - setName = name: drv: drv // {inherit name;}; - - - /* Like `setName`, but takes the previous name as an argument. - - Example: - updateName (oldName: oldName + "-experimental") somePkg - */ - updateName = updater: drv: drv // {name = updater (drv.name);}; - - - /* Append a suffix to the name of a package (before the version - part). */ - appendToName = suffix: updateName (name: - let x = builtins.parseDrvName name; in "${x.name}-${suffix}-${x.version}"); - - - /* Apply a function to each derivation and only to derivations in an attrset. - */ - mapDerivationAttrset = f: set: lib.mapAttrs (name: pkg: if lib.isDerivation pkg then (f pkg) else pkg) set; - - /* Set the nix-env priority of the package. - */ - setPrio = priority: addMetaAttrs { inherit priority; }; - - /* Decrease the nix-env priority of the package, i.e., other - versions/variants of the package will be preferred. - */ - lowPrio = setPrio 10; - - /* Apply lowPrio to an attrset with derivations - */ - lowPrioSet = set: mapDerivationAttrset lowPrio set; - - - /* Increase the nix-env priority of the package, i.e., this - version/variant of the package will be preferred. - */ - hiPrio = setPrio (-10); - - /* Apply hiPrio to an attrset with derivations - */ - hiPrioSet = set: mapDerivationAttrset hiPrio set; - - - /* Check to see if a platform is matched by the given `meta.platforms` - element. - - A `meta.platform` pattern is either - - 1. (legacy) a system string. - - 2. (modern) a pattern for the entire platform structure (see `lib.systems.inspect.platformPatterns`). - - 3. (modern) a pattern for the platform `parsed` field (see `lib.systems.inspect.patterns`). - - We can inject these into a pattern for the whole of a structured platform, - and then match that. - */ - platformMatch = platform: elem: let - pattern = - if builtins.isString elem - then { system = elem; } - else if elem?parsed - then elem - else { parsed = elem; }; - in lib.matchAttrs pattern platform; - - /* Check if a package is available on a given platform. - - A package is available on a platform if both - - 1. One of `meta.platforms` pattern matches the given - platform, or `meta.platforms` is not present. - - 2. None of `meta.badPlatforms` pattern matches the given platform. - */ - availableOn = platform: pkg: - ((!pkg?meta.platforms) || lib.any (platformMatch platform) pkg.meta.platforms) && - lib.all (elem: !platformMatch platform elem) (pkg.meta.badPlatforms or []); - - /* Get the corresponding attribute in lib.licenses - from the SPDX ID. - For SPDX IDs, see - https://spdx.org/licenses - - Type: - getLicenseFromSpdxId :: str -> AttrSet - - Example: - lib.getLicenseFromSpdxId "MIT" == lib.licenses.mit - => true - lib.getLicenseFromSpdxId "mIt" == lib.licenses.mit - => true - lib.getLicenseFromSpdxId "MY LICENSE" - => trace: warning: getLicenseFromSpdxId: No license matches the given SPDX ID: MY LICENSE - => { shortName = "MY LICENSE"; } - */ - getLicenseFromSpdxId = - let - spdxLicenses = lib.mapAttrs (id: ls: assert lib.length ls == 1; builtins.head ls) - (lib.groupBy (l: lib.toLower l.spdxId) (lib.filter (l: l ? spdxId) (lib.attrValues lib.licenses))); - in licstr: - spdxLicenses.${ lib.toLower licstr } or ( - lib.warn "getLicenseFromSpdxId: No license matches the given SPDX ID: ${licstr}" - { shortName = licstr; } - ); - - /* Get the path to the main program of a derivation with either - meta.mainProgram or pname or name - - Type: getExe :: derivation -> string - - Example: - getExe pkgs.hello - => "/nix/store/g124820p9hlv4lj8qplzxw1c44dxaw1k-hello-2.12/bin/hello" - getExe pkgs.mustache-go - => "/nix/store/am9ml4f4ywvivxnkiaqwr0hyxka1xjsf-mustache-go-1.3.0/bin/mustache" - */ - getExe = x: - "${lib.getBin x}/bin/${x.meta.mainProgram or (lib.getName x)}"; -} diff --git a/lib/minver.nix b/lib/minver.nix deleted file mode 100644 index 507d45bba4d..00000000000 --- a/lib/minver.nix +++ /dev/null @@ -1,2 +0,0 @@ -# Expose the minimum required version for evaluating Nixpkgs -"2.3" diff --git a/lib/modules.nix b/lib/modules.nix deleted file mode 100644 index 9c3e2085e37..00000000000 --- a/lib/modules.nix +++ /dev/null @@ -1,1221 +0,0 @@ -{ lib }: - -let - inherit (lib) - all - any - attrByPath - attrNames - catAttrs - concatLists - concatMap - concatStringsSep - elem - filter - foldl' - getAttrFromPath - head - id - imap1 - isAttrs - isBool - isFunction - isList - isPath - isString - length - mapAttrs - mapAttrsToList - mapAttrsRecursiveCond - min - optional - optionalAttrs - optionalString - recursiveUpdate - reverseList sort - setAttrByPath - types - warnIf - zipAttrsWith - ; - inherit (lib.options) - isOption - mkOption - showDefs - showFiles - showOption - unknownModule - ; - inherit (lib.strings) - isConvertibleWithToString - ; - - showDeclPrefix = loc: decl: prefix: - " - option(s) with prefix `${showOption (loc ++ [prefix])}' in module `${decl._file}'"; - showRawDecls = loc: decls: - concatStringsSep "\n" - (sort (a: b: a < b) - (concatMap - (decl: map - (showDeclPrefix loc decl) - (attrNames decl.options) - ) - decls - )); - -in - -rec { - - /* - Evaluate a set of modules. The result is a set with the attributes: - - ‘options’: The nested set of all option declarations, - - ‘config’: The nested set of all option values. - - ‘type’: A module system type representing the module set as a submodule, - to be extended by configuration from the containing module set. - - This is also available as the module argument ‘moduleType’. - - ‘extendModules’: A function similar to ‘evalModules’ but building on top - of the module set. Its arguments, ‘modules’ and ‘specialArgs’ are - added to the existing values. - - Using ‘extendModules’ a few times has no performance impact as long - as you only reference the final ‘options’ and ‘config’. - If you do reference multiple ‘config’ (or ‘options’) from before and - after ‘extendModules’, performance is the same as with multiple - ‘evalModules’ invocations, because the new modules' ability to - override existing configuration fundamentally requires a new - fixpoint to be constructed. - - This is also available as a module argument. - - ‘_module’: A portion of the configuration tree which is elided from - ‘config’. It contains some values that are mostly internal to the - module system implementation. - - !!! Please think twice before adding to this argument list! The more - that is specified here instead of in the modules themselves the harder - it is to transparently move a set of modules to be a submodule of another - config (as the proper arguments need to be replicated at each call to - evalModules) and the less declarative the module set is. */ - evalModules = evalModulesArgs@ - { modules - , prefix ? [] - , # This should only be used for special arguments that need to be evaluated - # when resolving module structure (like in imports). For everything else, - # there's _module.args. If specialArgs.modulesPath is defined it will be - # used as the base path for disabledModules. - specialArgs ? {} - , # This would be remove in the future, Prefer _module.args option instead. - args ? {} - , # This would be remove in the future, Prefer _module.check option instead. - check ? true - }: - let - withWarnings = x: - lib.warnIf (evalModulesArgs?args) "The args argument to evalModules is deprecated. Please set config._module.args instead." - lib.warnIf (evalModulesArgs?check) "The check argument to evalModules is deprecated. Please set config._module.check instead." - x; - - legacyModules = - optional (evalModulesArgs?args) { - config = { - _module.args = args; - }; - } - ++ optional (evalModulesArgs?check) { - config = { - _module.check = mkDefault check; - }; - }; - regularModules = modules ++ legacyModules; - - # This internal module declare internal options under the `_module' - # attribute. These options are fragile, as they are used by the - # module system to change the interpretation of modules. - # - # When extended with extendModules or moduleType, a fresh instance of - # this module is used, to avoid conflicts and allow chaining of - # extendModules. - internalModule = rec { - _file = "lib/modules.nix"; - - key = _file; - - options = { - _module.args = mkOption { - # Because things like `mkIf` are entirely useless for - # `_module.args` (because there's no way modules can check which - # arguments were passed), we'll use `lazyAttrsOf` which drops - # support for that, in turn it's lazy in its values. This means e.g. - # a `_module.args.pkgs = import (fetchTarball { ... }) {}` won't - # start a download when `pkgs` wasn't evaluated. - type = types.lazyAttrsOf types.raw; - # Only render documentation once at the root of the option tree, - # not for all individual submodules. - # Allow merging option decls to make this internal regardless. - ${if prefix == [] - then null # unset => visible - else "internal"} = true; - # TODO: hidden during the markdown transition to not expose downstream - # users of the docs infra to markdown if they're not ready for it. - # we don't make this visible conditionally because it can impact - # performance (https://github.com/NixOS/nixpkgs/pull/208407#issuecomment-1368246192) - visible = false; - # TODO: Change the type of this option to a submodule with a - # freeformType, so that individual arguments can be documented - # separately - description = lib.mdDoc '' - Additional arguments passed to each module in addition to ones - like `lib`, `config`, - and `pkgs`, `modulesPath`. - - This option is also available to all submodules. Submodules do not - inherit args from their parent module, nor do they provide args to - their parent module or sibling submodules. The sole exception to - this is the argument `name` which is provided by - parent modules to a submodule and contains the attribute name - the submodule is bound to, or a unique generated name if it is - not bound to an attribute. - - Some arguments are already passed by default, of which the - following *cannot* be changed with this option: - - {var}`lib`: The nixpkgs library. - - {var}`config`: The results of all options after merging the values from all modules together. - - {var}`options`: The options declared in all modules. - - {var}`specialArgs`: The `specialArgs` argument passed to `evalModules`. - - All attributes of {var}`specialArgs` - - Whereas option values can generally depend on other option values - thanks to laziness, this does not apply to `imports`, which - must be computed statically before anything else. - - For this reason, callers of the module system can provide `specialArgs` - which are available during import resolution. - - For NixOS, `specialArgs` includes - {var}`modulesPath`, which allows you to import - extra modules from the nixpkgs package tree without having to - somehow make the module aware of the location of the - `nixpkgs` or NixOS directories. - ``` - { modulesPath, ... }: { - imports = [ - (modulesPath + "/profiles/minimal.nix") - ]; - } - ``` - - For NixOS, the default value for this option includes at least this argument: - - {var}`pkgs`: The nixpkgs package set according to - the {option}`nixpkgs.pkgs` option. - ''; - }; - - _module.check = mkOption { - type = types.bool; - internal = true; - default = true; - description = lib.mdDoc "Whether to check whether all option definitions have matching declarations."; - }; - - _module.freeformType = mkOption { - type = types.nullOr types.optionType; - internal = true; - default = null; - description = lib.mdDoc '' - If set, merge all definitions that don't have an associated option - together using this type. The result then gets combined with the - values of all declared options to produce the final ` - config` value. - - If this is `null`, definitions without an option - will throw an error unless {option}`_module.check` is - turned off. - ''; - }; - - _module.specialArgs = mkOption { - readOnly = true; - internal = true; - description = lib.mdDoc '' - Externally provided module arguments that can't be modified from - within a configuration, but can be used in module imports. - ''; - }; - }; - - config = { - _module.args = { - inherit extendModules; - moduleType = type; - }; - _module.specialArgs = specialArgs; - }; - }; - - merged = - let collected = collectModules - (specialArgs.modulesPath or "") - (regularModules ++ [ internalModule ]) - ({ inherit lib options config specialArgs; } // specialArgs); - in mergeModules prefix (reverseList collected); - - options = merged.matchedOptions; - - config = - let - - # For definitions that have an associated option - declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options; - - # If freeformType is set, this is for definitions that don't have an associated option - freeformConfig = - let - defs = map (def: { - file = def.file; - value = setAttrByPath def.prefix def.value; - }) merged.unmatchedDefns; - in if defs == [] then {} - else declaredConfig._module.freeformType.merge prefix defs; - - in if declaredConfig._module.freeformType == null then declaredConfig - # Because all definitions that had an associated option ended in - # declaredConfig, freeformConfig can only contain the non-option - # paths, meaning recursiveUpdate will never override any value - else recursiveUpdate freeformConfig declaredConfig; - - checkUnmatched = - if config._module.check && config._module.freeformType == null && merged.unmatchedDefns != [] then - let - firstDef = head merged.unmatchedDefns; - baseMsg = - let - optText = showOption (prefix ++ firstDef.prefix); - defText = - builtins.addErrorContext - "while evaluating the error message for definitions for `${optText}', which is an option that does not exist" - (builtins.addErrorContext - "while evaluating a definition from `${firstDef.file}'" - ( showDefs [ firstDef ]) - ); - in - "The option `${optText}' does not exist. Definition values:${defText}"; - in - if attrNames options == [ "_module" ] - then - let - optionName = showOption prefix; - in - if optionName == "" - then throw '' - ${baseMsg} - - It seems as if you're trying to declare an option by placing it into `config' rather than `options'! - '' - else - throw '' - ${baseMsg} - - However there are no options defined in `${showOption prefix}'. Are you sure you've - declared your options properly? This can happen if you e.g. declared your options in `types.submodule' - under `config' rather than `options'. - '' - else throw baseMsg - else null; - - checked = builtins.seq checkUnmatched; - - extendModules = extendArgs@{ - modules ? [], - specialArgs ? {}, - prefix ? [], - }: - evalModules (evalModulesArgs // { - modules = regularModules ++ modules; - specialArgs = evalModulesArgs.specialArgs or {} // specialArgs; - prefix = extendArgs.prefix or evalModulesArgs.prefix or []; - }); - - type = lib.types.submoduleWith { - inherit modules specialArgs; - }; - - result = withWarnings { - options = checked options; - config = checked (removeAttrs config [ "_module" ]); - _module = checked (config._module); - inherit extendModules type; - }; - in result; - - # collectModules :: (modulesPath: String) -> (modules: [ Module ]) -> (args: Attrs) -> [ Module ] - # - # Collects all modules recursively through `import` statements, filtering out - # all modules in disabledModules. - collectModules = let - - # Like unifyModuleSyntax, but also imports paths and calls functions if necessary - loadModule = args: fallbackFile: fallbackKey: m: - if isFunction m || isAttrs m then - unifyModuleSyntax fallbackFile fallbackKey (applyModuleArgsIfFunction fallbackKey m args) - else if isList m then - let defs = [{ file = fallbackFile; value = m; }]; in - throw "Module imports can't be nested lists. Perhaps you meant to remove one level of lists? Definitions: ${showDefs defs}" - else unifyModuleSyntax (toString m) (toString m) (applyModuleArgsIfFunction (toString m) (import m) args); - - /* - Collects all modules recursively into the form - - { - disabled = [ ]; - # All modules of the main module list - modules = [ - { - key = ; - module = ; - # All modules imported by the module for key1 - modules = [ - { - key = ; - module = ; - # All modules imported by the module for key1-1 - modules = [ ... ]; - } - ... - ]; - } - ... - ]; - } - */ - collectStructuredModules = - let - collectResults = modules: { - disabled = concatLists (catAttrs "disabled" modules); - inherit modules; - }; - in parentFile: parentKey: initialModules: args: collectResults (imap1 (n: x: - let - module = loadModule args parentFile "${parentKey}:anon-${toString n}" x; - collectedImports = collectStructuredModules module._file module.key module.imports args; - in { - key = module.key; - module = module; - modules = collectedImports.modules; - disabled = (if module.disabledModules != [] then [{ file = module._file; disabled = module.disabledModules; }] else []) ++ collectedImports.disabled; - }) initialModules); - - # filterModules :: String -> { disabled, modules } -> [ Module ] - # - # Filters a structure as emitted by collectStructuredModules by removing all disabled - # modules recursively. It returns the final list of unique-by-key modules - filterModules = modulesPath: { disabled, modules }: - let - moduleKey = file: m: - if isString m - then - if builtins.substring 0 1 m == "/" - then m - else toString modulesPath + "/" + m - - else if isConvertibleWithToString m - then - if m?key && m.key != toString m - then - throw "Module `${file}` contains a disabledModules item that is an attribute set that can be converted to a string (${toString m}) but also has a `.key` attribute (${m.key}) with a different value. This makes it ambiguous which module should be disabled." - else - toString m - - else if m?key - then - m.key - - else if isAttrs m - then throw "Module `${file}` contains a disabledModules item that is an attribute set, presumably a module, that does not have a `key` attribute. This means that the module system doesn't have any means to identify the module that should be disabled. Make sure that you've put the correct value in disabledModules: a string path relative to modulesPath, a path value, or an attribute set with a `key` attribute." - else throw "Each disabledModules item must be a path, string, or a attribute set with a key attribute, or a value supported by toString. However, one of the disabledModules items in `${toString file}` is none of that, but is of type ${builtins.typeOf m}."; - - disabledKeys = concatMap ({ file, disabled }: map (moduleKey file) disabled) disabled; - keyFilter = filter (attrs: ! elem attrs.key disabledKeys); - in map (attrs: attrs.module) (builtins.genericClosure { - startSet = keyFilter modules; - operator = attrs: keyFilter attrs.modules; - }); - - in modulesPath: initialModules: args: - filterModules modulesPath (collectStructuredModules unknownModule "" initialModules args); - - /* Wrap a module with a default location for reporting errors. */ - setDefaultModuleLocation = file: m: - { _file = file; imports = [ m ]; }; - - /* Massage a module into canonical form, that is, a set consisting - of ‘options’, ‘config’ and ‘imports’ attributes. */ - unifyModuleSyntax = file: key: m: - let - addMeta = config: if m ? meta - then mkMerge [ config { meta = m.meta; } ] - else config; - addFreeformType = config: if m ? freeformType - then mkMerge [ config { _module.freeformType = m.freeformType; } ] - else config; - in - if m ? config || m ? options then - let badAttrs = removeAttrs m ["_file" "key" "disabledModules" "imports" "options" "config" "meta" "freeformType"]; in - if badAttrs != {} then - throw "Module `${key}' has an unsupported attribute `${head (attrNames badAttrs)}'. This is caused by introducing a top-level `config' or `options' attribute. Add configuration attributes immediately on the top level instead, or move all of them (namely: ${toString (attrNames badAttrs)}) into the explicit `config' attribute." - else - { _file = toString m._file or file; - key = toString m.key or key; - disabledModules = m.disabledModules or []; - imports = m.imports or []; - options = m.options or {}; - config = addFreeformType (addMeta (m.config or {})); - } - else - # shorthand syntax - lib.throwIfNot (isAttrs m) "module ${file} (${key}) does not look like a module." - { _file = toString m._file or file; - key = toString m.key or key; - disabledModules = m.disabledModules or []; - imports = m.require or [] ++ m.imports or []; - options = {}; - config = addFreeformType (removeAttrs m ["_file" "key" "disabledModules" "require" "imports" "freeformType"]); - }; - - applyModuleArgsIfFunction = key: f: args@{ config, options, lib, ... }: if isFunction f then - let - # Module arguments are resolved in a strict manner when attribute set - # deconstruction is used. As the arguments are now defined with the - # config._module.args option, the strictness used on the attribute - # set argument would cause an infinite loop, if the result of the - # option is given as argument. - # - # To work-around the strictness issue on the deconstruction of the - # attributes set argument, we create a new attribute set which is - # constructed to satisfy the expected set of attributes. Thus calling - # a module will resolve strictly the attributes used as argument but - # not their values. The values are forwarding the result of the - # evaluation of the option. - context = name: ''while evaluating the module argument `${name}' in "${key}":''; - extraArgs = builtins.mapAttrs (name: _: - builtins.addErrorContext (context name) - (args.${name} or config._module.args.${name}) - ) (lib.functionArgs f); - - # Note: we append in the opposite order such that we can add an error - # context on the explicit arguments of "args" too. This update - # operator is used to make the "args@{ ... }: with args.lib;" notation - # works. - in f (args // extraArgs) - else - f; - - /* Merge a list of modules. This will recurse over the option - declarations in all modules, combining them into a single set. - At the same time, for each option declaration, it will merge the - corresponding option definitions in all machines, returning them - in the ‘value’ attribute of each option. - - This returns a set like - { - # A recursive set of options along with their final values - matchedOptions = { - foo = { _type = "option"; value = "option value of foo"; ... }; - bar.baz = { _type = "option"; value = "option value of bar.baz"; ... }; - ... - }; - # A list of definitions that weren't matched by any option - unmatchedDefns = [ - { file = "file.nix"; prefix = [ "qux" ]; value = "qux"; } - ... - ]; - } - */ - mergeModules = prefix: modules: - mergeModules' prefix modules - (concatMap (m: map (config: { file = m._file; inherit config; }) (pushDownProperties m.config)) modules); - - mergeModules' = prefix: options: configs: - let - /* byName is like foldAttrs, but will look for attributes to merge in the - specified attribute name. - - byName "foo" (module: value: ["module.hidden=${module.hidden},value=${value}"]) - [ - { - hidden="baz"; - foo={qux="bar"; gla="flop";}; - } - { - hidden="fli"; - foo={qux="gne"; gli="flip";}; - } - ] - ===> - { - gla = [ "module.hidden=baz,value=flop" ]; - gli = [ "module.hidden=fli,value=flip" ]; - qux = [ "module.hidden=baz,value=bar" "module.hidden=fli,value=gne" ]; - } - */ - byName = attr: f: modules: - zipAttrsWith (n: concatLists) - (map (module: let subtree = module.${attr}; in - if !(builtins.isAttrs subtree) then - throw (if attr == "config" then '' - You're trying to define a value of type `${builtins.typeOf subtree}' - rather than an attribute set for the option - `${builtins.concatStringsSep "." prefix}'! - - This usually happens if `${builtins.concatStringsSep "." prefix}' has option - definitions inside that are not matched. Please check how to properly define - this option by e.g. referring to `man 5 configuration.nix'! - '' else '' - An option declaration for `${builtins.concatStringsSep "." prefix}' has type - `${builtins.typeOf subtree}' rather than an attribute set. - Did you mean to define this outside of `options'? - '') - else - mapAttrs (n: f module) subtree - ) modules); - # an attrset 'name' => list of submodules that declare ‘name’. - declsByName = byName "options" (module: option: - [{ inherit (module) _file; options = option; }] - ) options; - # an attrset 'name' => list of submodules that define ‘name’. - defnsByName = byName "config" (module: value: - map (config: { inherit (module) file; inherit config; }) (pushDownProperties value) - ) configs; - # extract the definitions for each loc - defnsByName' = byName "config" (module: value: - [{ inherit (module) file; inherit value; }] - ) configs; - - # Convert an option tree decl to a submodule option decl - optionTreeToOption = decl: - if isOption decl.options - then decl - else decl // { - options = mkOption { - type = types.submoduleWith { - modules = [ { options = decl.options; } ]; - # `null` is not intended for use by modules. It is an internal - # value that means "whatever the user has declared elsewhere". - # This might become obsolete with https://github.com/NixOS/nixpkgs/issues/162398 - shorthandOnlyDefinesConfig = null; - }; - }; - }; - - resultsByName = mapAttrs (name: decls: - # We're descending into attribute ‘name’. - let - loc = prefix ++ [name]; - defns = defnsByName.${name} or []; - defns' = defnsByName'.${name} or []; - optionDecls = filter (m: isOption m.options) decls; - in - if length optionDecls == length decls then - let opt = fixupOptionType loc (mergeOptionDecls loc decls); - in { - matchedOptions = evalOptionValue loc opt defns'; - unmatchedDefns = []; - } - else if optionDecls != [] then - if all (x: x.options.type.name == "submodule") optionDecls - # Raw options can only be merged into submodules. Merging into - # attrsets might be nice, but ambiguous. Suppose we have - # attrset as a `attrsOf submodule`. User declares option - # attrset.foo.bar, this could mean: - # a. option `bar` is only available in `attrset.foo` - # b. option `foo.bar` is available in all `attrset.*` - # c. reject and require "" as a reminder that it behaves like (b). - # d. magically combine (a) and (c). - # All of the above are merely syntax sugar though. - then - let opt = fixupOptionType loc (mergeOptionDecls loc (map optionTreeToOption decls)); - in { - matchedOptions = evalOptionValue loc opt defns'; - unmatchedDefns = []; - } - else - let - nonOptions = filter (m: !isOption m.options) decls; - in - throw "The option `${showOption loc}' in module `${(lib.head optionDecls)._file}' would be a parent of the following options, but its type `${(lib.head optionDecls).options.type.description or ""}' does not support nested options.\n${ - showRawDecls loc nonOptions - }" - else - mergeModules' loc decls defns) declsByName; - - matchedOptions = mapAttrs (n: v: v.matchedOptions) resultsByName; - - # an attrset 'name' => list of unmatched definitions for 'name' - unmatchedDefnsByName = - # Propagate all unmatched definitions from nested option sets - mapAttrs (n: v: v.unmatchedDefns) resultsByName - # Plus the definitions for the current prefix that don't have a matching option - // removeAttrs defnsByName' (attrNames matchedOptions); - in { - inherit matchedOptions; - - # Transforms unmatchedDefnsByName into a list of definitions - unmatchedDefns = - if configs == [] - then - # When no config values exist, there can be no unmatched config, so - # we short circuit and avoid evaluating more _options_ than necessary. - [] - else - concatLists (mapAttrsToList (name: defs: - map (def: def // { - # Set this so we know when the definition first left unmatched territory - prefix = [name] ++ (def.prefix or []); - }) defs - ) unmatchedDefnsByName); - }; - - /* Merge multiple option declarations into a single declaration. In - general, there should be only one declaration of each option. - The exception is the ‘options’ attribute, which specifies - sub-options. These can be specified multiple times to allow one - module to add sub-options to an option declared somewhere else - (e.g. multiple modules define sub-options for ‘fileSystems’). - - 'loc' is the list of attribute names where the option is located. - - 'opts' is a list of modules. Each module has an options attribute which - correspond to the definition of 'loc' in 'opt.file'. */ - mergeOptionDecls = - loc: opts: - foldl' (res: opt: - let t = res.type; - t' = opt.options.type; - mergedType = t.typeMerge t'.functor; - typesMergeable = mergedType != null; - typeSet = if (bothHave "type") && typesMergeable - then { type = mergedType; } - else {}; - bothHave = k: opt.options ? ${k} && res ? ${k}; - in - if bothHave "default" || - bothHave "example" || - bothHave "description" || - bothHave "apply" || - (bothHave "type" && (! typesMergeable)) - then - throw "The option `${showOption loc}' in `${opt._file}' is already declared in ${showFiles res.declarations}." - else - let - getSubModules = opt.options.type.getSubModules or null; - submodules = - if getSubModules != null then map (setDefaultModuleLocation opt._file) getSubModules ++ res.options - else res.options; - in opt.options // res // - { declarations = res.declarations ++ [opt._file]; - options = submodules; - } // typeSet - ) { inherit loc; declarations = []; options = []; } opts; - - /* Merge all the definitions of an option to produce the final - config value. */ - evalOptionValue = loc: opt: defs: - let - # Add in the default value for this option, if any. - defs' = - (optional (opt ? default) - { file = head opt.declarations; value = mkOptionDefault opt.default; }) ++ defs; - - # Handle properties, check types, and merge everything together. - res = - if opt.readOnly or false && length defs' > 1 then - let - # For a better error message, evaluate all readOnly definitions as - # if they were the only definition. - separateDefs = map (def: def // { - value = (mergeDefinitions loc opt.type [ def ]).mergedValue; - }) defs'; - in throw "The option `${showOption loc}' is read-only, but it's set multiple times. Definition values:${showDefs separateDefs}" - else - mergeDefinitions loc opt.type defs'; - - # Apply the 'apply' function to the merged value. This allows options to - # yield a value computed from the definitions - value = if opt ? apply then opt.apply res.mergedValue else res.mergedValue; - - warnDeprecation = - warnIf (opt.type.deprecationMessage != null) - "The type `types.${opt.type.name}' of option `${showOption loc}' defined in ${showFiles opt.declarations} is deprecated. ${opt.type.deprecationMessage}"; - - in warnDeprecation opt // - { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value; - inherit (res.defsFinal') highestPrio; - definitions = map (def: def.value) res.defsFinal; - files = map (def: def.file) res.defsFinal; - definitionsWithLocations = res.defsFinal; - inherit (res) isDefined; - # This allows options to be correctly displayed using `${options.path.to.it}` - __toString = _: showOption loc; - }; - - # Merge definitions of a value of a given type. - mergeDefinitions = loc: type: defs: rec { - defsFinal' = - let - # Process mkMerge and mkIf properties. - defs' = concatMap (m: - map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value)) - ) defs; - - # Process mkOverride properties. - defs'' = filterOverrides' defs'; - - # Sort mkOrder properties. - defs''' = - # Avoid sorting if we don't have to. - if any (def: def.value._type or "" == "order") defs''.values - then sortProperties defs''.values - else defs''.values; - in { - values = defs'''; - inherit (defs'') highestPrio; - }; - defsFinal = defsFinal'.values; - - # Type-check the remaining definitions, and merge them. Or throw if no definitions. - mergedValue = - if isDefined then - if all (def: type.check def.value) defsFinal then type.merge loc defsFinal - else let allInvalid = filter (def: ! type.check def.value) defsFinal; - in throw "A definition for option `${showOption loc}' is not of type `${type.description}'. Definition values:${showDefs allInvalid}" - else - # (nixos-option detects this specific error message and gives it special - # handling. If changed here, please change it there too.) - throw "The option `${showOption loc}' is used but not defined."; - - isDefined = defsFinal != []; - - optionalValue = - if isDefined then { value = mergedValue; } - else {}; - }; - - /* Given a config set, expand mkMerge properties, and push down the - other properties into the children. The result is a list of - config sets that do not have properties at top-level. For - example, - - mkMerge [ { boot = set1; } (mkIf cond { boot = set2; services = set3; }) ] - - is transformed into - - [ { boot = set1; } { boot = mkIf cond set2; services = mkIf cond set3; } ]. - - This transform is the critical step that allows mkIf conditions - to refer to the full configuration without creating an infinite - recursion. - */ - pushDownProperties = cfg: - if cfg._type or "" == "merge" then - concatMap pushDownProperties cfg.contents - else if cfg._type or "" == "if" then - map (mapAttrs (n: v: mkIf cfg.condition v)) (pushDownProperties cfg.content) - else if cfg._type or "" == "override" then - map (mapAttrs (n: v: mkOverride cfg.priority v)) (pushDownProperties cfg.content) - else # FIXME: handle mkOrder? - [ cfg ]; - - /* Given a config value, expand mkMerge properties, and discharge - any mkIf conditions. That is, this is the place where mkIf - conditions are actually evaluated. The result is a list of - config values. For example, ‘mkIf false x’ yields ‘[]’, - ‘mkIf true x’ yields ‘[x]’, and - - mkMerge [ 1 (mkIf true 2) (mkIf true (mkIf false 3)) ] - - yields ‘[ 1 2 ]’. - */ - dischargeProperties = def: - if def._type or "" == "merge" then - concatMap dischargeProperties def.contents - else if def._type or "" == "if" then - if isBool def.condition then - if def.condition then - dischargeProperties def.content - else - [ ] - else - throw "‘mkIf’ called with a non-Boolean condition" - else - [ def ]; - - /* Given a list of config values, process the mkOverride properties, - that is, return the values that have the highest (that is, - numerically lowest) priority, and strip the mkOverride - properties. For example, - - [ { file = "/1"; value = mkOverride 10 "a"; } - { file = "/2"; value = mkOverride 20 "b"; } - { file = "/3"; value = "z"; } - { file = "/4"; value = mkOverride 10 "d"; } - ] - - yields - - [ { file = "/1"; value = "a"; } - { file = "/4"; value = "d"; } - ] - - Note that "z" has the default priority 100. - */ - filterOverrides = defs: (filterOverrides' defs).values; - - filterOverrides' = defs: - let - getPrio = def: if def.value._type or "" == "override" then def.value.priority else defaultOverridePriority; - highestPrio = foldl' (prio: def: min (getPrio def) prio) 9999 defs; - strip = def: if def.value._type or "" == "override" then def // { value = def.value.content; } else def; - in { - values = concatMap (def: if getPrio def == highestPrio then [(strip def)] else []) defs; - inherit highestPrio; - }; - - /* Sort a list of properties. The sort priority of a property is - defaultOrderPriority by default, but can be overridden by wrapping the property - using mkOrder. */ - sortProperties = defs: - let - strip = def: - if def.value._type or "" == "order" - then def // { value = def.value.content; inherit (def.value) priority; } - else def; - defs' = map strip defs; - compare = a: b: (a.priority or defaultOrderPriority) < (b.priority or defaultOrderPriority); - in sort compare defs'; - - # This calls substSubModules, whose entire purpose is only to ensure that - # option declarations in submodules have accurate position information. - # TODO: Merge this into mergeOptionDecls - fixupOptionType = loc: opt: - if opt.type.getSubModules or null == null - then opt // { type = opt.type or types.unspecified; } - else opt // { type = opt.type.substSubModules opt.options; options = []; }; - - - /* Properties. */ - - mkIf = condition: content: - { _type = "if"; - inherit condition content; - }; - - mkAssert = assertion: message: content: - mkIf - (if assertion then true else throw "\nFailed assertion: ${message}") - content; - - mkMerge = contents: - { _type = "merge"; - inherit contents; - }; - - mkOverride = priority: content: - { _type = "override"; - inherit priority content; - }; - - mkOptionDefault = mkOverride 1500; # priority of option defaults - mkDefault = mkOverride 1000; # used in config sections of non-user modules to set a default - defaultOverridePriority = 100; - mkImageMediaOverride = mkOverride 60; # image media profiles can be derived by inclusion into host config, hence needing to override host config, but do allow user to mkForce - mkForce = mkOverride 50; - mkVMOverride = mkOverride 10; # used by ‘nixos-rebuild build-vm’ - - defaultPriority = lib.warnIf (lib.isInOldestRelease 2305) "lib.modules.defaultPriority is deprecated, please use lib.modules.defaultOverridePriority instead." defaultOverridePriority; - - mkFixStrictness = lib.warn "lib.mkFixStrictness has no effect and will be removed. It returns its argument unmodified, so you can just remove any calls." id; - - mkOrder = priority: content: - { _type = "order"; - inherit priority content; - }; - - mkBefore = mkOrder 500; - defaultOrderPriority = 1000; - mkAfter = mkOrder 1500; - - # Convenient property used to transfer all definitions and their - # properties from one option to another. This property is useful for - # renaming options, and also for including properties from another module - # system, including sub-modules. - # - # { config, options, ... }: - # - # { - # # 'bar' might not always be defined in the current module-set. - # config.foo.enable = mkAliasDefinitions (options.bar.enable or {}); - # - # # 'barbaz' has to be defined in the current module-set. - # config.foobar.paths = mkAliasDefinitions options.barbaz.paths; - # } - # - # Note, this is different than taking the value of the option and using it - # as a definition, as the new definition will not keep the mkOverride / - # mkDefault properties of the previous option. - # - mkAliasDefinitions = mkAliasAndWrapDefinitions id; - mkAliasAndWrapDefinitions = wrap: option: - mkAliasIfDef option (wrap (mkMerge option.definitions)); - - # Similar to mkAliasAndWrapDefinitions but copies over the priority from the - # option as well. - # - # If a priority is not set, it assumes a priority of defaultOverridePriority. - mkAliasAndWrapDefsWithPriority = wrap: option: - let - prio = option.highestPrio or defaultOverridePriority; - defsWithPrio = map (mkOverride prio) option.definitions; - in mkAliasIfDef option (wrap (mkMerge defsWithPrio)); - - mkAliasIfDef = option: - mkIf (isOption option && option.isDefined); - - /* Compatibility. */ - fixMergeModules = modules: args: evalModules { inherit modules args; check = false; }; - - - /* Return a module that causes a warning to be shown if the - specified option is defined. For example, - - mkRemovedOptionModule [ "boot" "loader" "grub" "bootDevice" ] "" - - causes a assertion if the user defines boot.loader.grub.bootDevice. - - replacementInstructions is a string that provides instructions on - how to achieve the same functionality without the removed option, - or alternatively a reasoning why the functionality is not needed. - replacementInstructions SHOULD be provided! - */ - mkRemovedOptionModule = optionName: replacementInstructions: - { options, ... }: - { options = setAttrByPath optionName (mkOption { - visible = false; - apply = x: throw "The option `${showOption optionName}' can no longer be used since it's been removed. ${replacementInstructions}"; - }); - config.assertions = - let opt = getAttrFromPath optionName options; in [{ - assertion = !opt.isDefined; - message = '' - The option definition `${showOption optionName}' in ${showFiles opt.files} no longer has any effect; please remove it. - ${replacementInstructions} - ''; - }]; - }; - - /* Return a module that causes a warning to be shown if the - specified "from" option is defined; the defined value is however - forwarded to the "to" option. This can be used to rename options - while providing backward compatibility. For example, - - mkRenamedOptionModule [ "boot" "copyKernels" ] [ "boot" "loader" "grub" "copyKernels" ] - - forwards any definitions of boot.copyKernels to - boot.loader.grub.copyKernels while printing a warning. - - This also copies over the priority from the aliased option to the - non-aliased option. - */ - mkRenamedOptionModule = from: to: doRename { - inherit from to; - visible = false; - warn = true; - use = builtins.trace "Obsolete option `${showOption from}' is used. It was renamed to `${showOption to}'."; - }; - - mkRenamedOptionModuleWith = { - /* Old option path as list of strings. */ - from, - /* New option path as list of strings. */ - to, - - /* - Release number of the first release that contains the rename, ignoring backports. - Set it to the upcoming release, matching the nixpkgs/.version file. - */ - sinceRelease, - - }: doRename { - inherit from to; - visible = false; - warn = lib.isInOldestRelease sinceRelease; - use = lib.warnIf (lib.isInOldestRelease sinceRelease) - "Obsolete option `${showOption from}' is used. It was renamed to `${showOption to}'."; - }; - - /* Return a module that causes a warning to be shown if any of the "from" - option is defined; the defined values can be used in the "mergeFn" to set - the "to" value. - This function can be used to merge multiple options into one that has a - different type. - - "mergeFn" takes the module "config" as a parameter and must return a value - of "to" option type. - - mkMergedOptionModule - [ [ "a" "b" "c" ] - [ "d" "e" "f" ] ] - [ "x" "y" "z" ] - (config: - let value = p: getAttrFromPath p config; - in - if (value [ "a" "b" "c" ]) == true then "foo" - else if (value [ "d" "e" "f" ]) == true then "bar" - else "baz") - - - options.a.b.c is a removed boolean option - - options.d.e.f is a removed boolean option - - options.x.y.z is a new str option that combines a.b.c and d.e.f - functionality - - This show a warning if any a.b.c or d.e.f is set, and set the value of - x.y.z to the result of the merge function - */ - mkMergedOptionModule = from: to: mergeFn: - { config, options, ... }: - { - options = foldl' recursiveUpdate {} (map (path: setAttrByPath path (mkOption { - visible = false; - # To use the value in mergeFn without triggering errors - default = "_mkMergedOptionModule"; - })) from); - - config = { - warnings = filter (x: x != "") (map (f: - let val = getAttrFromPath f config; - opt = getAttrFromPath f options; - in - optionalString - (val != "_mkMergedOptionModule") - "The option `${showOption f}' defined in ${showFiles opt.files} has been changed to `${showOption to}' that has a different type. Please read `${showOption to}' documentation and update your configuration accordingly." - ) from); - } // setAttrByPath to (mkMerge - (optional - (any (f: (getAttrFromPath f config) != "_mkMergedOptionModule") from) - (mergeFn config))); - }; - - /* Single "from" version of mkMergedOptionModule. - Return a module that causes a warning to be shown if the "from" option is - defined; the defined value can be used in the "mergeFn" to set the "to" - value. - This function can be used to change an option into another that has a - different type. - - "mergeFn" takes the module "config" as a parameter and must return a value of - "to" option type. - - mkChangedOptionModule [ "a" "b" "c" ] [ "x" "y" "z" ] - (config: - let value = getAttrFromPath [ "a" "b" "c" ] config; - in - if value > 100 then "high" - else "normal") - - - options.a.b.c is a removed int option - - options.x.y.z is a new str option that supersedes a.b.c - - This show a warning if a.b.c is set, and set the value of x.y.z to the - result of the change function - */ - mkChangedOptionModule = from: to: changeFn: - mkMergedOptionModule [ from ] to changeFn; - - /* Like ‘mkRenamedOptionModule’, but doesn't show a warning. */ - mkAliasOptionModule = from: to: doRename { - inherit from to; - visible = true; - warn = false; - use = id; - }; - - /* Transitional version of mkAliasOptionModule that uses MD docs. */ - mkAliasOptionModuleMD = from: to: doRename { - inherit from to; - visible = true; - warn = false; - use = id; - markdown = true; - }; - - /* mkDerivedConfig : Option a -> (a -> Definition b) -> Definition b - - Create config definitions with the same priority as the definition of another option. - This should be used for option definitions where one option sets the value of another as a convenience. - For instance a config file could be set with a `text` or `source` option, where text translates to a `source` - value using `mkDerivedConfig options.text (pkgs.writeText "filename.conf")`. - - It takes care of setting the right priority using `mkOverride`. - */ - # TODO: make the module system error message include information about `opt` in - # error messages about conflicts. E.g. introduce a variation of `mkOverride` which - # adds extra location context to the definition object. This will allow context to be added - # to all messages that report option locations "this value was derived from - # which was defined in ". It can provide a trace of options that contributed - # to definitions. - mkDerivedConfig = opt: f: - mkOverride - (opt.highestPrio or defaultOverridePriority) - (f opt.value); - - doRename = { from, to, visible, warn, use, withPriority ? true, markdown ? false }: - { config, options, ... }: - let - fromOpt = getAttrFromPath from options; - toOf = attrByPath to - (abort "Renaming error: option `${showOption to}' does not exist."); - toType = let opt = attrByPath to {} options; in opt.type or (types.submodule {}); - in - { - options = setAttrByPath from (mkOption { - inherit visible; - description = if markdown - then lib.mdDoc "Alias of {option}`${showOption to}`." - else "Alias of ."; - apply = x: use (toOf config); - } // optionalAttrs (toType != null) { - type = toType; - }); - config = mkMerge [ - (optionalAttrs (options ? warnings) { - warnings = optional (warn && fromOpt.isDefined) - "The option `${showOption from}' defined in ${showFiles fromOpt.files} has been renamed to `${showOption to}'."; - }) - (if withPriority - then mkAliasAndWrapDefsWithPriority (setAttrByPath to) fromOpt - else mkAliasAndWrapDefinitions (setAttrByPath to) fromOpt) - ]; - }; - - /* Use this function to import a JSON file as NixOS configuration. - - modules.importJSON :: path -> attrs - */ - importJSON = file: { - _file = file; - config = lib.importJSON file; - }; - - /* Use this function to import a TOML file as NixOS configuration. - - modules.importTOML :: path -> attrs - */ - importTOML = file: { - _file = file; - config = lib.importTOML file; - }; -} diff --git a/lib/options.nix b/lib/options.nix deleted file mode 100644 index 4780a56fc1c..00000000000 --- a/lib/options.nix +++ /dev/null @@ -1,425 +0,0 @@ -# Nixpkgs/NixOS option handling. -{ lib }: - -let - inherit (lib) - all - collect - concatLists - concatMap - concatMapStringsSep - filter - foldl' - head - tail - isAttrs - isBool - isDerivation - isFunction - isInt - isList - isString - length - mapAttrs - optional - optionals - take - ; - inherit (lib.attrsets) - attrByPath - optionalAttrs - ; - inherit (lib.strings) - concatMapStrings - concatStringsSep - ; - inherit (lib.types) - mkOptionType - ; - inherit (lib.lists) - last - ; - prioritySuggestion = '' - Use `lib.mkForce value` or `lib.mkDefault value` to change the priority on any of these definitions. - ''; -in -rec { - - /* Returns true when the given argument is an option - - Type: isOption :: a -> bool - - Example: - isOption 1 // => false - isOption (mkOption {}) // => true - */ - isOption = lib.isType "option"; - - /* Creates an Option attribute set. mkOption accepts an attribute set with the following keys: - - All keys default to `null` when not given. - - Example: - mkOption { } // => { _type = "option"; } - mkOption { default = "foo"; } // => { _type = "option"; default = "foo"; } - */ - mkOption = - { - # Default value used when no definition is given in the configuration. - default ? null, - # Textual representation of the default, for the manual. - defaultText ? null, - # Example value used in the manual. - example ? null, - # String describing the option. - description ? null, - # Related packages used in the manual (see `genRelatedPackages` in ../nixos/lib/make-options-doc/default.nix). - relatedPackages ? null, - # Option type, providing type-checking and value merging. - type ? null, - # Function that converts the option value to something else. - apply ? null, - # Whether the option is for NixOS developers only. - internal ? null, - # Whether the option shows up in the manual. Default: true. Use false to hide the option and any sub-options from submodules. Use "shallow" to hide only sub-options. - visible ? null, - # Whether the option can be set only once - readOnly ? null, - } @ attrs: - attrs // { _type = "option"; }; - - /* Creates an Option attribute set for a boolean value option i.e an - option to be toggled on or off: - - Example: - mkEnableOption "foo" - => { _type = "option"; default = false; description = "Whether to enable foo."; example = true; type = { ... }; } - */ - mkEnableOption = - # Name for the created option - name: mkOption { - default = false; - example = true; - description = - if name ? _type && name._type == "mdDoc" - then lib.mdDoc "Whether to enable ${name.text}." - else "Whether to enable ${name}."; - type = lib.types.bool; - }; - - /* Creates an Option attribute set for an option that specifies the - package a module should use for some purpose. - - The package is specified in the third argument under `default` as a list of strings - representing its attribute path in nixpkgs (or another package set). - Because of this, you need to pass nixpkgs itself (or a subset) as the first argument. - - The second argument may be either a string or a list of strings. - It provides the display name of the package in the description of the generated option - (using only the last element if the passed value is a list) - and serves as the fallback value for the `default` argument. - - To include extra information in the description, pass `extraDescription` to - append arbitrary text to the generated description. - You can also pass an `example` value, either a literal string or an attribute path. - - The default argument can be omitted if the provided name is - an attribute of pkgs (if name is a string) or a - valid attribute path in pkgs (if name is a list). - - If you wish to explicitly provide no default, pass `null` as `default`. - - Type: mkPackageOption :: pkgs -> (string|[string]) -> { default? :: [string], example? :: null|string|[string], extraDescription? :: string } -> option - - Example: - mkPackageOption pkgs "hello" { } - => { _type = "option"; default = «derivation /nix/store/3r2vg51hlxj3cx5vscp0vkv60bqxkaq0-hello-2.10.drv»; defaultText = { ... }; description = "The hello package to use."; type = { ... }; } - - Example: - mkPackageOption pkgs "GHC" { - default = [ "ghc" ]; - example = "pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])"; - } - => { _type = "option"; default = «derivation /nix/store/jxx55cxsjrf8kyh3fp2ya17q99w7541r-ghc-8.10.7.drv»; defaultText = { ... }; description = "The GHC package to use."; example = { ... }; type = { ... }; } - - Example: - mkPackageOption pkgs [ "python39Packages" "pytorch" ] { - extraDescription = "This is an example and doesn't actually do anything."; - } - => { _type = "option"; default = «derivation /nix/store/gvqgsnc4fif9whvwd9ppa568yxbkmvk8-python3.9-pytorch-1.10.2.drv»; defaultText = { ... }; description = "The pytorch package to use. This is an example and doesn't actually do anything."; type = { ... }; } - - */ - mkPackageOption = - # Package set (a specific version of nixpkgs or a subset) - pkgs: - # Name for the package, shown in option description - name: - { - # The attribute path where the default package is located (may be omitted) - default ? name, - # A string or an attribute path to use as an example (may be omitted) - example ? null, - # Additional text to include in the option description (may be omitted) - extraDescription ? "", - }: - let - name' = if isList name then last name else name; - default' = if isList default then default else [ default ]; - defaultPath = concatStringsSep "." default'; - defaultValue = attrByPath default' - (throw "${defaultPath} cannot be found in pkgs") pkgs; - in mkOption { - defaultText = literalExpression ("pkgs." + defaultPath); - type = lib.types.package; - description = "The ${name'} package to use." - + (if extraDescription == "" then "" else " ") + extraDescription; - ${if default != null then "default" else null} = defaultValue; - ${if example != null then "example" else null} = literalExpression - (if isList example then "pkgs." + concatStringsSep "." example else example); - }; - - /* Like mkPackageOption, but emit an mdDoc description instead of DocBook. */ - mkPackageOptionMD = pkgs: name: extra: - let option = mkPackageOption pkgs name extra; - in option // { description = lib.mdDoc option.description; }; - - /* This option accepts anything, but it does not produce any result. - - This is useful for sharing a module across different module sets - without having to implement similar features as long as the - values of the options are not accessed. */ - mkSinkUndeclaredOptions = attrs: mkOption ({ - internal = true; - visible = false; - default = false; - description = "Sink for option definitions."; - type = mkOptionType { - name = "sink"; - check = x: true; - merge = loc: defs: false; - }; - apply = x: throw "Option value is not readable because the option is not declared."; - } // attrs); - - mergeDefaultOption = loc: defs: - let list = getValues defs; in - if length list == 1 then head list - else if all isFunction list then x: mergeDefaultOption loc (map (f: f x) list) - else if all isList list then concatLists list - else if all isAttrs list then foldl' lib.mergeAttrs {} list - else if all isBool list then foldl' lib.or false list - else if all isString list then lib.concatStrings list - else if all isInt list && all (x: x == head list) list then head list - else throw "Cannot merge definitions of `${showOption loc}'. Definition values:${showDefs defs}"; - - mergeOneOption = mergeUniqueOption { message = ""; }; - - mergeUniqueOption = { message }: loc: defs: - if length defs == 1 - then (head defs).value - else assert length defs > 1; - throw "The option `${showOption loc}' is defined multiple times while it's expected to be unique.\n${message}\nDefinition values:${showDefs defs}\n${prioritySuggestion}"; - - /* "Merge" option definitions by checking that they all have the same value. */ - mergeEqualOption = loc: defs: - if defs == [] then abort "This case should never happen." - # Return early if we only have one element - # This also makes it work for functions, because the foldl' below would try - # to compare the first element with itself, which is false for functions - else if length defs == 1 then (head defs).value - else (foldl' (first: def: - if def.value != first.value then - throw "The option `${showOption loc}' has conflicting definition values:${showDefs [ first def ]}\n${prioritySuggestion}" - else - first) (head defs) (tail defs)).value; - - /* Extracts values of all "value" keys of the given list. - - Type: getValues :: [ { value :: a; } ] -> [a] - - Example: - getValues [ { value = 1; } { value = 2; } ] // => [ 1 2 ] - getValues [ ] // => [ ] - */ - getValues = map (x: x.value); - - /* Extracts values of all "file" keys of the given list - - Type: getFiles :: [ { file :: a; } ] -> [a] - - Example: - getFiles [ { file = "file1"; } { file = "file2"; } ] // => [ "file1" "file2" ] - getFiles [ ] // => [ ] - */ - getFiles = map (x: x.file); - - # Generate documentation template from the list of option declaration like - # the set generated with filterOptionSets. - optionAttrSetToDocList = optionAttrSetToDocList' []; - - optionAttrSetToDocList' = _: options: - concatMap (opt: - let - name = showOption opt.loc; - docOption = rec { - loc = opt.loc; - inherit name; - description = opt.description or null; - declarations = filter (x: x != unknownModule) opt.declarations; - internal = opt.internal or false; - visible = - if (opt?visible && opt.visible == "shallow") - then true - else opt.visible or true; - readOnly = opt.readOnly or false; - type = opt.type.description or "unspecified"; - } - // optionalAttrs (opt ? example) { - example = - builtins.addErrorContext "while evaluating the example of option `${name}`" ( - renderOptionValue opt.example - ); - } - // optionalAttrs (opt ? default) { - default = - builtins.addErrorContext "while evaluating the default value of option `${name}`" ( - renderOptionValue (opt.defaultText or opt.default) - ); - } - // optionalAttrs (opt ? relatedPackages && opt.relatedPackages != null) { inherit (opt) relatedPackages; }; - - subOptions = - let ss = opt.type.getSubOptions opt.loc; - in if ss != {} then optionAttrSetToDocList' opt.loc ss else []; - subOptionsVisible = docOption.visible && opt.visible or null != "shallow"; - in - # To find infinite recursion in NixOS option docs: - # builtins.trace opt.loc - [ docOption ] ++ optionals subOptionsVisible subOptions) (collect isOption options); - - - /* This function recursively removes all derivation attributes from - `x` except for the `name` attribute. - - This is to make the generation of `options.xml` much more - efficient: the XML representation of derivations is very large - (on the order of megabytes) and is not actually used by the - manual generator. - - This function was made obsolete by renderOptionValue and is kept for - compatibility with out-of-tree code. - */ - scrubOptionValue = x: - if isDerivation x then - { type = "derivation"; drvPath = x.name; outPath = x.name; name = x.name; } - else if isList x then map scrubOptionValue x - else if isAttrs x then mapAttrs (n: v: scrubOptionValue v) (removeAttrs x ["_args"]) - else x; - - - /* Ensures that the given option value (default or example) is a `_type`d string - by rendering Nix values to `literalExpression`s. - */ - renderOptionValue = v: - if v ? _type && v ? text then v - else literalExpression (lib.generators.toPretty { - multiline = true; - allowPrettyValues = true; - } v); - - - /* For use in the `defaultText` and `example` option attributes. Causes the - given string to be rendered verbatim in the documentation as Nix code. This - is necessary for complex values, e.g. functions, or values that depend on - other values or packages. - */ - literalExpression = text: - if ! isString text then throw "literalExpression expects a string." - else { _type = "literalExpression"; inherit text; }; - - literalExample = lib.warn "literalExample is deprecated, use literalExpression instead, or use literalDocBook for a non-Nix description." literalExpression; - - - /* For use in the `defaultText` and `example` option attributes. Causes the - given DocBook text to be inserted verbatim in the documentation, for when - a `literalExpression` would be too hard to read. - */ - literalDocBook = text: - if ! isString text then throw "literalDocBook expects a string." - else - lib.warnIf (lib.isInOldestRelease 2211) - "literalDocBook is deprecated, use literalMD instead" - { _type = "literalDocBook"; inherit text; }; - - /* Transition marker for documentation that's already migrated to markdown - syntax. - */ - mdDoc = text: - if ! isString text then throw "mdDoc expects a string." - else { _type = "mdDoc"; inherit text; }; - - /* For use in the `defaultText` and `example` option attributes. Causes the - given MD text to be inserted verbatim in the documentation, for when - a `literalExpression` would be too hard to read. - */ - literalMD = text: - if ! isString text then throw "literalMD expects a string." - else { _type = "literalMD"; inherit text; }; - - # Helper functions. - - /* Convert an option, described as a list of the option parts to a - human-readable version. - - Example: - (showOption ["foo" "bar" "baz"]) == "foo.bar.baz" - (showOption ["foo" "bar.baz" "tux"]) == "foo.\"bar.baz\".tux" - (showOption ["windowManager" "2bwm" "enable"]) == "windowManager.\"2bwm\".enable" - - Placeholders will not be quoted as they are not actual values: - (showOption ["foo" "*" "bar"]) == "foo.*.bar" - (showOption ["foo" "" "bar"]) == "foo..bar" - */ - showOption = parts: let - escapeOptionPart = part: - let - # We assume that these are "special values" and not real configuration data. - # If it is real configuration data, it is rendered incorrectly. - specialIdentifiers = [ - "" # attrsOf (submodule {}) - "*" # listOf (submodule {}) - "" # functionTo - ]; - in if builtins.elem part specialIdentifiers - then part - else lib.strings.escapeNixIdentifier part; - in (concatStringsSep ".") (map escapeOptionPart parts); - showFiles = files: concatStringsSep " and " (map (f: "`${f}'") files); - - showDefs = defs: concatMapStrings (def: - let - # Pretty print the value for display, if successful - prettyEval = builtins.tryEval - (lib.generators.toPretty { } - (lib.generators.withRecursion { depthLimit = 10; throwOnDepthLimit = false; } def.value)); - # Split it into its lines - lines = filter (v: ! isList v) (builtins.split "\n" prettyEval.value); - # Only display the first 5 lines, and indent them for better visibility - value = concatStringsSep "\n " (take 5 lines ++ optional (length lines > 5) "..."); - result = - # Don't print any value if evaluating the value strictly fails - if ! prettyEval.success then "" - # Put it on a new line if it consists of multiple - else if length lines > 1 then ":\n " + value - else ": " + value; - in "\n- In `${def.file}'${result}" - ) defs; - - showOptionWithDefLocs = opt: '' - ${showOption opt.loc}, with values defined in: - ${concatMapStringsSep "\n" (defFile: " - ${defFile}") opt.files} - ''; - - unknownModule = ""; - -} diff --git a/lib/path/README.md b/lib/path/README.md deleted file mode 100644 index 87e552d120d..00000000000 --- a/lib/path/README.md +++ /dev/null @@ -1,196 +0,0 @@ -# Path library - -This document explains why the `lib.path` library is designed the way it is. - -The purpose of this library is to process [filesystem paths]. It does not read files from the filesystem. -It exists to support the native Nix [path value type] with extra functionality. - -[filesystem paths]: https://en.m.wikipedia.org/wiki/Path_(computing) -[path value type]: https://nixos.org/manual/nix/stable/language/values.html#type-path - -As an extension of the path value type, it inherits the same intended use cases and limitations: -- Only use paths to access files at evaluation time, such as the local project source. -- Paths cannot point to derivations, so they are unfit to represent dependencies. -- A path implicitly imports the referenced files into the Nix store when interpolated to a string. Therefore paths are not suitable to access files at build- or run-time, as you risk importing the path from the evaluation system instead. - -Overall, this library works with two types of paths: -- Absolute paths are represented with the Nix [path value type]. Nix automatically normalises these paths. -- Subpaths are represented with the [string value type] since path value types don't support relative paths. This library normalises these paths as safely as possible. Absolute paths in strings are not supported. - - A subpath refers to a specific file or directory within an absolute base directory. - It is a stricter form of a relative path, notably [without support for `..` components][parents] since those could escape the base directory. - -[string value type]: https://nixos.org/manual/nix/stable/language/values.html#type-string - -This library is designed to be as safe and intuitive as possible, throwing errors when operations are attempted that would produce surprising results, and giving the expected result otherwise. - -This library is designed to work well as a dependency for the `lib.filesystem` and `lib.sources` library components. Contrary to these library components, `lib.path` does not read any paths from the filesystem. - -This library makes only these assumptions about paths and no others: -- `dirOf path` returns the path to the parent directory of `path`, unless `path` is the filesystem root, in which case `path` is returned. - - There can be multiple filesystem roots: `p == dirOf p` and `q == dirOf q` does not imply `p == q`. - - While there's only a single filesystem root in stable Nix, the [lazy trees feature](https://github.com/NixOS/nix/pull/6530) introduces [additional filesystem roots](https://github.com/NixOS/nix/pull/6530#discussion_r1041442173). -- `path + ("/" + string)` returns the path to the `string` subdirectory in `path`. - - If `string` contains no `/` characters, then `dirOf (path + ("/" + string)) == path`. - - If `string` contains no `/` characters, then `baseNameOf (path + ("/" + string)) == string`. -- `path1 == path2` returns `true` only if `path1` points to the same filesystem path as `path2`. - -Notably we do not make the assumption that we can turn paths into strings using `toString path`. - -## Design decisions - -Each subsection here contains a decision along with arguments and counter-arguments for (+) and against (-) that decision. - -### Leading dots for relative paths -[leading-dots]: #leading-dots-for-relative-paths - -Observing: Since subpaths are a form of relative paths, they can have a leading `./` to indicate it being a relative path, this is generally not necessary for tools though. - -Considering: Paths should be as explicit, consistent and unambiguous as possible. - -Decision: Returned subpaths should always have a leading `./`. - -
-Arguments - -- (+) In shells, just running `foo` as a command wouldn't execute the file `foo`, whereas `./foo` would execute the file. In contrast, `foo/bar` does execute that file without the need for `./`. This can lead to confusion about when a `./` needs to be prefixed. If a `./` is always included, this becomes a non-issue. This effectively then means that paths don't overlap with command names. -- (+) Prepending with `./` makes the subpaths always valid as relative Nix path expressions. -- (+) Using paths in command line arguments could give problems if not escaped properly, e.g. if a path was `--version`. This is not a problem with `./--version`. This effectively then means that paths don't overlap with GNU-style command line options. -- (-) `./` is not required to resolve relative paths, resolution always has an implicit `./` as prefix. -- (-) It's less noisy without the `./`, e.g. in error messages. - - (+) But similarly, it could be confusing whether something was even a path. - e.g. `foo` could be anything, but `./foo` is more clearly a path. -- (+) Makes it more uniform with absolute paths (those always start with `/`). - - (-) That is not relevant for practical purposes. -- (+) `find` also outputs results with `./`. - - (-) But only if you give it an argument of `.`. If you give it the argument `some-directory`, it won't prefix that. -- (-) `realpath --relative-to` doesn't prefix relative paths with `./`. - - (+) There is no need to return the same result as `realpath`. - -
- -### Representation of the current directory -[curdir]: #representation-of-the-current-directory - -Observing: The subpath that produces the base directory can be represented with `.` or `./` or `./.`. - -Considering: Paths should be as consistent and unambiguous as possible. - -Decision: It should be `./.`. - -
-Arguments - -- (+) `./` would be inconsistent with [the decision to not persist trailing slashes][trailing-slashes]. -- (-) `.` is how `realpath` normalises paths. -- (+) `.` can be interpreted as a shell command (it's a builtin for sourcing files in `bash` and `zsh`). -- (+) `.` would be the only path without a `/`. It could not be used as a Nix path expression, since those require at least one `/` to be parsed as such. -- (-) `./.` is rather long. - - (-) We don't require users to type this though, as it's only output by the library. - As inputs all three variants are supported for subpaths (and we can't do anything about absolute paths) -- (-) `builtins.dirOf "foo" == "."`, so `.` would be consistent with that. -- (+) `./.` is consistent with the [decision to have leading `./`][leading-dots]. -- (+) `./.` is a valid Nix path expression, although this property does not hold for every relative path or subpath. - -
- -### Subpath representation -[relrepr]: #subpath-representation - -Observing: Subpaths such as `foo/bar` can be represented in various ways: -- string: `"foo/bar"` -- list with all the components: `[ "foo" "bar" ]` -- attribute set: `{ type = "relative-path"; components = [ "foo" "bar" ]; }` - -Considering: Paths should be as safe to use as possible. We should generate string outputs in the library and not encourage users to do that themselves. - -Decision: Paths are represented as strings. - -
-Arguments - -- (+) It's simpler for the users of the library. One doesn't have to convert a path a string before it can be used. - - (+) Naively converting the list representation to a string with `concatStringsSep "/"` would break for `[]`, requiring library users to be more careful. -- (+) It doesn't encourage people to do their own path processing and instead use the library. - With a list representation it would seem easy to just use `lib.lists.init` to get the parent directory, but then it breaks for `.`, which would be represented as `[ ]`. -- (+) `+` is convenient and doesn't work on lists and attribute sets. - - (-) Shouldn't use `+` anyways, we export safer functions for path manipulation. - -
- -### Parent directory -[parents]: #parent-directory - -Observing: Relative paths can have `..` components, which refer to the parent directory. - -Considering: Paths should be as safe and unambiguous as possible. - -Decision: `..` path components in string paths are not supported, neither as inputs nor as outputs. Hence, string paths are called subpaths, rather than relative paths. - -
-Arguments - -- (+) If we wanted relative paths to behave according to the "physical" interpretation (as a directory tree with relations between nodes), it would require resolving symlinks, since e.g. `foo/..` would not be the same as `.` if `foo` is a symlink. - - (-) The "logical" interpretation is also valid (treating paths as a sequence of names), and is used by some software. It is simpler, and not using symlinks at all is safer. - - (+) Mixing both models can lead to surprises. - - (+) We can't resolve symlinks without filesystem access. - - (+) Nix also doesn't support reading symlinks at evaluation time. - - (-) We could just not handle such cases, e.g. `equals "foo" "foo/bar/.. == false`. The paths are different, we don't need to check whether the paths point to the same thing. - - (+) Assume we said `relativeTo /foo /bar == "../bar"`. If this is used like `/bar/../foo` in the end, and `bar` turns out to be a symlink to somewhere else, this won't be accurate. - - (-) We could decide to not support such ambiguous operations, or mark them as such, e.g. the normal `relativeTo` will error on such a case, but there could be `extendedRelativeTo` supporting that. -- (-) `..` are a part of paths, a path library should therefore support it. - - (+) If we can convincingly argue that all such use cases are better done e.g. with runtime tools, the library not supporting it can nudge people towards using those. -- (-) We could allow "..", but only in the prefix. - - (+) Then we'd have to throw an error for doing `append /some/path "../foo"`, making it non-composable. - - (+) The same is for returning paths with `..`: `relativeTo /foo /bar => "../bar"` would produce a non-composable path. -- (+) We argue that `..` is not needed at the Nix evaluation level, since we'd always start evaluation from the project root and don't go up from there. - - (+) `..` is supported in Nix paths, turning them into absolute paths. - - (-) This is ambiguous in the presence of symlinks. -- (+) If you need `..` for building or runtime, you can use build-/run-time tooling to create those (e.g. `realpath` with `--relative-to`), or use absolute paths instead. - This also gives you the ability to correctly handle symlinks. - -
- -### Trailing slashes -[trailing-slashes]: #trailing-slashes - -Observing: Subpaths can contain trailing slashes, like `foo/`, indicating that the path points to a directory and not a file. - -Considering: Paths should be as consistent as possible, there should only be a single normalisation for the same path. - -Decision: All functions remove trailing slashes in their results. - -
-Arguments - -- (+) It allows normalisations to be unique, in that there's only a single normalisation for the same path. If trailing slashes were preserved, both `foo/bar` and `foo/bar/` would be valid but different normalisations for the same path. -- Comparison to other frameworks to figure out the least surprising behavior: - - (+) Nix itself doesn't support trailing slashes when parsing and doesn't preserve them when appending paths. - - (-) [Rust's std::path](https://doc.rust-lang.org/std/path/index.html) does preserve them during [construction](https://doc.rust-lang.org/std/path/struct.Path.html#method.new). - - (+) Doesn't preserve them when returning individual [components](https://doc.rust-lang.org/std/path/struct.Path.html#method.components). - - (+) Doesn't preserve them when [canonicalizing](https://doc.rust-lang.org/std/path/struct.Path.html#method.canonicalize). - - (+) [Python 3's pathlib](https://docs.python.org/3/library/pathlib.html#module-pathlib) doesn't preserve them during [construction](https://docs.python.org/3/library/pathlib.html#pathlib.PurePath). - - Notably it represents the individual components as a list internally. - - (-) [Haskell's filepath](https://hackage.haskell.org/package/filepath-1.4.100.0) has [explicit support](https://hackage.haskell.org/package/filepath-1.4.100.0/docs/System-FilePath.html#g:6) for handling trailing slashes. - - (-) Does preserve them for [normalisation](https://hackage.haskell.org/package/filepath-1.4.100.0/docs/System-FilePath.html#v:normalise). - - (-) [NodeJS's Path library](https://nodejs.org/api/path.html) preserves trailing slashes for [normalisation](https://nodejs.org/api/path.html#pathnormalizepath). - - (+) For [parsing a path](https://nodejs.org/api/path.html#pathparsepath) into its significant elements, trailing slashes are not preserved. -- (+) Nix's builtin function `dirOf` gives an unexpected result for paths with trailing slashes: `dirOf "foo/bar/" == "foo/bar"`. - Inconsistently, `baseNameOf` works correctly though: `baseNameOf "foo/bar/" == "bar"`. - - (-) We are writing a path library to improve handling of paths though, so we shouldn't use these functions and discourage their use. -- (-) Unexpected result when normalising intermediate paths, like `relative.normalise ("foo" + "/") + "bar" == "foobar"`. - - (+) This is not a practical use case though. - - (+) Don't use `+` to append paths, this library has a `join` function for that. - - (-) Users might use `+` out of habit though. -- (+) The `realpath` command also removes trailing slashes. -- (+) Even with a trailing slash, the path is the same, it's only an indication that it's a directory. - -
- -## Other implementations and references - -- [Rust](https://doc.rust-lang.org/std/path/struct.Path.html) -- [Python](https://docs.python.org/3/library/pathlib.html) -- [Haskell](https://hackage.haskell.org/package/filepath-1.4.100.0/docs/System-FilePath.html) -- [Nodejs](https://nodejs.org/api/path.html) -- [POSIX.1-2017](https://pubs.opengroup.org/onlinepubs/9699919799/nframe.html) diff --git a/lib/path/default.nix b/lib/path/default.nix deleted file mode 100644 index a4a08668ae6..00000000000 --- a/lib/path/default.nix +++ /dev/null @@ -1,351 +0,0 @@ -# Functions for working with paths, see ./path.md -{ lib }: -let - - inherit (builtins) - isString - isPath - split - match - ; - - inherit (lib.lists) - length - head - last - genList - elemAt - all - concatMap - foldl' - ; - - inherit (lib.strings) - concatStringsSep - substring - ; - - inherit (lib.asserts) - assertMsg - ; - - inherit (lib.path.subpath) - isValid - ; - - # Return the reason why a subpath is invalid, or `null` if it's valid - subpathInvalidReason = value: - if ! isString value then - "The given value is of type ${builtins.typeOf value}, but a string was expected" - else if value == "" then - "The given string is empty" - else if substring 0 1 value == "/" then - "The given string \"${value}\" starts with a `/`, representing an absolute path" - # We don't support ".." components, see ./path.md#parent-directory - else if match "(.*/)?\\.\\.(/.*)?" value != null then - "The given string \"${value}\" contains a `..` component, which is not allowed in subpaths" - else null; - - # Split and normalise a relative path string into its components. - # Error for ".." components and doesn't include "." components - splitRelPath = path: - let - # Split the string into its parts using regex for efficiency. This regex - # matches patterns like "/", "/./", "/././", with arbitrarily many "/"s - # together. These are the main special cases: - # - Leading "./" gets split into a leading "." part - # - Trailing "/." or "/" get split into a trailing "." or "" - # part respectively - # - # These are the only cases where "." and "" parts can occur - parts = split "/+(\\./+)*" path; - - # `split` creates a list of 2 * k + 1 elements, containing the k + - # 1 parts, interleaved with k matches where k is the number of - # (non-overlapping) matches. This calculation here gets the number of parts - # back from the list length - # floor( (2 * k + 1) / 2 ) + 1 == floor( k + 1/2 ) + 1 == k + 1 - partCount = length parts / 2 + 1; - - # To assemble the final list of components we want to: - # - Skip a potential leading ".", normalising "./foo" to "foo" - # - Skip a potential trailing "." or "", normalising "foo/" and "foo/." to - # "foo". See ./path.md#trailing-slashes - skipStart = if head parts == "." then 1 else 0; - skipEnd = if last parts == "." || last parts == "" then 1 else 0; - - # We can now know the length of the result by removing the number of - # skipped parts from the total number - componentCount = partCount - skipEnd - skipStart; - - in - # Special case of a single "." path component. Such a case leaves a - # componentCount of -1 due to the skipStart/skipEnd not verifying that - # they don't refer to the same character - if path == "." then [] - - # Generate the result list directly. This is more efficient than a - # combination of `filter`, `init` and `tail`, because here we don't - # allocate any intermediate lists - else genList (index: - # To get to the element we need to add the number of parts we skip and - # multiply by two due to the interleaved layout of `parts` - elemAt parts ((skipStart + index) * 2) - ) componentCount; - - # Join relative path components together - joinRelPath = components: - # Always return relative paths with `./` as a prefix (./path.md#leading-dots-for-relative-paths) - "./" + - # An empty string is not a valid relative path, so we need to return a `.` when we have no components - (if components == [] then "." else concatStringsSep "/" components); - -in /* No rec! Add dependencies on this file at the top. */ { - - /* Append a subpath string to a path. - - Like `path + ("/" + string)` but safer, because it errors instead of returning potentially surprising results. - More specifically, it checks that the first argument is a [path value type](https://nixos.org/manual/nix/stable/language/values.html#type-path"), - and that the second argument is a valid subpath string (see `lib.path.subpath.isValid`). - - Type: - append :: Path -> String -> Path - - Example: - append /foo "bar/baz" - => /foo/bar/baz - - # subpaths don't need to be normalised - append /foo "./bar//baz/./" - => /foo/bar/baz - - # can append to root directory - append /. "foo/bar" - => /foo/bar - - # first argument needs to be a path value type - append "/foo" "bar" - => - - # second argument needs to be a valid subpath string - append /foo /bar - => - append /foo "" - => - append /foo "/bar" - => - append /foo "../bar" - => - */ - append = - # The absolute path to append to - path: - # The subpath string to append - subpath: - assert assertMsg (isPath path) '' - lib.path.append: The first argument is of type ${builtins.typeOf path}, but a path was expected''; - assert assertMsg (isValid subpath) '' - lib.path.append: Second argument is not a valid subpath string: - ${subpathInvalidReason subpath}''; - path + ("/" + subpath); - - /* Whether a value is a valid subpath string. - - - The value is a string - - - The string is not empty - - - The string doesn't start with a `/` - - - The string doesn't contain any `..` path components - - Type: - subpath.isValid :: String -> Bool - - Example: - # Not a string - subpath.isValid null - => false - - # Empty string - subpath.isValid "" - => false - - # Absolute path - subpath.isValid "/foo" - => false - - # Contains a `..` path component - subpath.isValid "../foo" - => false - - # Valid subpath - subpath.isValid "foo/bar" - => true - - # Doesn't need to be normalised - subpath.isValid "./foo//bar/" - => true - */ - subpath.isValid = - # The value to check - value: - subpathInvalidReason value == null; - - - /* Join subpath strings together using `/`, returning a normalised subpath string. - - Like `concatStringsSep "/"` but safer, specifically: - - - All elements must be valid subpath strings, see `lib.path.subpath.isValid` - - - The result gets normalised, see `lib.path.subpath.normalise` - - - The edge case of an empty list gets properly handled by returning the neutral subpath `"./."` - - Laws: - - - Associativity: - - subpath.join [ x (subpath.join [ y z ]) ] == subpath.join [ (subpath.join [ x y ]) z ] - - - Identity - `"./."` is the neutral element for normalised paths: - - subpath.join [ ] == "./." - subpath.join [ (subpath.normalise p) "./." ] == subpath.normalise p - subpath.join [ "./." (subpath.normalise p) ] == subpath.normalise p - - - Normalisation - the result is normalised according to `lib.path.subpath.normalise`: - - subpath.join ps == subpath.normalise (subpath.join ps) - - - For non-empty lists, the implementation is equivalent to normalising the result of `concatStringsSep "/"`. - Note that the above laws can be derived from this one. - - ps != [] -> subpath.join ps == subpath.normalise (concatStringsSep "/" ps) - - Type: - subpath.join :: [ String ] -> String - - Example: - subpath.join [ "foo" "bar/baz" ] - => "./foo/bar/baz" - - # normalise the result - subpath.join [ "./foo" "." "bar//./baz/" ] - => "./foo/bar/baz" - - # passing an empty list results in the current directory - subpath.join [ ] - => "./." - - # elements must be valid subpath strings - subpath.join [ /foo ] - => - subpath.join [ "" ] - => - subpath.join [ "/foo" ] - => - subpath.join [ "../foo" ] - => - */ - subpath.join = - # The list of subpaths to join together - subpaths: - # Fast in case all paths are valid - if all isValid subpaths - then joinRelPath (concatMap splitRelPath subpaths) - else - # Otherwise we take our time to gather more info for a better error message - # Strictly go through each path, throwing on the first invalid one - # Tracks the list index in the fold accumulator - foldl' (i: path: - if isValid path - then i + 1 - else throw '' - lib.path.subpath.join: Element at index ${toString i} is not a valid subpath string: - ${subpathInvalidReason path}'' - ) 0 subpaths; - - /* Normalise a subpath. Throw an error if the subpath isn't valid, see - `lib.path.subpath.isValid` - - - Limit repeating `/` to a single one - - - Remove redundant `.` components - - - Remove trailing `/` and `/.` - - - Add leading `./` - - Laws: - - - Idempotency - normalising multiple times gives the same result: - - subpath.normalise (subpath.normalise p) == subpath.normalise p - - - Uniqueness - there's only a single normalisation for the paths that lead to the same file system node: - - subpath.normalise p != subpath.normalise q -> $(realpath ${p}) != $(realpath ${q}) - - - Don't change the result when appended to a Nix path value: - - base + ("/" + p) == base + ("/" + subpath.normalise p) - - - Don't change the path according to `realpath`: - - $(realpath ${p}) == $(realpath ${subpath.normalise p}) - - - Only error on invalid subpaths: - - builtins.tryEval (subpath.normalise p)).success == subpath.isValid p - - Type: - subpath.normalise :: String -> String - - Example: - # limit repeating `/` to a single one - subpath.normalise "foo//bar" - => "./foo/bar" - - # remove redundant `.` components - subpath.normalise "foo/./bar" - => "./foo/bar" - - # add leading `./` - subpath.normalise "foo/bar" - => "./foo/bar" - - # remove trailing `/` - subpath.normalise "foo/bar/" - => "./foo/bar" - - # remove trailing `/.` - subpath.normalise "foo/bar/." - => "./foo/bar" - - # Return the current directory as `./.` - subpath.normalise "." - => "./." - - # error on `..` path components - subpath.normalise "foo/../bar" - => - - # error on empty string - subpath.normalise "" - => - - # error on absolute path - subpath.normalise "/foo" - => - */ - subpath.normalise = - # The subpath string to normalise - subpath: - assert assertMsg (isValid subpath) '' - lib.path.subpath.normalise: Argument is not a valid subpath string: - ${subpathInvalidReason subpath}''; - joinRelPath (splitRelPath subpath); - -} diff --git a/lib/path/tests/default.nix b/lib/path/tests/default.nix deleted file mode 100644 index 9a31e42828f..00000000000 --- a/lib/path/tests/default.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ - nixpkgs ? ../../.., - system ? builtins.currentSystem, - pkgs ? import nixpkgs { - config = {}; - overlays = []; - inherit system; - }, - libpath ? ../.., - # Random seed - seed ? null, -}: -pkgs.runCommand "lib-path-tests" { - nativeBuildInputs = with pkgs; [ - nix - jq - bc - ]; -} '' - # Needed to make Nix evaluation work - export NIX_STATE_DIR=$(mktemp -d) - - cp -r ${libpath} lib - export TEST_LIB=$PWD/lib - - echo "Running unit tests lib/path/tests/unit.nix" - nix-instantiate --eval lib/path/tests/unit.nix \ - --argstr libpath "$TEST_LIB" - - echo "Running property tests lib/path/tests/prop.sh" - bash lib/path/tests/prop.sh ${toString seed} - - touch $out -'' diff --git a/lib/path/tests/generate.awk b/lib/path/tests/generate.awk deleted file mode 100644 index 811dd0c46d3..00000000000 --- a/lib/path/tests/generate.awk +++ /dev/null @@ -1,64 +0,0 @@ -# Generate random path-like strings, separated by null characters. -# -# Invocation: -# -# awk -f ./generate.awk -v = | tr '\0' '\n' -# -# Customizable variables (all default to 0): -# - seed: Deterministic random seed to use for generation -# - count: Number of paths to generate -# - extradotweight: Give extra weight to dots being generated -# - extraslashweight: Give extra weight to slashes being generated -# - extranullweight: Give extra weight to null being generated, making paths shorter -BEGIN { - # Random seed, passed explicitly for reproducibility - srand(seed) - - # Don't include special characters below 32 - minascii = 32 - # Don't include DEL at 128 - maxascii = 127 - upperascii = maxascii - minascii - - # add extra weight for ., in addition to the one weight from the ascii range - upperdot = upperascii + extradotweight - - # add extra weight for /, in addition to the one weight from the ascii range - upperslash = upperdot + extraslashweight - - # add extra weight for null, indicating the end of the string - # Must be at least 1 to have strings end at all - total = upperslash + 1 + extranullweight - - # new=1 indicates that it's a new string - new=1 - while (count > 0) { - - # Random integer between [0, total) - value = int(rand() * total) - - if (value < upperascii) { - # Ascii range - printf("%c", value + minascii) - new=0 - - } else if (value < upperdot) { - # Dot range - printf "." - new=0 - - } else if (value < upperslash) { - # If it's the start of a new path, only generate a / in 10% of cases - # This is always an invalid subpath, which is not a very interesting case - if (new && rand() > 0.1) continue - printf "/" - - } else { - # Do not generate empty strings - if (new) continue - printf "\x00" - count-- - new=1 - } - } -} diff --git a/lib/path/tests/prop.nix b/lib/path/tests/prop.nix deleted file mode 100644 index 67e5c1e9d61..00000000000 --- a/lib/path/tests/prop.nix +++ /dev/null @@ -1,60 +0,0 @@ -# Given a list of path-like strings, check some properties of the path library -# using those paths and return a list of attribute sets of the following form: -# -# { = ; } -# -# If `normalise` fails to evaluate, the attribute value is set to `""`. -# If not, the resulting value is normalised again and an appropriate attribute set added to the output list. -{ - # The path to the nixpkgs lib to use - libpath, - # A flat directory containing files with randomly-generated - # path-like values - dir, -}: -let - lib = import libpath; - - # read each file into a string - strings = map (name: - builtins.readFile (dir + "/${name}") - ) (builtins.attrNames (builtins.readDir dir)); - - inherit (lib.path.subpath) normalise isValid; - inherit (lib.asserts) assertMsg; - - normaliseAndCheck = str: - let - originalValid = isValid str; - - tryOnce = builtins.tryEval (normalise str); - tryTwice = builtins.tryEval (normalise tryOnce.value); - - absConcatOrig = /. + ("/" + str); - absConcatNormalised = /. + ("/" + tryOnce.value); - in - # Check the lib.path.subpath.normalise property to only error on invalid subpaths - assert assertMsg - (originalValid -> tryOnce.success) - "Even though string \"${str}\" is valid as a subpath, the normalisation for it failed"; - assert assertMsg - (! originalValid -> ! tryOnce.success) - "Even though string \"${str}\" is invalid as a subpath, the normalisation for it succeeded"; - - # Check normalisation idempotency - assert assertMsg - (originalValid -> tryTwice.success) - "For valid subpath \"${str}\", the normalisation \"${tryOnce.value}\" was not a valid subpath"; - assert assertMsg - (originalValid -> tryOnce.value == tryTwice.value) - "For valid subpath \"${str}\", normalising it once gives \"${tryOnce.value}\" but normalising it twice gives a different result: \"${tryTwice.value}\""; - - # Check that normalisation doesn't change a string when appended to an absolute Nix path value - assert assertMsg - (originalValid -> absConcatOrig == absConcatNormalised) - "For valid subpath \"${str}\", appending to an absolute Nix path value gives \"${absConcatOrig}\", but appending the normalised result \"${tryOnce.value}\" gives a different value \"${absConcatNormalised}\""; - - # Return an empty string when failed - if tryOnce.success then tryOnce.value else ""; - -in lib.genAttrs strings normaliseAndCheck diff --git a/lib/path/tests/prop.sh b/lib/path/tests/prop.sh deleted file mode 100755 index e48c6667fa0..00000000000 --- a/lib/path/tests/prop.sh +++ /dev/null @@ -1,179 +0,0 @@ -#!/usr/bin/env bash - -# Property tests for the `lib.path` library -# -# It generates random path-like strings and runs the functions on -# them, checking that the expected laws of the functions hold - -set -euo pipefail -shopt -s inherit_errexit - -# https://stackoverflow.com/a/246128 -SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) - -if test -z "${TEST_LIB:-}"; then - TEST_LIB=$SCRIPT_DIR/../.. -fi - -tmp="$(mktemp -d)" -clean_up() { - rm -rf "$tmp" -} -trap clean_up EXIT -mkdir -p "$tmp/work" -cd "$tmp/work" - -# Defaulting to a random seed but the first argument can override this -seed=${1:-$RANDOM} -echo >&2 "Using seed $seed, use \`lib/path/tests/prop.sh $seed\` to reproduce this result" - -# The number of random paths to generate. This specific number was chosen to -# be fast enough while still generating enough variety to detect bugs. -count=500 - -debug=0 -# debug=1 # print some extra info -# debug=2 # print generated values - -# Fine tuning parameters to balance the number of generated invalid paths -# to the variance in generated paths. -extradotweight=64 # Larger value: more dots -extraslashweight=64 # Larger value: more slashes -extranullweight=16 # Larger value: shorter strings - -die() { - echo >&2 "test case failed: " "$@" - exit 1 -} - -if [[ "$debug" -ge 1 ]]; then - echo >&2 "Generating $count random path-like strings" -fi - -# Read stream of null-terminated strings entry-by-entry into bash, -# write it to a file and the `strings` array. -declare -a strings=() -mkdir -p "$tmp/strings" -while IFS= read -r -d $'\0' str; do - printf "%s" "$str" > "$tmp/strings/${#strings[@]}" - strings+=("$str") -done < <(awk \ - -f "$SCRIPT_DIR"/generate.awk \ - -v seed="$seed" \ - -v count="$count" \ - -v extradotweight="$extradotweight" \ - -v extraslashweight="$extraslashweight" \ - -v extranullweight="$extranullweight") - -if [[ "$debug" -ge 1 ]]; then - echo >&2 "Trying to normalise the generated path-like strings with Nix" -fi - -# Precalculate all normalisations with a single Nix call. Calling Nix for each -# string individually would take way too long -nix-instantiate --eval --strict --json \ - --argstr libpath "$TEST_LIB" \ - --argstr dir "$tmp/strings" \ - "$SCRIPT_DIR"/prop.nix \ - >"$tmp/result.json" - -# Uses some jq magic to turn the resulting attribute set into an associative -# bash array assignment -declare -A normalised_result="($(jq ' - to_entries - | map("[\(.key | @sh)]=\(.value | @sh)") - | join(" \n")' -r < "$tmp/result.json"))" - -# Looks up a normalisation result for a string -# Checks that the normalisation is only failing iff it's an invalid subpath -# For valid subpaths, returns 0 and prints the normalisation result -# For invalid subpaths, returns 1 -normalise() { - local str=$1 - # Uses the same check for validity as in the library implementation - if [[ "$str" == "" || "$str" == /* || "$str" =~ ^(.*/)?\.\.(/.*)?$ ]]; then - valid= - else - valid=1 - fi - - normalised=${normalised_result[$str]} - # An empty string indicates failure, this is encoded in ./prop.nix - if [[ -n "$normalised" ]]; then - if [[ -n "$valid" ]]; then - echo "$normalised" - else - die "For invalid subpath \"$str\", lib.path.subpath.normalise returned this result: \"$normalised\"" - fi - else - if [[ -n "$valid" ]]; then - die "For valid subpath \"$str\", lib.path.subpath.normalise failed" - else - if [[ "$debug" -ge 2 ]]; then - echo >&2 "String \"$str\" is not a valid subpath" - fi - # Invalid and it correctly failed, we let the caller continue if they catch the exit code - return 1 - fi - fi -} - -# Intermediate result populated by test_idempotency_realpath -# and used in test_normalise_uniqueness -# -# Contains a mapping from a normalised subpath to the realpath result it represents -declare -A norm_to_real - -test_idempotency_realpath() { - if [[ "$debug" -ge 1 ]]; then - echo >&2 "Checking idempotency of each result and making sure the realpath result isn't changed" - fi - - # Count invalid subpaths to display stats - invalid=0 - for str in "${strings[@]}"; do - if ! result=$(normalise "$str"); then - ((invalid++)) || true - continue - fi - - # Check the law that it doesn't change the result of a realpath - mkdir -p -- "$str" "$result" - real_orig=$(realpath -- "$str") - real_norm=$(realpath -- "$result") - - if [[ "$real_orig" != "$real_norm" ]]; then - die "realpath of the original string \"$str\" (\"$real_orig\") is not the same as realpath of the normalisation \"$result\" (\"$real_norm\")" - fi - - if [[ "$debug" -ge 2 ]]; then - echo >&2 "String \"$str\" gets normalised to \"$result\" and file path \"$real_orig\"" - fi - norm_to_real["$result"]="$real_orig" - done - if [[ "$debug" -ge 1 ]]; then - echo >&2 "$(bc <<< "scale=1; 100 / $count * $invalid")% of the total $count generated strings were invalid subpath strings, and were therefore ignored" - fi -} - -test_normalise_uniqueness() { - if [[ "$debug" -ge 1 ]]; then - echo >&2 "Checking for the uniqueness law" - fi - - for norm_p in "${!norm_to_real[@]}"; do - real_p=${norm_to_real["$norm_p"]} - for norm_q in "${!norm_to_real[@]}"; do - real_q=${norm_to_real["$norm_q"]} - # Checks normalisation uniqueness law for each pair of values - if [[ "$norm_p" != "$norm_q" && "$real_p" == "$real_q" ]]; then - die "Normalisations \"$norm_p\" and \"$norm_q\" are different, but the realpath of them is the same: \"$real_p\"" - fi - done - done -} - -test_idempotency_realpath -test_normalise_uniqueness - -echo >&2 tests ok diff --git a/lib/path/tests/unit.nix b/lib/path/tests/unit.nix deleted file mode 100644 index 61c4ab4d6f2..00000000000 --- a/lib/path/tests/unit.nix +++ /dev/null @@ -1,193 +0,0 @@ -# Unit tests for lib.path functions. Use `nix-build` in this directory to -# run these -{ libpath }: -let - lib = import libpath; - inherit (lib.path) append subpath; - - cases = lib.runTests { - # Test examples from the lib.path.append documentation - testAppendExample1 = { - expr = append /foo "bar/baz"; - expected = /foo/bar/baz; - }; - testAppendExample2 = { - expr = append /foo "./bar//baz/./"; - expected = /foo/bar/baz; - }; - testAppendExample3 = { - expr = append /. "foo/bar"; - expected = /foo/bar; - }; - testAppendExample4 = { - expr = (builtins.tryEval (append "/foo" "bar")).success; - expected = false; - }; - testAppendExample5 = { - expr = (builtins.tryEval (append /foo /bar)).success; - expected = false; - }; - testAppendExample6 = { - expr = (builtins.tryEval (append /foo "")).success; - expected = false; - }; - testAppendExample7 = { - expr = (builtins.tryEval (append /foo "/bar")).success; - expected = false; - }; - testAppendExample8 = { - expr = (builtins.tryEval (append /foo "../bar")).success; - expected = false; - }; - - # Test examples from the lib.path.subpath.isValid documentation - testSubpathIsValidExample1 = { - expr = subpath.isValid null; - expected = false; - }; - testSubpathIsValidExample2 = { - expr = subpath.isValid ""; - expected = false; - }; - testSubpathIsValidExample3 = { - expr = subpath.isValid "/foo"; - expected = false; - }; - testSubpathIsValidExample4 = { - expr = subpath.isValid "../foo"; - expected = false; - }; - testSubpathIsValidExample5 = { - expr = subpath.isValid "foo/bar"; - expected = true; - }; - testSubpathIsValidExample6 = { - expr = subpath.isValid "./foo//bar/"; - expected = true; - }; - # Some extra tests - testSubpathIsValidTwoDotsEnd = { - expr = subpath.isValid "foo/.."; - expected = false; - }; - testSubpathIsValidTwoDotsMiddle = { - expr = subpath.isValid "foo/../bar"; - expected = false; - }; - testSubpathIsValidTwoDotsPrefix = { - expr = subpath.isValid "..foo"; - expected = true; - }; - testSubpathIsValidTwoDotsSuffix = { - expr = subpath.isValid "foo.."; - expected = true; - }; - testSubpathIsValidTwoDotsPrefixComponent = { - expr = subpath.isValid "foo/..bar/baz"; - expected = true; - }; - testSubpathIsValidTwoDotsSuffixComponent = { - expr = subpath.isValid "foo/bar../baz"; - expected = true; - }; - testSubpathIsValidThreeDots = { - expr = subpath.isValid "..."; - expected = true; - }; - testSubpathIsValidFourDots = { - expr = subpath.isValid "...."; - expected = true; - }; - testSubpathIsValidThreeDotsComponent = { - expr = subpath.isValid "foo/.../bar"; - expected = true; - }; - testSubpathIsValidFourDotsComponent = { - expr = subpath.isValid "foo/..../bar"; - expected = true; - }; - - # Test examples from the lib.path.subpath.join documentation - testSubpathJoinExample1 = { - expr = subpath.join [ "foo" "bar/baz" ]; - expected = "./foo/bar/baz"; - }; - testSubpathJoinExample2 = { - expr = subpath.join [ "./foo" "." "bar//./baz/" ]; - expected = "./foo/bar/baz"; - }; - testSubpathJoinExample3 = { - expr = subpath.join [ ]; - expected = "./."; - }; - testSubpathJoinExample4 = { - expr = (builtins.tryEval (subpath.join [ /foo ])).success; - expected = false; - }; - testSubpathJoinExample5 = { - expr = (builtins.tryEval (subpath.join [ "" ])).success; - expected = false; - }; - testSubpathJoinExample6 = { - expr = (builtins.tryEval (subpath.join [ "/foo" ])).success; - expected = false; - }; - testSubpathJoinExample7 = { - expr = (builtins.tryEval (subpath.join [ "../foo" ])).success; - expected = false; - }; - - # Test examples from the lib.path.subpath.normalise documentation - testSubpathNormaliseExample1 = { - expr = subpath.normalise "foo//bar"; - expected = "./foo/bar"; - }; - testSubpathNormaliseExample2 = { - expr = subpath.normalise "foo/./bar"; - expected = "./foo/bar"; - }; - testSubpathNormaliseExample3 = { - expr = subpath.normalise "foo/bar"; - expected = "./foo/bar"; - }; - testSubpathNormaliseExample4 = { - expr = subpath.normalise "foo/bar/"; - expected = "./foo/bar"; - }; - testSubpathNormaliseExample5 = { - expr = subpath.normalise "foo/bar/."; - expected = "./foo/bar"; - }; - testSubpathNormaliseExample6 = { - expr = subpath.normalise "."; - expected = "./."; - }; - testSubpathNormaliseExample7 = { - expr = (builtins.tryEval (subpath.normalise "foo/../bar")).success; - expected = false; - }; - testSubpathNormaliseExample8 = { - expr = (builtins.tryEval (subpath.normalise "")).success; - expected = false; - }; - testSubpathNormaliseExample9 = { - expr = (builtins.tryEval (subpath.normalise "/foo")).success; - expected = false; - }; - # Some extra tests - testSubpathNormaliseIsValidDots = { - expr = subpath.normalise "./foo/.bar/.../baz...qux"; - expected = "./foo/.bar/.../baz...qux"; - }; - testSubpathNormaliseWrongType = { - expr = (builtins.tryEval (subpath.normalise null)).success; - expected = false; - }; - testSubpathNormaliseTwoDots = { - expr = (builtins.tryEval (subpath.normalise "..")).success; - expected = false; - }; - }; -in - if cases == [] then "Unit tests successful" - else throw "Path unit tests failed: ${lib.generators.toPretty {} cases}" diff --git a/lib/source-types.nix b/lib/source-types.nix deleted file mode 100644 index c4f263dcf46..00000000000 --- a/lib/source-types.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ lib }: - -let - defaultSourceType = tname: { - shortName = tname; - isSource = false; - }; -in lib.mapAttrs (tname: tset: defaultSourceType tname // tset) { - - fromSource = { - isSource = true; - }; - - binaryNativeCode = {}; - - binaryBytecode = {}; - - binaryFirmware = {}; -} diff --git a/lib/sources.nix b/lib/sources.nix deleted file mode 100644 index 3ad7dc63355..00000000000 --- a/lib/sources.nix +++ /dev/null @@ -1,293 +0,0 @@ -# Functions for copying sources to the Nix store. -{ lib }: - -# Tested in lib/tests/sources.sh -let - inherit (builtins) - match - readDir - split - storeDir - tryEval - ; - inherit (lib) - boolToString - filter - getAttr - isString - pathExists - readFile - ; - - /* - Returns the type of a path: regular (for file), symlink, or directory. - */ - pathType = path: getAttr (baseNameOf path) (readDir (dirOf path)); - - /* - Returns true if the path exists and is a directory, false otherwise. - */ - pathIsDirectory = path: if pathExists path then (pathType path) == "directory" else false; - - /* - Returns true if the path exists and is a regular file, false otherwise. - */ - pathIsRegularFile = path: if pathExists path then (pathType path) == "regular" else false; - - /* - A basic filter for `cleanSourceWith` that removes - directories of version control system, backup files (*~) - and some generated files. - */ - cleanSourceFilter = name: type: let baseName = baseNameOf (toString name); in ! ( - # Filter out version control software files/directories - (baseName == ".git" || type == "directory" && (baseName == ".svn" || baseName == "CVS" || baseName == ".hg")) || - # Filter out editor backup / swap files. - lib.hasSuffix "~" baseName || - match "^\\.sw[a-z]$" baseName != null || - match "^\\..*\\.sw[a-z]$" baseName != null || - - # Filter out generates files. - lib.hasSuffix ".o" baseName || - lib.hasSuffix ".so" baseName || - # Filter out nix-build result symlinks - (type == "symlink" && lib.hasPrefix "result" baseName) || - # Filter out sockets and other types of files we can't have in the store. - (type == "unknown") - ); - - /* - Filters a source tree removing version control files and directories using cleanSourceFilter. - - Example: - cleanSource ./. - */ - cleanSource = src: cleanSourceWith { filter = cleanSourceFilter; inherit src; }; - - /* - Like `builtins.filterSource`, except it will compose with itself, - allowing you to chain multiple calls together without any - intermediate copies being put in the nix store. - - Example: - lib.cleanSourceWith { - filter = f; - src = lib.cleanSourceWith { - filter = g; - src = ./.; - }; - } - # Succeeds! - - builtins.filterSource f (builtins.filterSource g ./.) - # Fails! - - */ - cleanSourceWith = - { - # A path or cleanSourceWith result to filter and/or rename. - src, - # Optional with default value: constant true (include everything) - # The function will be combined with the && operator such - # that src.filter is called lazily. - # For implementing a filter, see - # https://nixos.org/nix/manual/#builtin-filterSource - # Type: A function (path -> type -> bool) - filter ? _path: _type: true, - # Optional name to use as part of the store path. - # This defaults to `src.name` or otherwise `"source"`. - name ? null - }: - let - orig = toSourceAttributes src; - in fromSourceAttributes { - inherit (orig) origSrc; - filter = path: type: filter path type && orig.filter path type; - name = if name != null then name else orig.name; - }; - - /* - Add logging to a source, for troubleshooting the filtering behavior. - Type: - sources.trace :: sourceLike -> Source - */ - trace = - # Source to debug. The returned source will behave like this source, but also log its filter invocations. - src: - let - attrs = toSourceAttributes src; - in - fromSourceAttributes ( - attrs // { - filter = path: type: - let - r = attrs.filter path type; - in - builtins.trace "${attrs.name}.filter ${path} = ${boolToString r}" r; - } - ) // { - satisfiesSubpathInvariant = src ? satisfiesSubpathInvariant && src.satisfiesSubpathInvariant; - }; - - /* - Filter sources by a list of regular expressions. - - Example: src = sourceByRegex ./my-subproject [".*\.py$" "^database.sql$"] - */ - sourceByRegex = src: regexes: - let - isFiltered = src ? _isLibCleanSourceWith; - origSrc = if isFiltered then src.origSrc else src; - in lib.cleanSourceWith { - filter = (path: type: - let relPath = lib.removePrefix (toString origSrc + "/") (toString path); - in lib.any (re: match re relPath != null) regexes); - inherit src; - }; - - /* - Get all files ending with the specified suffices from the given - source directory or its descendants, omitting files that do not match - any suffix. The result of the example below will include files like - `./dir/module.c` and `./dir/subdir/doc.xml` if present. - - Type: sourceLike -> [String] -> Source - - Example: - sourceFilesBySuffices ./. [ ".xml" ".c" ] - */ - sourceFilesBySuffices = - # Path or source containing the files to be returned - src: - # A list of file suffix strings - exts: - let filter = name: type: - let base = baseNameOf (toString name); - in type == "directory" || lib.any (ext: lib.hasSuffix ext base) exts; - in cleanSourceWith { inherit filter src; }; - - pathIsGitRepo = path: (_commitIdFromGitRepoOrError path)?value; - - /* - Get the commit id of a git repo. - - Example: commitIdFromGitRepo - */ - commitIdFromGitRepo = path: - let commitIdOrError = _commitIdFromGitRepoOrError path; - in commitIdOrError.value or (throw commitIdOrError.error); - - # Get the commit id of a git repo. - - # Returns `{ value = commitHash }` or `{ error = "... message ..." }`. - - # Example: commitIdFromGitRepo - # not exported, used for commitIdFromGitRepo - _commitIdFromGitRepoOrError = - let readCommitFromFile = file: path: - let fileName = path + "/${file}"; - packedRefsName = path + "/packed-refs"; - absolutePath = base: path: - if lib.hasPrefix "/" path - then path - else toString (/. + "${base}/${path}"); - in if pathIsRegularFile path - # Resolve git worktrees. See gitrepository-layout(5) - then - let m = match "^gitdir: (.*)$" (lib.fileContents path); - in if m == null - then { error = "File contains no gitdir reference: " + path; } - else - let gitDir = absolutePath (dirOf path) (lib.head m); - commonDir'' = if pathIsRegularFile "${gitDir}/commondir" - then lib.fileContents "${gitDir}/commondir" - else gitDir; - commonDir' = lib.removeSuffix "/" commonDir''; - commonDir = absolutePath gitDir commonDir'; - refFile = lib.removePrefix "${commonDir}/" "${gitDir}/${file}"; - in readCommitFromFile refFile commonDir - - else if pathIsRegularFile fileName - # Sometimes git stores the commitId directly in the file but - # sometimes it stores something like: «ref: refs/heads/branch-name» - then - let fileContent = lib.fileContents fileName; - matchRef = match "^ref: (.*)$" fileContent; - in if matchRef == null - then { value = fileContent; } - else readCommitFromFile (lib.head matchRef) path - - else if pathIsRegularFile packedRefsName - # Sometimes, the file isn't there at all and has been packed away in the - # packed-refs file, so we have to grep through it: - then - let fileContent = readFile packedRefsName; - matchRef = match "([a-z0-9]+) ${file}"; - isRef = s: isString s && (matchRef s) != null; - # there is a bug in libstdc++ leading to stackoverflow for long strings: - # https://github.com/NixOS/nix/issues/2147#issuecomment-659868795 - refs = filter isRef (split "\n" fileContent); - in if refs == [] - then { error = "Could not find " + file + " in " + packedRefsName; } - else { value = lib.head (matchRef (lib.head refs)); } - - else { error = "Not a .git directory: " + toString path; }; - in readCommitFromFile "HEAD"; - - pathHasContext = builtins.hasContext or (lib.hasPrefix storeDir); - - canCleanSource = src: src ? _isLibCleanSourceWith || !(pathHasContext (toString src)); - - # -------------------------------------------------------------------------- # - # Internal functions - # - - # toSourceAttributes : sourceLike -> SourceAttrs - # - # Convert any source-like object into a simple, singular representation. - # We don't expose this representation in order to avoid having a fifth path- - # like class of objects in the wild. - # (Existing ones being: paths, strings, sources and x//{outPath}) - # So instead of exposing internals, we build a library of combinator functions. - toSourceAttributes = src: - let - isFiltered = src ? _isLibCleanSourceWith; - in - { - # The original path - origSrc = if isFiltered then src.origSrc else src; - filter = if isFiltered then src.filter else _: _: true; - name = if isFiltered then src.name else "source"; - }; - - # fromSourceAttributes : SourceAttrs -> Source - # - # Inverse of toSourceAttributes for Source objects. - fromSourceAttributes = { origSrc, filter, name }: - { - _isLibCleanSourceWith = true; - inherit origSrc filter name; - outPath = builtins.path { inherit filter name; path = origSrc; }; - }; - -in { - inherit - pathType - pathIsDirectory - pathIsRegularFile - - pathIsGitRepo - commitIdFromGitRepo - - cleanSource - cleanSourceWith - cleanSourceFilter - pathHasContext - canCleanSource - - sourceByRegex - sourceFilesBySuffices - - trace - ; -} diff --git a/lib/strings-with-deps.nix b/lib/strings-with-deps.nix deleted file mode 100644 index 7b88b018da5..00000000000 --- a/lib/strings-with-deps.nix +++ /dev/null @@ -1,84 +0,0 @@ -{ lib }: -/* -Usage: - - You define you custom builder script by adding all build steps to a list. - for example: - builder = writeScript "fsg-4.4-builder" - (textClosure [doUnpack addInputs preBuild doMake installPhase doForceShare]); - - a step is defined by noDepEntry, fullDepEntry or packEntry. - To ensure that prerequisite are met those are added before the task itself by - textClosureDupList. Duplicated items are removed again. - - See trace/nixpkgs/trunk/pkgs/top-level/builder-defs.nix for some predefined build steps - - Attention: - - let - pkgs = (import ) {}; - in let - inherit (pkgs.stringsWithDeps) fullDepEntry packEntry noDepEntry textClosureMap; - inherit (pkgs.lib) id; - - nameA = noDepEntry "Text a"; - nameB = fullDepEntry "Text b" ["nameA"]; - nameC = fullDepEntry "Text c" ["nameA"]; - - stages = { - nameHeader = noDepEntry "#! /bin/sh \n"; - inherit nameA nameB nameC; - }; - in - textClosureMap id stages - [ "nameHeader" "nameA" "nameB" "nameC" - nameC # <- added twice. add a dep entry if you know that it will be added once only [1] - "nameB" # <- this will not be added again because the attr name (reference) is used - ] - - # result: Str("#! /bin/sh \n\nText a\nText b\nText c\nText c",[]) - - [1] maybe this behaviour should be removed to keep things simple (?) -*/ - -let - inherit (lib) - concatStringsSep - head - isAttrs - listToAttrs - tail - ; -in -rec { - - /* !!! The interface of this function is kind of messed up, since - it's way too overloaded and almost but not quite computes a - topological sort of the depstrings. */ - - textClosureList = predefined: arg: - let - f = done: todo: - if todo == [] then {result = []; inherit done;} - else - let entry = head todo; in - if isAttrs entry then - let x = f done entry.deps; - y = f x.done (tail todo); - in { result = x.result ++ [entry.text] ++ y.result; - done = y.done; - } - else if done ? ${entry} then f done (tail todo) - else f (done // listToAttrs [{name = entry; value = 1;}]) ([predefined.${entry}] ++ tail todo); - in (f {} arg).result; - - textClosureMap = f: predefined: names: - concatStringsSep "\n" (map f (textClosureList predefined names)); - - noDepEntry = text: {inherit text; deps = [];}; - fullDepEntry = text: deps: {inherit text deps;}; - packEntry = deps: {inherit deps; text="";}; - - stringAfter = deps: text: { inherit text deps; }; - -} diff --git a/lib/strings.nix b/lib/strings.nix deleted file mode 100644 index e875520c685..00000000000 --- a/lib/strings.nix +++ /dev/null @@ -1,1243 +0,0 @@ -/* String manipulation functions. */ -{ lib }: -let - - inherit (builtins) length; - - inherit (lib.trivial) warnIf; - -asciiTable = import ./ascii-table.nix; - -in - -rec { - - inherit (builtins) - compareVersions - elem - elemAt - filter - fromJSON - head - isInt - isList - isAttrs - isPath - isString - match - parseDrvName - readFile - replaceStrings - split - storeDir - stringLength - substring - tail - toJSON - typeOf - unsafeDiscardStringContext - ; - - /* Concatenate a list of strings. - - Type: concatStrings :: [string] -> string - - Example: - concatStrings ["foo" "bar"] - => "foobar" - */ - concatStrings = builtins.concatStringsSep ""; - - /* Map a function over a list and concatenate the resulting strings. - - Type: concatMapStrings :: (a -> string) -> [a] -> string - - Example: - concatMapStrings (x: "a" + x) ["foo" "bar"] - => "afooabar" - */ - concatMapStrings = f: list: concatStrings (map f list); - - /* Like `concatMapStrings` except that the f functions also gets the - position as a parameter. - - Type: concatImapStrings :: (int -> a -> string) -> [a] -> string - - Example: - concatImapStrings (pos: x: "${toString pos}-${x}") ["foo" "bar"] - => "1-foo2-bar" - */ - concatImapStrings = f: list: concatStrings (lib.imap1 f list); - - /* Place an element between each element of a list - - Type: intersperse :: a -> [a] -> [a] - - Example: - intersperse "/" ["usr" "local" "bin"] - => ["usr" "/" "local" "/" "bin"]. - */ - intersperse = - # Separator to add between elements - separator: - # Input list - list: - if list == [] || length list == 1 - then list - else tail (lib.concatMap (x: [separator x]) list); - - /* Concatenate a list of strings with a separator between each element - - Type: concatStringsSep :: string -> [string] -> string - - Example: - concatStringsSep "/" ["usr" "local" "bin"] - => "usr/local/bin" - */ - concatStringsSep = builtins.concatStringsSep or (separator: list: - lib.foldl' (x: y: x + y) "" (intersperse separator list)); - - /* Maps a function over a list of strings and then concatenates the - result with the specified separator interspersed between - elements. - - Type: concatMapStringsSep :: string -> (a -> string) -> [a] -> string - - Example: - concatMapStringsSep "-" (x: toUpper x) ["foo" "bar" "baz"] - => "FOO-BAR-BAZ" - */ - concatMapStringsSep = - # Separator to add between elements - sep: - # Function to map over the list - f: - # List of input strings - list: concatStringsSep sep (map f list); - - /* Same as `concatMapStringsSep`, but the mapping function - additionally receives the position of its argument. - - Type: concatIMapStringsSep :: string -> (int -> a -> string) -> [a] -> string - - Example: - concatImapStringsSep "-" (pos: x: toString (x / pos)) [ 6 6 6 ] - => "6-3-2" - */ - concatImapStringsSep = - # Separator to add between elements - sep: - # Function that receives elements and their positions - f: - # List of input strings - list: concatStringsSep sep (lib.imap1 f list); - - /* Concatenate a list of strings, adding a newline at the end of each one. - Defined as `concatMapStrings (s: s + "\n")`. - - Type: concatLines :: [string] -> string - - Example: - concatLines [ "foo" "bar" ] - => "foo\nbar\n" - */ - concatLines = concatMapStrings (s: s + "\n"); - - /* Construct a Unix-style, colon-separated search path consisting of - the given `subDir` appended to each of the given paths. - - Type: makeSearchPath :: string -> [string] -> string - - Example: - makeSearchPath "bin" ["/root" "/usr" "/usr/local"] - => "/root/bin:/usr/bin:/usr/local/bin" - makeSearchPath "bin" [""] - => "/bin" - */ - makeSearchPath = - # Directory name to append - subDir: - # List of base paths - paths: - concatStringsSep ":" (map (path: path + "/" + subDir) (filter (x: x != null) paths)); - - /* Construct a Unix-style search path by appending the given - `subDir` to the specified `output` of each of the packages. If no - output by the given name is found, fallback to `.out` and then to - the default. - - Type: string -> string -> [package] -> string - - Example: - makeSearchPathOutput "dev" "bin" [ pkgs.openssl pkgs.zlib ] - => "/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r-dev/bin:/nix/store/wwh7mhwh269sfjkm6k5665b5kgp7jrk2-zlib-1.2.8/bin" - */ - makeSearchPathOutput = - # Package output to use - output: - # Directory name to append - subDir: - # List of packages - pkgs: makeSearchPath subDir (map (lib.getOutput output) pkgs); - - /* Construct a library search path (such as RPATH) containing the - libraries for a set of packages - - Example: - makeLibraryPath [ "/usr" "/usr/local" ] - => "/usr/lib:/usr/local/lib" - pkgs = import { } - makeLibraryPath [ pkgs.openssl pkgs.zlib ] - => "/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r/lib:/nix/store/wwh7mhwh269sfjkm6k5665b5kgp7jrk2-zlib-1.2.8/lib" - */ - makeLibraryPath = makeSearchPathOutput "lib" "lib"; - - /* Construct a binary search path (such as $PATH) containing the - binaries for a set of packages. - - Example: - makeBinPath ["/root" "/usr" "/usr/local"] - => "/root/bin:/usr/bin:/usr/local/bin" - */ - makeBinPath = makeSearchPathOutput "bin" "bin"; - - /* Normalize path, removing extraneous /s - - Type: normalizePath :: string -> string - - Example: - normalizePath "/a//b///c/" - => "/a/b/c/" - */ - normalizePath = s: - warnIf - (isPath s) - '' - lib.strings.normalizePath: The argument (${toString s}) is a path value, but only strings are supported. - Path values are always normalised in Nix, so there's no need to call this function on them. - This function also copies the path to the Nix store and returns the store path, the same as "''${path}" will, which may not be what you want. - This behavior is deprecated and will throw an error in the future.'' - ( - builtins.foldl' - (x: y: if y == "/" && hasSuffix "/" x then x else x+y) - "" - (stringToCharacters s) - ); - - /* Depending on the boolean `cond', return either the given string - or the empty string. Useful to concatenate against a bigger string. - - Type: optionalString :: bool -> string -> string - - Example: - optionalString true "some-string" - => "some-string" - optionalString false "some-string" - => "" - */ - optionalString = - # Condition - cond: - # String to return if condition is true - string: if cond then string else ""; - - /* Determine whether a string has given prefix. - - Type: hasPrefix :: string -> string -> bool - - Example: - hasPrefix "foo" "foobar" - => true - hasPrefix "foo" "barfoo" - => false - */ - hasPrefix = - # Prefix to check for - pref: - # Input string - str: - # Before 23.05, paths would be copied to the store before converting them - # to strings and comparing. This was surprising and confusing. - warnIf - (isPath pref) - '' - lib.strings.hasPrefix: The first argument (${toString pref}) is a path value, but only strings are supported. - There is almost certainly a bug in the calling code, since this function always returns `false` in such a case. - This function also copies the path to the Nix store, which may not be what you want. - This behavior is deprecated and will throw an error in the future.'' - (substring 0 (stringLength pref) str == pref); - - /* Determine whether a string has given suffix. - - Type: hasSuffix :: string -> string -> bool - - Example: - hasSuffix "foo" "foobar" - => false - hasSuffix "foo" "barfoo" - => true - */ - hasSuffix = - # Suffix to check for - suffix: - # Input string - content: - let - lenContent = stringLength content; - lenSuffix = stringLength suffix; - in - # Before 23.05, paths would be copied to the store before converting them - # to strings and comparing. This was surprising and confusing. - warnIf - (isPath suffix) - '' - lib.strings.hasSuffix: The first argument (${toString suffix}) is a path value, but only strings are supported. - There is almost certainly a bug in the calling code, since this function always returns `false` in such a case. - This function also copies the path to the Nix store, which may not be what you want. - This behavior is deprecated and will throw an error in the future.'' - ( - lenContent >= lenSuffix - && substring (lenContent - lenSuffix) lenContent content == suffix - ); - - /* Determine whether a string contains the given infix - - Type: hasInfix :: string -> string -> bool - - Example: - hasInfix "bc" "abcd" - => true - hasInfix "ab" "abcd" - => true - hasInfix "cd" "abcd" - => true - hasInfix "foo" "abcd" - => false - */ - hasInfix = infix: content: - # Before 23.05, paths would be copied to the store before converting them - # to strings and comparing. This was surprising and confusing. - warnIf - (isPath infix) - '' - lib.strings.hasInfix: The first argument (${toString infix}) is a path value, but only strings are supported. - There is almost certainly a bug in the calling code, since this function always returns `false` in such a case. - This function also copies the path to the Nix store, which may not be what you want. - This behavior is deprecated and will throw an error in the future.'' - (builtins.match ".*${escapeRegex infix}.*" "${content}" != null); - - /* Convert a string to a list of characters (i.e. singleton strings). - This allows you to, e.g., map a function over each character. However, - note that this will likely be horribly inefficient; Nix is not a - general purpose programming language. Complex string manipulations - should, if appropriate, be done in a derivation. - Also note that Nix treats strings as a list of bytes and thus doesn't - handle unicode. - - Type: stringToCharacters :: string -> [string] - - Example: - stringToCharacters "" - => [ ] - stringToCharacters "abc" - => [ "a" "b" "c" ] - stringToCharacters "🦄" - => [ "�" "�" "�" "�" ] - */ - stringToCharacters = s: - map (p: substring p 1 s) (lib.range 0 (stringLength s - 1)); - - /* Manipulate a string character by character and replace them by - strings before concatenating the results. - - Type: stringAsChars :: (string -> string) -> string -> string - - Example: - stringAsChars (x: if x == "a" then "i" else x) "nax" - => "nix" - */ - stringAsChars = - # Function to map over each individual character - f: - # Input string - s: concatStrings ( - map f (stringToCharacters s) - ); - - /* Convert char to ascii value, must be in printable range - - Type: charToInt :: string -> int - - Example: - charToInt "A" - => 65 - charToInt "(" - => 40 - - */ - charToInt = c: builtins.getAttr c asciiTable; - - /* Escape occurrence of the elements of `list` in `string` by - prefixing it with a backslash. - - Type: escape :: [string] -> string -> string - - Example: - escape ["(" ")"] "(foo)" - => "\\(foo\\)" - */ - escape = list: replaceStrings list (map (c: "\\${c}") list); - - /* Escape occurrence of the element of `list` in `string` by - converting to its ASCII value and prefixing it with \\x. - Only works for printable ascii characters. - - Type: escapeC = [string] -> string -> string - - Example: - escapeC [" "] "foo bar" - => "foo\\x20bar" - - */ - escapeC = list: replaceStrings list (map (c: "\\x${ toLower (lib.toHexString (charToInt c))}") list); - - /* Escape the string so it can be safely placed inside a URL - query. - - Type: escapeURL :: string -> string - - Example: - escapeURL "foo/bar baz" - => "foo%2Fbar%20baz" - */ - escapeURL = let - unreserved = [ "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" "O" "P" "Q" "R" "S" "T" "U" "V" "W" "X" "Y" "Z" "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s" "t" "u" "v" "w" "x" "y" "z" "0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "-" "_" "." "~" ]; - toEscape = builtins.removeAttrs asciiTable unreserved; - in - replaceStrings (builtins.attrNames toEscape) (lib.mapAttrsToList (_: c: "%${fixedWidthString 2 "0" (lib.toHexString c)}") toEscape); - - /* Quote string to be used safely within the Bourne shell. - - Type: escapeShellArg :: string -> string - - Example: - escapeShellArg "esc'ape\nme" - => "'esc'\\''ape\nme'" - */ - escapeShellArg = arg: "'${replaceStrings ["'"] ["'\\''"] (toString arg)}'"; - - /* Quote all arguments to be safely passed to the Bourne shell. - - Type: escapeShellArgs :: [string] -> string - - Example: - escapeShellArgs ["one" "two three" "four'five"] - => "'one' 'two three' 'four'\\''five'" - */ - escapeShellArgs = concatMapStringsSep " " escapeShellArg; - - /* Test whether the given name is a valid POSIX shell variable name. - - Type: string -> bool - - Example: - isValidPosixName "foo_bar000" - => true - isValidPosixName "0-bad.jpg" - => false - */ - isValidPosixName = name: match "[a-zA-Z_][a-zA-Z0-9_]*" name != null; - - /* Translate a Nix value into a shell variable declaration, with proper escaping. - - The value can be a string (mapped to a regular variable), a list of strings - (mapped to a Bash-style array) or an attribute set of strings (mapped to a - Bash-style associative array). Note that "string" includes string-coercible - values like paths or derivations. - - Strings are translated into POSIX sh-compatible code; lists and attribute sets - assume a shell that understands Bash syntax (e.g. Bash or ZSH). - - Type: string -> (string | listOf string | attrsOf string) -> string - - Example: - '' - ${toShellVar "foo" "some string"} - [[ "$foo" == "some string" ]] - '' - */ - toShellVar = name: value: - lib.throwIfNot (isValidPosixName name) "toShellVar: ${name} is not a valid shell variable name" ( - if isAttrs value && ! isStringLike value then - "declare -A ${name}=(${ - concatStringsSep " " (lib.mapAttrsToList (n: v: - "[${escapeShellArg n}]=${escapeShellArg v}" - ) value) - })" - else if isList value then - "declare -a ${name}=(${escapeShellArgs value})" - else - "${name}=${escapeShellArg value}" - ); - - /* Translate an attribute set into corresponding shell variable declarations - using `toShellVar`. - - Type: attrsOf (string | listOf string | attrsOf string) -> string - - Example: - let - foo = "value"; - bar = foo; - in '' - ${toShellVars { inherit foo bar; }} - [[ "$foo" == "$bar" ]] - '' - */ - toShellVars = vars: concatStringsSep "\n" (lib.mapAttrsToList toShellVar vars); - - /* Turn a string into a Nix expression representing that string - - Type: string -> string - - Example: - escapeNixString "hello\${}\n" - => "\"hello\\\${}\\n\"" - */ - escapeNixString = s: escape ["$"] (toJSON s); - - /* Turn a string into an exact regular expression - - Type: string -> string - - Example: - escapeRegex "[^a-z]*" - => "\\[\\^a-z]\\*" - */ - escapeRegex = escape (stringToCharacters "\\[{()^$?*+|."); - - /* Quotes a string if it can't be used as an identifier directly. - - Type: string -> string - - Example: - escapeNixIdentifier "hello" - => "hello" - escapeNixIdentifier "0abc" - => "\"0abc\"" - */ - escapeNixIdentifier = s: - # Regex from https://github.com/NixOS/nix/blob/d048577909e383439c2549e849c5c2f2016c997e/src/libexpr/lexer.l#L91 - if match "[a-zA-Z_][a-zA-Z0-9_'-]*" s != null - then s else escapeNixString s; - - /* Escapes a string such that it is safe to include verbatim in an XML - document. - - Type: string -> string - - Example: - escapeXML ''"test" 'test' < & >'' - => ""test" 'test' < & >" - */ - escapeXML = builtins.replaceStrings - ["\"" "'" "<" ">" "&"] - [""" "'" "<" ">" "&"]; - - # warning added 12-12-2022 - replaceChars = lib.warn "replaceChars is a deprecated alias of replaceStrings, replace usages of it with replaceStrings." builtins.replaceStrings; - - # Case conversion utilities. - lowerChars = stringToCharacters "abcdefghijklmnopqrstuvwxyz"; - upperChars = stringToCharacters "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; - - /* Converts an ASCII string to lower-case. - - Type: toLower :: string -> string - - Example: - toLower "HOME" - => "home" - */ - toLower = replaceStrings upperChars lowerChars; - - /* Converts an ASCII string to upper-case. - - Type: toUpper :: string -> string - - Example: - toUpper "home" - => "HOME" - */ - toUpper = replaceStrings lowerChars upperChars; - - /* Appends string context from another string. This is an implementation - detail of Nix and should be used carefully. - - Strings in Nix carry an invisible `context` which is a list of strings - representing store paths. If the string is later used in a derivation - attribute, the derivation will properly populate the inputDrvs and - inputSrcs. - - Example: - pkgs = import { }; - addContextFrom pkgs.coreutils "bar" - => "bar" - */ - addContextFrom = a: b: substring 0 0 a + b; - - /* Cut a string with a separator and produces a list of strings which - were separated by this separator. - - Example: - splitString "." "foo.bar.baz" - => [ "foo" "bar" "baz" ] - splitString "/" "/usr/local/bin" - => [ "" "usr" "local" "bin" ] - */ - splitString = sep: s: - let - splits = builtins.filter builtins.isString (builtins.split (escapeRegex (toString sep)) (toString s)); - in - map (addContextFrom s) splits; - - /* Return a string without the specified prefix, if the prefix matches. - - Type: string -> string -> string - - Example: - removePrefix "foo." "foo.bar.baz" - => "bar.baz" - removePrefix "xxx" "foo.bar.baz" - => "foo.bar.baz" - */ - removePrefix = - # Prefix to remove if it matches - prefix: - # Input string - str: - # Before 23.05, paths would be copied to the store before converting them - # to strings and comparing. This was surprising and confusing. - warnIf - (isPath prefix) - '' - lib.strings.removePrefix: The first argument (${toString prefix}) is a path value, but only strings are supported. - There is almost certainly a bug in the calling code, since this function never removes any prefix in such a case. - This function also copies the path to the Nix store, which may not be what you want. - This behavior is deprecated and will throw an error in the future.'' - (let - preLen = stringLength prefix; - sLen = stringLength str; - in - if substring 0 preLen str == prefix then - substring preLen (sLen - preLen) str - else - str); - - /* Return a string without the specified suffix, if the suffix matches. - - Type: string -> string -> string - - Example: - removeSuffix "front" "homefront" - => "home" - removeSuffix "xxx" "homefront" - => "homefront" - */ - removeSuffix = - # Suffix to remove if it matches - suffix: - # Input string - str: - # Before 23.05, paths would be copied to the store before converting them - # to strings and comparing. This was surprising and confusing. - warnIf - (isPath suffix) - '' - lib.strings.removeSuffix: The first argument (${toString suffix}) is a path value, but only strings are supported. - There is almost certainly a bug in the calling code, since this function never removes any suffix in such a case. - This function also copies the path to the Nix store, which may not be what you want. - This behavior is deprecated and will throw an error in the future.'' - (let - sufLen = stringLength suffix; - sLen = stringLength str; - in - if sufLen <= sLen && suffix == substring (sLen - sufLen) sufLen str then - substring 0 (sLen - sufLen) str - else - str); - - /* Return true if string v1 denotes a version older than v2. - - Example: - versionOlder "1.1" "1.2" - => true - versionOlder "1.1" "1.1" - => false - */ - versionOlder = v1: v2: compareVersions v2 v1 == 1; - - /* Return true if string v1 denotes a version equal to or newer than v2. - - Example: - versionAtLeast "1.1" "1.0" - => true - versionAtLeast "1.1" "1.1" - => true - versionAtLeast "1.1" "1.2" - => false - */ - versionAtLeast = v1: v2: !versionOlder v1 v2; - - /* This function takes an argument that's either a derivation or a - derivation's "name" attribute and extracts the name part from that - argument. - - Example: - getName "youtube-dl-2016.01.01" - => "youtube-dl" - getName pkgs.youtube-dl - => "youtube-dl" - */ - getName = x: - let - parse = drv: (parseDrvName drv).name; - in if isString x - then parse x - else x.pname or (parse x.name); - - /* This function takes an argument that's either a derivation or a - derivation's "name" attribute and extracts the version part from that - argument. - - Example: - getVersion "youtube-dl-2016.01.01" - => "2016.01.01" - getVersion pkgs.youtube-dl - => "2016.01.01" - */ - getVersion = x: - let - parse = drv: (parseDrvName drv).version; - in if isString x - then parse x - else x.version or (parse x.name); - - /* Extract name with version from URL. Ask for separator which is - supposed to start extension. - - Example: - nameFromURL "https://nixos.org/releases/nix/nix-1.7/nix-1.7-x86_64-linux.tar.bz2" "-" - => "nix" - nameFromURL "https://nixos.org/releases/nix/nix-1.7/nix-1.7-x86_64-linux.tar.bz2" "_" - => "nix-1.7-x86" - */ - nameFromURL = url: sep: - let - components = splitString "/" url; - filename = lib.last components; - name = head (splitString sep filename); - in assert name != filename; name; - - /* Create a -D= string that can be passed to typical Meson - invocations. - - Type: mesonOption :: string -> string -> string - - @param feature The feature to be set - @param value The desired value - - Example: - mesonOption "engine" "opengl" - => "-Dengine=opengl" - */ - mesonOption = feature: value: - assert (lib.isString feature); - assert (lib.isString value); - "-D${feature}=${value}"; - - /* Create a -D={true,false} string that can be passed to typical - Meson invocations. - - Type: mesonBool :: string -> bool -> string - - @param condition The condition to be made true or false - @param flag The controlling flag of the condition - - Example: - mesonBool "hardened" true - => "-Dhardened=true" - mesonBool "static" false - => "-Dstatic=false" - */ - mesonBool = condition: flag: - assert (lib.isString condition); - assert (lib.isBool flag); - mesonOption condition (lib.boolToString flag); - - /* Create a -D={enabled,disabled} string that can be passed to - typical Meson invocations. - - Type: mesonEnable :: string -> bool -> string - - @param feature The feature to be enabled or disabled - @param flag The controlling flag - - Example: - mesonEnable "docs" true - => "-Ddocs=enabled" - mesonEnable "savage" false - => "-Dsavage=disabled" - */ - mesonEnable = feature: flag: - assert (lib.isString feature); - assert (lib.isBool flag); - mesonOption feature (if flag then "enabled" else "disabled"); - - /* Create an --{enable,disable}- string that can be passed to - standard GNU Autoconf scripts. - - Example: - enableFeature true "shared" - => "--enable-shared" - enableFeature false "shared" - => "--disable-shared" - */ - enableFeature = enable: feat: - assert isString feat; # e.g. passing openssl instead of "openssl" - "--${if enable then "enable" else "disable"}-${feat}"; - - /* Create an --{enable-=,disable-} string that can be passed to - standard GNU Autoconf scripts. - - Example: - enableFeatureAs true "shared" "foo" - => "--enable-shared=foo" - enableFeatureAs false "shared" (throw "ignored") - => "--disable-shared" - */ - enableFeatureAs = enable: feat: value: enableFeature enable feat + optionalString enable "=${value}"; - - /* Create an --{with,without}- string that can be passed to - standard GNU Autoconf scripts. - - Example: - withFeature true "shared" - => "--with-shared" - withFeature false "shared" - => "--without-shared" - */ - withFeature = with_: feat: - assert isString feat; # e.g. passing openssl instead of "openssl" - "--${if with_ then "with" else "without"}-${feat}"; - - /* Create an --{with-=,without-} string that can be passed to - standard GNU Autoconf scripts. - - Example: - withFeatureAs true "shared" "foo" - => "--with-shared=foo" - withFeatureAs false "shared" (throw "ignored") - => "--without-shared" - */ - withFeatureAs = with_: feat: value: withFeature with_ feat + optionalString with_ "=${value}"; - - /* Create a fixed width string with additional prefix to match - required width. - - This function will fail if the input string is longer than the - requested length. - - Type: fixedWidthString :: int -> string -> string -> string - - Example: - fixedWidthString 5 "0" (toString 15) - => "00015" - */ - fixedWidthString = width: filler: str: - let - strw = lib.stringLength str; - reqWidth = width - (lib.stringLength filler); - in - assert lib.assertMsg (strw <= width) - "fixedWidthString: requested string length (${ - toString width}) must not be shorter than actual length (${ - toString strw})"; - if strw == width then str else filler + fixedWidthString reqWidth filler str; - - /* Format a number adding leading zeroes up to fixed width. - - Example: - fixedWidthNumber 5 15 - => "00015" - */ - fixedWidthNumber = width: n: fixedWidthString width "0" (toString n); - - /* Convert a float to a string, but emit a warning when precision is lost - during the conversion - - Example: - floatToString 0.000001 - => "0.000001" - floatToString 0.0000001 - => trace: warning: Imprecise conversion from float to string 0.000000 - "0.000000" - */ - floatToString = float: let - result = toString float; - precise = float == fromJSON result; - in lib.warnIf (!precise) "Imprecise conversion from float to string ${result}" - result; - - /* Soft-deprecated function. While the original implementation is available as - isConvertibleWithToString, consider using isStringLike instead, if suitable. */ - isCoercibleToString = lib.warnIf (lib.isInOldestRelease 2305) - "lib.strings.isCoercibleToString is deprecated in favor of either isStringLike or isConvertibleWithToString. Only use the latter if it needs to return true for null, numbers, booleans and list of similarly coercibles." - isConvertibleWithToString; - - /* Check whether a list or other value can be passed to toString. - - Many types of value are coercible to string this way, including int, float, - null, bool, list of similarly coercible values. - */ - isConvertibleWithToString = x: - isStringLike x || - elem (typeOf x) [ "null" "int" "float" "bool" ] || - (isList x && lib.all isConvertibleWithToString x); - - /* Check whether a value can be coerced to a string. - The value must be a string, path, or attribute set. - - String-like values can be used without explicit conversion in - string interpolations and in most functions that expect a string. - */ - isStringLike = x: - isString x || - isPath x || - x ? outPath || - x ? __toString; - - /* Check whether a value is a store path. - - Example: - isStorePath "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/bin/python" - => false - isStorePath "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11" - => true - isStorePath pkgs.python - => true - isStorePath [] || isStorePath 42 || isStorePath {} || … - => false - */ - isStorePath = x: - if isStringLike x then - let str = toString x; in - substring 0 1 str == "/" - && dirOf str == storeDir - else - false; - - /* Parse a string as an int. Does not support parsing of integers with preceding zero due to - ambiguity between zero-padded and octal numbers. See toIntBase10. - - Type: string -> int - - Example: - - toInt "1337" - => 1337 - - toInt "-4" - => -4 - - toInt " 123 " - => 123 - - toInt "00024" - => error: Ambiguity in interpretation of 00024 between octal and zero padded integer. - - toInt "3.14" - => error: floating point JSON numbers are not supported - */ - toInt = str: - let - # RegEx: Match any leading whitespace, possibly a '-', one or more digits, - # and finally match any trailing whitespace. - strippedInput = match "[[:space:]]*(-?[[:digit:]]+)[[:space:]]*" str; - - # RegEx: Match a leading '0' then one or more digits. - isLeadingZero = match "0[[:digit:]]+" (head strippedInput) == []; - - # Attempt to parse input - parsedInput = fromJSON (head strippedInput); - - generalError = "toInt: Could not convert ${escapeNixString str} to int."; - - octalAmbigError = "toInt: Ambiguity in interpretation of ${escapeNixString str}" - + " between octal and zero padded integer."; - - in - # Error on presence of non digit characters. - if strippedInput == null - then throw generalError - # Error on presence of leading zero/octal ambiguity. - else if isLeadingZero - then throw octalAmbigError - # Error if parse function fails. - else if !isInt parsedInput - then throw generalError - # Return result. - else parsedInput; - - - /* Parse a string as a base 10 int. This supports parsing of zero-padded integers. - - Type: string -> int - - Example: - toIntBase10 "1337" - => 1337 - - toIntBase10 "-4" - => -4 - - toIntBase10 " 123 " - => 123 - - toIntBase10 "00024" - => 24 - - toIntBase10 "3.14" - => error: floating point JSON numbers are not supported - */ - toIntBase10 = str: - let - # RegEx: Match any leading whitespace, then match any zero padding, - # capture possibly a '-' followed by one or more digits, - # and finally match any trailing whitespace. - strippedInput = match "[[:space:]]*0*(-?[[:digit:]]+)[[:space:]]*" str; - - # RegEx: Match at least one '0'. - isZero = match "0+" (head strippedInput) == []; - - # Attempt to parse input - parsedInput = fromJSON (head strippedInput); - - generalError = "toIntBase10: Could not convert ${escapeNixString str} to int."; - - in - # Error on presence of non digit characters. - if strippedInput == null - then throw generalError - # In the special case zero-padded zero (00000), return early. - else if isZero - then 0 - # Error if parse function fails. - else if !isInt parsedInput - then throw generalError - # Return result. - else parsedInput; - - /* Read a list of paths from `file`, relative to the `rootPath`. - Lines beginning with `#` are treated as comments and ignored. - Whitespace is significant. - - NOTE: This function is not performant and should be avoided. - - Example: - readPathsFromFile /prefix - ./pkgs/development/libraries/qt-5/5.4/qtbase/series - => [ "/prefix/dlopen-resolv.patch" "/prefix/tzdir.patch" - "/prefix/dlopen-libXcursor.patch" "/prefix/dlopen-openssl.patch" - "/prefix/dlopen-dbus.patch" "/prefix/xdg-config-dirs.patch" - "/prefix/nix-profiles-library-paths.patch" - "/prefix/compose-search-path.patch" ] - */ - readPathsFromFile = lib.warn "lib.readPathsFromFile is deprecated, use a list instead" - (rootPath: file: - let - lines = lib.splitString "\n" (readFile file); - removeComments = lib.filter (line: line != "" && !(lib.hasPrefix "#" line)); - relativePaths = removeComments lines; - absolutePaths = map (path: rootPath + "/${path}") relativePaths; - in - absolutePaths); - - /* Read the contents of a file removing the trailing \n - - Type: fileContents :: path -> string - - Example: - $ echo "1.0" > ./version - - fileContents ./version - => "1.0" - */ - fileContents = file: removeSuffix "\n" (readFile file); - - - /* Creates a valid derivation name from a potentially invalid one. - - Type: sanitizeDerivationName :: String -> String - - Example: - sanitizeDerivationName "../hello.bar # foo" - => "-hello.bar-foo" - sanitizeDerivationName "" - => "unknown" - sanitizeDerivationName pkgs.hello - => "-nix-store-2g75chlbpxlrqn15zlby2dfh8hr9qwbk-hello-2.10" - */ - sanitizeDerivationName = - let okRegex = match "[[:alnum:]+_?=-][[:alnum:]+._?=-]*"; - in - string: - # First detect the common case of already valid strings, to speed those up - if stringLength string <= 207 && okRegex string != null - then unsafeDiscardStringContext string - else lib.pipe string [ - # Get rid of string context. This is safe under the assumption that the - # resulting string is only used as a derivation name - unsafeDiscardStringContext - # Strip all leading "." - (x: elemAt (match "\\.*(.*)" x) 0) - # Split out all invalid characters - # https://github.com/NixOS/nix/blob/2.3.2/src/libstore/store-api.cc#L85-L112 - # https://github.com/NixOS/nix/blob/2242be83c61788b9c0736a92bb0b5c7bbfc40803/nix-rust/src/store/path.rs#L100-L125 - (split "[^[:alnum:]+._?=-]+") - # Replace invalid character ranges with a "-" - (concatMapStrings (s: if lib.isList s then "-" else s)) - # Limit to 211 characters (minus 4 chars for ".drv") - (x: substring (lib.max (stringLength x - 207) 0) (-1) x) - # If the result is empty, replace it with "unknown" - (x: if stringLength x == 0 then "unknown" else x) - ]; - - /* Computes the Levenshtein distance between two strings. - Complexity O(n*m) where n and m are the lengths of the strings. - Algorithm adjusted from https://stackoverflow.com/a/9750974/6605742 - - Type: levenshtein :: string -> string -> int - - Example: - levenshtein "foo" "foo" - => 0 - levenshtein "book" "hook" - => 1 - levenshtein "hello" "Heyo" - => 3 - */ - levenshtein = a: b: let - # Two dimensional array with dimensions (stringLength a + 1, stringLength b + 1) - arr = lib.genList (i: - lib.genList (j: - dist i j - ) (stringLength b + 1) - ) (stringLength a + 1); - d = x: y: lib.elemAt (lib.elemAt arr x) y; - dist = i: j: - let c = if substring (i - 1) 1 a == substring (j - 1) 1 b - then 0 else 1; - in - if j == 0 then i - else if i == 0 then j - else lib.min - ( lib.min (d (i - 1) j + 1) (d i (j - 1) + 1)) - ( d (i - 1) (j - 1) + c ); - in d (stringLength a) (stringLength b); - - /* Returns the length of the prefix common to both strings. - */ - commonPrefixLength = a: b: - let - m = lib.min (stringLength a) (stringLength b); - go = i: if i >= m then m else if substring i 1 a == substring i 1 b then go (i + 1) else i; - in go 0; - - /* Returns the length of the suffix common to both strings. - */ - commonSuffixLength = a: b: - let - m = lib.min (stringLength a) (stringLength b); - go = i: if i >= m then m else if substring (stringLength a - i - 1) 1 a == substring (stringLength b - i - 1) 1 b then go (i + 1) else i; - in go 0; - - /* Returns whether the levenshtein distance between two strings is at most some value - Complexity is O(min(n,m)) for k <= 2 and O(n*m) otherwise - - Type: levenshteinAtMost :: int -> string -> string -> bool - - Example: - levenshteinAtMost 0 "foo" "foo" - => true - levenshteinAtMost 1 "foo" "boa" - => false - levenshteinAtMost 2 "foo" "boa" - => true - levenshteinAtMost 2 "This is a sentence" "this is a sentense." - => false - levenshteinAtMost 3 "This is a sentence" "this is a sentense." - => true - - */ - levenshteinAtMost = let - infixDifferAtMost1 = x: y: stringLength x <= 1 && stringLength y <= 1; - - # This function takes two strings stripped by their common pre and suffix, - # and returns whether they differ by at most two by Levenshtein distance. - # Because of this stripping, if they do indeed differ by at most two edits, - # we know that those edits were (if at all) done at the start or the end, - # while the middle has to have stayed the same. This fact is used in the - # implementation. - infixDifferAtMost2 = x: y: - let - xlen = stringLength x; - ylen = stringLength y; - # This function is only called with |x| >= |y| and |x| - |y| <= 2, so - # diff is one of 0, 1 or 2 - diff = xlen - ylen; - - # Infix of x and y, stripped by the left and right most character - xinfix = substring 1 (xlen - 2) x; - yinfix = substring 1 (ylen - 2) y; - - # x and y but a character deleted at the left or right - xdelr = substring 0 (xlen - 1) x; - xdell = substring 1 (xlen - 1) x; - ydelr = substring 0 (ylen - 1) y; - ydell = substring 1 (ylen - 1) y; - in - # A length difference of 2 can only be gotten with 2 delete edits, - # which have to have happened at the start and end of x - # Example: "abcdef" -> "bcde" - if diff == 2 then xinfix == y - # A length difference of 1 can only be gotten with a deletion on the - # right and a replacement on the left or vice versa. - # Example: "abcdef" -> "bcdez" or "zbcde" - else if diff == 1 then xinfix == ydelr || xinfix == ydell - # No length difference can either happen through replacements on both - # sides, or a deletion on the left and an insertion on the right or - # vice versa - # Example: "abcdef" -> "zbcdez" or "bcdefz" or "zabcde" - else xinfix == yinfix || xdelr == ydell || xdell == ydelr; - - in k: if k <= 0 then a: b: a == b else - let f = a: b: - let - alen = stringLength a; - blen = stringLength b; - prelen = commonPrefixLength a b; - suflen = commonSuffixLength a b; - presuflen = prelen + suflen; - ainfix = substring prelen (alen - presuflen) a; - binfix = substring prelen (blen - presuflen) b; - in - # Make a be the bigger string - if alen < blen then f b a - # If a has over k more characters than b, even with k deletes on a, b can't be reached - else if alen - blen > k then false - else if k == 1 then infixDifferAtMost1 ainfix binfix - else if k == 2 then infixDifferAtMost2 ainfix binfix - else levenshtein ainfix binfix <= k; - in f; -} diff --git a/lib/systems/architectures.nix b/lib/systems/architectures.nix deleted file mode 100644 index 57b9184ca60..00000000000 --- a/lib/systems/architectures.nix +++ /dev/null @@ -1,114 +0,0 @@ -{ lib }: - -rec { - # gcc.arch to its features (as in /proc/cpuinfo) - features = { - default = [ ]; - # x86_64 Intel - westmere = [ "sse3" "ssse3" "sse4_1" "sse4_2" "aes" ]; - sandybridge = [ "sse3" "ssse3" "sse4_1" "sse4_2" "aes" "avx" ]; - ivybridge = [ "sse3" "ssse3" "sse4_1" "sse4_2" "aes" "avx" ]; - haswell = [ "sse3" "ssse3" "sse4_1" "sse4_2" "aes" "avx" "avx2" "fma" ]; - broadwell = [ "sse3" "ssse3" "sse4_1" "sse4_2" "aes" "avx" "avx2" "fma" ]; - skylake = [ "sse3" "ssse3" "sse4_1" "sse4_2" "aes" "avx" "avx2" "fma" ]; - skylake-avx512 = [ "sse3" "ssse3" "sse4_1" "sse4_2" "aes" "avx" "avx2" "avx512" "fma" ]; - cannonlake = [ "sse3" "ssse3" "sse4_1" "sse4_2" "aes" "avx" "avx2" "avx512" "fma" ]; - icelake-client = [ "sse3" "ssse3" "sse4_1" "sse4_2" "aes" "avx" "avx2" "avx512" "fma" ]; - icelake-server = [ "sse3" "ssse3" "sse4_1" "sse4_2" "aes" "avx" "avx2" "avx512" "fma" ]; - cascadelake = [ "sse3" "ssse3" "sse4_1" "sse4_2" "aes" "avx" "avx2" "avx512" "fma" ]; - cooperlake = [ "sse3" "ssse3" "sse4_1" "sse4_2" "aes" "avx" "avx2" "avx512" "fma" ]; - tigerlake = [ "sse3" "ssse3" "sse4_1" "sse4_2" "aes" "avx" "avx2" "avx512" "fma" ]; - # x86_64 AMD - btver1 = [ "sse3" "ssse3" "sse4_1" "sse4_2" ]; - btver2 = [ "sse3" "ssse3" "sse4_1" "sse4_2" "aes" "avx" ]; - bdver1 = [ "sse3" "ssse3" "sse4_1" "sse4_2" "sse4a" "aes" "avx" "fma" "fma4" ]; - bdver2 = [ "sse3" "ssse3" "sse4_1" "sse4_2" "sse4a" "aes" "avx" "fma" "fma4" ]; - bdver3 = [ "sse3" "ssse3" "sse4_1" "sse4_2" "sse4a" "aes" "avx" "fma" "fma4" ]; - bdver4 = [ "sse3" "ssse3" "sse4_1" "sse4_2" "sse4a" "aes" "avx" "avx2" "fma" "fma4" ]; - znver1 = [ "sse3" "ssse3" "sse4_1" "sse4_2" "sse4a" "aes" "avx" "avx2" "fma" ]; - znver2 = [ "sse3" "ssse3" "sse4_1" "sse4_2" "sse4a" "aes" "avx" "avx2" "fma" ]; - znver3 = [ "sse3" "ssse3" "sse4_1" "sse4_2" "sse4a" "aes" "avx" "avx2" "fma" ]; - # other - armv5te = [ ]; - armv6 = [ ]; - armv7-a = [ ]; - armv8-a = [ ]; - mips32 = [ ]; - loongson2f = [ ]; - }; - - # a superior CPU has all the features of an inferior and is able to build and test code for it - inferiors = { - # x86_64 Intel - # https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html - default = [ ]; - westmere = [ ]; - sandybridge = [ "westmere" ] ++ inferiors.westmere; - ivybridge = [ "sandybridge" ] ++ inferiors.sandybridge; - haswell = [ "ivybridge" ] ++ inferiors.ivybridge; - broadwell = [ "haswell" ] ++ inferiors.haswell; - skylake = [ "broadwell" ] ++ inferiors.broadwell; - skylake-avx512 = [ "skylake" ] ++ inferiors.skylake; - cannonlake = [ "skylake-avx512" ] ++ inferiors.skylake-avx512; - icelake-client = [ "cannonlake" ] ++ inferiors.cannonlake; - icelake-server = [ "icelake-client" ] ++ inferiors.icelake-client; - cascadelake = [ "skylake-avx512" ] ++ inferiors.cannonlake; - cooperlake = [ "cascadelake" ] ++ inferiors.cascadelake; - tigerlake = [ "icelake-server" ] ++ inferiors.icelake-server; - - # x86_64 AMD - # TODO: fill this (need testing) - btver1 = [ ]; - btver2 = [ ]; - bdver1 = [ ]; - bdver2 = [ ]; - bdver3 = [ ]; - bdver4 = [ ]; - # Regarding `skylake` as inferior of `znver1`, there are reports of - # successful usage by Gentoo users and Phoronix benchmarking of different - # `-march` targets. - # - # The GCC documentation on extensions used and wikichip documentation - # regarding supperted extensions on znver1 and skylake was used to create - # this partial order. - # - # Note: - # - # - The successors of `skylake` (`cannonlake`, `icelake`, etc) use `avx512` - # which no current AMD Zen michroarch support. - # - `znver1` uses `ABM`, `CLZERO`, `CX16`, `MWAITX`, and `SSE4A` which no - # current Intel microarch support. - # - # https://www.phoronix.com/scan.php?page=article&item=amd-znver3-gcc11&num=1 - # https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html - # https://en.wikichip.org/wiki/amd/microarchitectures/zen - # https://en.wikichip.org/wiki/intel/microarchitectures/skylake - znver1 = [ "skylake" ] ++ inferiors.skylake; - znver2 = [ "znver1" ] ++ inferiors.znver1; - znver3 = [ "znver2" ] ++ inferiors.znver2; - - # other - armv5te = [ ]; - armv6 = [ ]; - armv7-a = [ ]; - armv8-a = [ ]; - mips32 = [ ]; - loongson2f = [ ]; - }; - - predicates = let - featureSupport = feature: x: builtins.elem feature features.${x} or []; - in { - sse3Support = featureSupport "sse3"; - ssse3Support = featureSupport "ssse3"; - sse4_1Support = featureSupport "sse4_1"; - sse4_2Support = featureSupport "sse4_2"; - sse4_aSupport = featureSupport "sse4a"; - avxSupport = featureSupport "avx"; - avx2Support = featureSupport "avx2"; - avx512Support = featureSupport "avx512"; - aesSupport = featureSupport "aes"; - fmaSupport = featureSupport "fma"; - fma4Support = featureSupport "fma4"; - }; -} diff --git a/lib/systems/default.nix b/lib/systems/default.nix deleted file mode 100644 index 85e24e08d36..00000000000 --- a/lib/systems/default.nix +++ /dev/null @@ -1,226 +0,0 @@ -{ lib }: - let inherit (lib.attrsets) mapAttrs; in - -rec { - doubles = import ./doubles.nix { inherit lib; }; - parse = import ./parse.nix { inherit lib; }; - inspect = import ./inspect.nix { inherit lib; }; - platforms = import ./platforms.nix { inherit lib; }; - examples = import ./examples.nix { inherit lib; }; - architectures = import ./architectures.nix { inherit lib; }; - - /* List of all Nix system doubles the nixpkgs flake will expose the package set - for. All systems listed here must be supported by nixpkgs as `localSystem`. - - **Warning**: This attribute is considered experimental and is subject to change. - */ - flakeExposed = import ./flake-systems.nix { }; - - # Elaborate a `localSystem` or `crossSystem` so that it contains everything - # necessary. - # - # `parsed` is inferred from args, both because there are two options with one - # clearly preferred, and to prevent cycles. A simpler fixed point where the RHS - # always just used `final.*` would fail on both counts. - elaborate = args': let - args = if lib.isString args' then { system = args'; } - else args'; - final = { - # Prefer to parse `config` as it is strictly more informative. - parsed = parse.mkSystemFromString (if args ? config then args.config else args.system); - # Either of these can be losslessly-extracted from `parsed` iff parsing succeeds. - system = parse.doubleFromSystem final.parsed; - config = parse.tripleFromSystem final.parsed; - # Determine whether we can execute binaries built for the provided platform. - canExecute = platform: - final.isAndroid == platform.isAndroid && - parse.isCompatible final.parsed.cpu platform.parsed.cpu - && final.parsed.kernel == platform.parsed.kernel; - isCompatible = _: throw "2022-05-23: isCompatible has been removed in favor of canExecute, refer to the 22.11 changelog for details"; - # Derived meta-data - libc = - /**/ if final.isDarwin then "libSystem" - else if final.isMinGW then "msvcrt" - else if final.isWasi then "wasilibc" - else if final.isRedox then "relibc" - else if final.isMusl then "musl" - else if final.isUClibc then "uclibc" - else if final.isAndroid then "bionic" - else if final.isLinux /* default */ then "glibc" - else if final.isFreeBSD then "fblibc" - else if final.isNetBSD then "nblibc" - else if final.isAvr then "avrlibc" - else if final.isNone then "newlib" - # TODO(@Ericson2314) think more about other operating systems - else "native/impure"; - # Choose what linker we wish to use by default. Someday we might also - # choose the C compiler, runtime library, C++ standard library, etc. in - # this way, nice and orthogonally, and deprecate `useLLVM`. But due to - # the monolithic GCC build we cannot actually make those choices - # independently, so we are just doing `linker` and keeping `useLLVM` for - # now. - linker = - /**/ if final.useLLVM or false then "lld" - else if final.isDarwin then "cctools" - # "bfd" and "gold" both come from GNU binutils. The existence of Gold - # is why we use the more obscure "bfd" and not "binutils" for this - # choice. - else "bfd"; - extensions = rec { - sharedLibrary = - /**/ if final.isDarwin then ".dylib" - else if final.isWindows then ".dll" - else ".so"; - staticLibrary = - /**/ if final.isWindows then ".lib" - else ".a"; - library = - /**/ if final.isStatic then staticLibrary - else sharedLibrary; - executable = - /**/ if final.isWindows then ".exe" - else ""; - }; - # Misc boolean options - useAndroidPrebuilt = false; - useiOSPrebuilt = false; - - # Output from uname - uname = { - # uname -s - system = { - linux = "Linux"; - windows = "Windows"; - darwin = "Darwin"; - netbsd = "NetBSD"; - freebsd = "FreeBSD"; - openbsd = "OpenBSD"; - wasi = "Wasi"; - redox = "Redox"; - genode = "Genode"; - }.${final.parsed.kernel.name} or null; - - # uname -m - processor = - if final.isPower64 - then "ppc64${lib.optionalString final.isLittleEndian "le"}" - else if final.isPower - then "ppc${lib.optionalString final.isLittleEndian "le"}" - else if final.isMips64 - then "mips64" # endianness is *not* included on mips64 - else final.parsed.cpu.name; - - # uname -r - release = null; - }; - isStatic = final.isWasm || final.isRedox; - - # Just a guess, based on `system` - inherit - ({ - linux-kernel = args.linux-kernel or {}; - gcc = args.gcc or {}; - rustc = args.rust or {}; - } // platforms.select final) - linux-kernel gcc rustc; - - linuxArch = - if final.isAarch32 then "arm" - else if final.isAarch64 then "arm64" - else if final.isx86_32 then "i386" - else if final.isx86_64 then "x86_64" - # linux kernel does not distinguish microblaze/microblazeel - else if final.isMicroBlaze then "microblaze" - else if final.isMips32 then "mips" - else if final.isMips64 then "mips" # linux kernel does not distinguish mips32/mips64 - else if final.isPower then "powerpc" - else if final.isRiscV then "riscv" - else if final.isS390 then "s390" - else if final.isLoongArch64 then "loongarch" - else final.parsed.cpu.name; - - qemuArch = - if final.isAarch32 then "arm" - else if final.isS390 && !final.isS390x then null - else if final.isx86_64 then "x86_64" - else if final.isx86 then "i386" - else final.uname.processor; - - # Name used by UEFI for architectures. - efiArch = - if final.isx86_32 then "ia32" - else if final.isx86_64 then "x64" - else if final.isAarch32 then "arm" - else if final.isAarch64 then "aa64" - else final.parsed.cpu.name; - - darwinArch = { - armv7a = "armv7"; - aarch64 = "arm64"; - }.${final.parsed.cpu.name} or final.parsed.cpu.name; - - darwinPlatform = - if final.isMacOS then "macos" - else if final.isiOS then "ios" - else null; - # The canonical name for this attribute is darwinSdkVersion, but some - # platforms define the old name "sdkVer". - darwinSdkVersion = final.sdkVer or (if final.isAarch64 then "11.0" else "10.12"); - darwinMinVersion = final.darwinSdkVersion; - darwinMinVersionVariable = - if final.isMacOS then "MACOSX_DEPLOYMENT_TARGET" - else if final.isiOS then "IPHONEOS_DEPLOYMENT_TARGET" - else null; - } // ( - let - selectEmulator = pkgs: - let - qemu-user = pkgs.qemu.override { - smartcardSupport = false; - spiceSupport = false; - openGLSupport = false; - virglSupport = false; - vncSupport = false; - gtkSupport = false; - sdlSupport = false; - pulseSupport = false; - smbdSupport = false; - seccompSupport = false; - enableDocs = false; - hostCpuTargets = [ "${final.qemuArch}-linux-user" ]; - }; - wine = (pkgs.winePackagesFor "wine${toString final.parsed.cpu.bits}").minimal; - in - if final.parsed.kernel.name == pkgs.stdenv.hostPlatform.parsed.kernel.name && - pkgs.stdenv.hostPlatform.canExecute final - then "${pkgs.runtimeShell} -c '\"$@\"' --" - else if final.isWindows - then "${wine}/bin/wine${lib.optionalString (final.parsed.cpu.bits == 64) "64"}" - else if final.isLinux && pkgs.stdenv.hostPlatform.isLinux && final.qemuArch != null - then "${qemu-user}/bin/qemu-${final.qemuArch}" - else if final.isWasi - then "${pkgs.wasmtime}/bin/wasmtime" - else if final.isMmix - then "${pkgs.mmixware}/bin/mmix" - else null; - in { - emulatorAvailable = pkgs: (selectEmulator pkgs) != null; - - emulator = pkgs: - if (final.emulatorAvailable pkgs) - then selectEmulator pkgs - else throw "Don't know how to run ${final.config} executables."; - - }) // mapAttrs (n: v: v final.parsed) inspect.predicates - // mapAttrs (n: v: v final.gcc.arch or "default") architectures.predicates - // args; - in assert final.useAndroidPrebuilt -> final.isAndroid; - assert lib.foldl - (pass: { assertion, message }: - if assertion final - then pass - else throw message) - true - (final.parsed.abi.assertions or []); - final; -} diff --git a/lib/systems/doubles.nix b/lib/systems/doubles.nix deleted file mode 100644 index 6d2f015674e..00000000000 --- a/lib/systems/doubles.nix +++ /dev/null @@ -1,119 +0,0 @@ -{ lib }: -let - inherit (lib) lists; - inherit (lib.systems) parse; - inherit (lib.systems.inspect) predicates; - inherit (lib.attrsets) matchAttrs; - - all = [ - # Cygwin - "i686-cygwin" "x86_64-cygwin" - - # Darwin - "x86_64-darwin" "i686-darwin" "aarch64-darwin" "armv7a-darwin" - - # FreeBSD - "i686-freebsd13" "x86_64-freebsd13" - - # Genode - "aarch64-genode" "i686-genode" "x86_64-genode" - - # illumos - "x86_64-solaris" - - # JS - "javascript-ghcjs" - - # Linux - "aarch64-linux" "armv5tel-linux" "armv6l-linux" "armv7a-linux" - "armv7l-linux" "i686-linux" "loongarch64-linux" "m68k-linux" "microblaze-linux" - "microblazeel-linux" "mipsel-linux" "mips64el-linux" "powerpc64-linux" - "powerpc64le-linux" "riscv32-linux" "riscv64-linux" "s390-linux" - "s390x-linux" "x86_64-linux" - - # MMIXware - "mmix-mmixware" - - # NetBSD - "aarch64-netbsd" "armv6l-netbsd" "armv7a-netbsd" "armv7l-netbsd" - "i686-netbsd" "m68k-netbsd" "mipsel-netbsd" "powerpc-netbsd" - "riscv32-netbsd" "riscv64-netbsd" "x86_64-netbsd" - - # none - "aarch64_be-none" "aarch64-none" "arm-none" "armv6l-none" "avr-none" "i686-none" - "microblaze-none" "microblazeel-none" "msp430-none" "or1k-none" "m68k-none" - "powerpc-none" "powerpcle-none" "riscv32-none" "riscv64-none" "rx-none" - "s390-none" "s390x-none" "vc4-none" "x86_64-none" - - # OpenBSD - "i686-openbsd" "x86_64-openbsd" - - # Redox - "x86_64-redox" - - # WASI - "wasm64-wasi" "wasm32-wasi" - - # Windows - "x86_64-windows" "i686-windows" - ]; - - allParsed = map parse.mkSystemFromString all; - - filterDoubles = f: map parse.doubleFromSystem (lists.filter f allParsed); - -in { - inherit all; - - none = []; - - arm = filterDoubles predicates.isAarch32; - armv7 = filterDoubles predicates.isArmv7; - aarch64 = filterDoubles predicates.isAarch64; - x86 = filterDoubles predicates.isx86; - i686 = filterDoubles predicates.isi686; - x86_64 = filterDoubles predicates.isx86_64; - microblaze = filterDoubles predicates.isMicroBlaze; - mips = filterDoubles predicates.isMips; - mmix = filterDoubles predicates.isMmix; - power = filterDoubles predicates.isPower; - riscv = filterDoubles predicates.isRiscV; - riscv32 = filterDoubles predicates.isRiscV32; - riscv64 = filterDoubles predicates.isRiscV64; - rx = filterDoubles predicates.isRx; - vc4 = filterDoubles predicates.isVc4; - or1k = filterDoubles predicates.isOr1k; - m68k = filterDoubles predicates.isM68k; - s390 = filterDoubles predicates.isS390; - s390x = filterDoubles predicates.isS390x; - loongarch64 = filterDoubles predicates.isLoongArch64; - js = filterDoubles predicates.isJavaScript; - - bigEndian = filterDoubles predicates.isBigEndian; - littleEndian = filterDoubles predicates.isLittleEndian; - - cygwin = filterDoubles predicates.isCygwin; - darwin = filterDoubles predicates.isDarwin; - freebsd = filterDoubles predicates.isFreeBSD; - # Should be better, but MinGW is unclear. - gnu = filterDoubles (matchAttrs { kernel = parse.kernels.linux; abi = parse.abis.gnu; }) - ++ filterDoubles (matchAttrs { kernel = parse.kernels.linux; abi = parse.abis.gnueabi; }) - ++ filterDoubles (matchAttrs { kernel = parse.kernels.linux; abi = parse.abis.gnueabihf; }) - ++ filterDoubles (matchAttrs { kernel = parse.kernels.linux; abi = parse.abis.gnuabin32; }) - ++ filterDoubles (matchAttrs { kernel = parse.kernels.linux; abi = parse.abis.gnuabi64; }) - ++ filterDoubles (matchAttrs { kernel = parse.kernels.linux; abi = parse.abis.gnuabielfv1; }) - ++ filterDoubles (matchAttrs { kernel = parse.kernels.linux; abi = parse.abis.gnuabielfv2; }); - illumos = filterDoubles predicates.isSunOS; - linux = filterDoubles predicates.isLinux; - netbsd = filterDoubles predicates.isNetBSD; - openbsd = filterDoubles predicates.isOpenBSD; - unix = filterDoubles predicates.isUnix; - wasi = filterDoubles predicates.isWasi; - redox = filterDoubles predicates.isRedox; - windows = filterDoubles predicates.isWindows; - genode = filterDoubles predicates.isGenode; - - embedded = filterDoubles predicates.isNone; - - mesaPlatforms = ["i686-linux" "x86_64-linux" "x86_64-darwin" "armv5tel-linux" "armv6l-linux" "armv7l-linux" "armv7a-linux" "aarch64-linux" "powerpc64-linux" "powerpc64le-linux" "aarch64-darwin" "riscv64-linux"]; -} diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix deleted file mode 100644 index 3ae5d6ffd47..00000000000 --- a/lib/systems/examples.nix +++ /dev/null @@ -1,341 +0,0 @@ -# These can be passed to nixpkgs as either the `localSystem` or -# `crossSystem`. They are put here for user convenience, but also used by cross -# tests and linux cross stdenv building, so handle with care! -{ lib }: -let - platforms = import ./platforms.nix { inherit lib; }; - - riscv = bits: { - config = "riscv${bits}-unknown-linux-gnu"; - }; -in - -rec { - # - # Linux - # - powernv = { - config = "powerpc64le-unknown-linux-gnu"; - }; - musl-power = { - config = "powerpc64le-unknown-linux-musl"; - }; - - ppc64 = { - config = "powerpc64-unknown-linux-gnuabielfv2"; - }; - ppc64-musl = { - config = "powerpc64-unknown-linux-musl"; - gcc = { abi = "elfv2"; }; - }; - - sheevaplug = { - config = "armv5tel-unknown-linux-gnueabi"; - } // platforms.sheevaplug; - - raspberryPi = { - config = "armv6l-unknown-linux-gnueabihf"; - } // platforms.raspberrypi; - - remarkable1 = { - config = "armv7l-unknown-linux-gnueabihf"; - } // platforms.zero-gravitas; - - remarkable2 = { - config = "armv7l-unknown-linux-gnueabihf"; - } // platforms.zero-sugar; - - armv7l-hf-multiplatform = { - config = "armv7l-unknown-linux-gnueabihf"; - }; - - aarch64-multiplatform = { - config = "aarch64-unknown-linux-gnu"; - }; - - armv7a-android-prebuilt = { - config = "armv7a-unknown-linux-androideabi"; - rustc.config = "armv7-linux-androideabi"; - sdkVer = "28"; - ndkVer = "24"; - useAndroidPrebuilt = true; - } // platforms.armv7a-android; - - aarch64-android-prebuilt = { - config = "aarch64-unknown-linux-android"; - rustc.config = "aarch64-linux-android"; - sdkVer = "28"; - ndkVer = "24"; - useAndroidPrebuilt = true; - }; - - aarch64-android = { - config = "aarch64-unknown-linux-android"; - sdkVer = "30"; - ndkVer = "24"; - libc = "bionic"; - useAndroidPrebuilt = false; - useLLVM = true; - }; - - pogoplug4 = { - config = "armv5tel-unknown-linux-gnueabi"; - } // platforms.pogoplug4; - - ben-nanonote = { - config = "mipsel-unknown-linux-uclibc"; - } // platforms.ben_nanonote; - - fuloongminipc = { - config = "mipsel-unknown-linux-gnu"; - } // platforms.fuloong2f_n32; - - loongarch64-linux = { - config = "loongarch64-unknown-linux-gnu"; - }; - - # can execute on 32bit chip - mips-linux-gnu = { config = "mips-unknown-linux-gnu"; } // platforms.gcc_mips32r2_o32; - mipsel-linux-gnu = { config = "mipsel-unknown-linux-gnu"; } // platforms.gcc_mips32r2_o32; - mipsisa32r6-linux-gnu = { config = "mipsisa32r6-unknown-linux-gnu"; } // platforms.gcc_mips32r6_o32; - mipsisa32r6el-linux-gnu = { config = "mipsisa32r6el-unknown-linux-gnu"; } // platforms.gcc_mips32r6_o32; - - # require 64bit chip (for more registers, 64-bit floating point, 64-bit "long long") but use 32bit pointers - mips64-linux-gnuabin32 = { config = "mips64-unknown-linux-gnuabin32"; } // platforms.gcc_mips64r2_n32; - mips64el-linux-gnuabin32 = { config = "mips64el-unknown-linux-gnuabin32"; } // platforms.gcc_mips64r2_n32; - mipsisa64r6-linux-gnuabin32 = { config = "mipsisa64r6-unknown-linux-gnuabin32"; } // platforms.gcc_mips64r6_n32; - mipsisa64r6el-linux-gnuabin32 = { config = "mipsisa64r6el-unknown-linux-gnuabin32"; } // platforms.gcc_mips64r6_n32; - - # 64bit pointers - mips64-linux-gnuabi64 = { config = "mips64-unknown-linux-gnuabi64"; } // platforms.gcc_mips64r2_64; - mips64el-linux-gnuabi64 = { config = "mips64el-unknown-linux-gnuabi64"; } // platforms.gcc_mips64r2_64; - mipsisa64r6-linux-gnuabi64 = { config = "mipsisa64r6-unknown-linux-gnuabi64"; } // platforms.gcc_mips64r6_64; - mipsisa64r6el-linux-gnuabi64 = { config = "mipsisa64r6el-unknown-linux-gnuabi64"; } // platforms.gcc_mips64r6_64; - - muslpi = raspberryPi // { - config = "armv6l-unknown-linux-musleabihf"; - }; - - aarch64-multiplatform-musl = { - config = "aarch64-unknown-linux-musl"; - }; - - gnu64 = { config = "x86_64-unknown-linux-gnu"; }; - gnu32 = { config = "i686-unknown-linux-gnu"; }; - - musl64 = { config = "x86_64-unknown-linux-musl"; }; - musl32 = { config = "i686-unknown-linux-musl"; }; - - riscv64 = riscv "64"; - riscv32 = riscv "32"; - - riscv64-embedded = { - config = "riscv64-none-elf"; - libc = "newlib"; - }; - - riscv32-embedded = { - config = "riscv32-none-elf"; - libc = "newlib"; - }; - - mmix = { - config = "mmix-unknown-mmixware"; - libc = "newlib"; - }; - - rx-embedded = { - config = "rx-none-elf"; - libc = "newlib"; - }; - - msp430 = { - config = "msp430-elf"; - libc = "newlib"; - }; - - avr = { - config = "avr"; - }; - - vc4 = { - config = "vc4-elf"; - libc = "newlib"; - }; - - or1k = { - config = "or1k-elf"; - libc = "newlib"; - }; - - m68k = { - config = "m68k-unknown-linux-gnu"; - }; - - s390 = { - config = "s390-unknown-linux-gnu"; - }; - - s390x = { - config = "s390x-unknown-linux-gnu"; - }; - - arm-embedded = { - config = "arm-none-eabi"; - libc = "newlib"; - }; - armhf-embedded = { - config = "arm-none-eabihf"; - libc = "newlib"; - # GCC8+ does not build without this - # (https://www.mail-archive.com/gcc-bugs@gcc.gnu.org/msg552339.html): - gcc = { - arch = "armv5t"; - fpu = "vfp"; - }; - }; - - aarch64-embedded = { - config = "aarch64-none-elf"; - libc = "newlib"; - }; - - aarch64be-embedded = { - config = "aarch64_be-none-elf"; - libc = "newlib"; - }; - - ppc-embedded = { - config = "powerpc-none-eabi"; - libc = "newlib"; - }; - - ppcle-embedded = { - config = "powerpcle-none-eabi"; - libc = "newlib"; - }; - - i686-embedded = { - config = "i686-elf"; - libc = "newlib"; - }; - - x86_64-embedded = { - config = "x86_64-elf"; - libc = "newlib"; - }; - - # - # Redox - # - - x86_64-unknown-redox = { - config = "x86_64-unknown-redox"; - libc = "relibc"; - }; - - # - # Darwin - # - - iphone64 = { - config = "aarch64-apple-ios"; - # config = "aarch64-apple-darwin14"; - sdkVer = "14.3"; - xcodeVer = "12.3"; - xcodePlatform = "iPhoneOS"; - useiOSPrebuilt = true; - }; - - iphone32 = { - config = "armv7a-apple-ios"; - # config = "arm-apple-darwin10"; - sdkVer = "14.3"; - xcodeVer = "12.3"; - xcodePlatform = "iPhoneOS"; - useiOSPrebuilt = true; - }; - - iphone64-simulator = { - config = "x86_64-apple-ios"; - # config = "x86_64-apple-darwin14"; - sdkVer = "14.3"; - xcodeVer = "12.3"; - xcodePlatform = "iPhoneSimulator"; - darwinPlatform = "ios-simulator"; - useiOSPrebuilt = true; - }; - - iphone32-simulator = { - config = "i686-apple-ios"; - # config = "i386-apple-darwin11"; - sdkVer = "14.3"; - xcodeVer = "12.3"; - xcodePlatform = "iPhoneSimulator"; - darwinPlatform = "ios-simulator"; - useiOSPrebuilt = true; - }; - - aarch64-darwin = { - config = "aarch64-apple-darwin"; - xcodePlatform = "MacOSX"; - platform = {}; - }; - - x86_64-darwin = { - config = "x86_64-apple-darwin"; - xcodePlatform = "MacOSX"; - platform = {}; - }; - - # - # Windows - # - - # 32 bit mingw-w64 - mingw32 = { - config = "i686-w64-mingw32"; - libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain - }; - - # 64 bit mingw-w64 - mingwW64 = { - # That's the triplet they use in the mingw-w64 docs. - config = "x86_64-w64-mingw32"; - libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain - }; - - # BSDs - - x86_64-freebsd = { - config = "x86_64-unknown-freebsd13"; - useLLVM = true; - }; - - x86_64-netbsd = { - config = "x86_64-unknown-netbsd"; - }; - - # this is broken and never worked fully - x86_64-netbsd-llvm = { - config = "x86_64-unknown-netbsd"; - useLLVM = true; - }; - - # - # WASM - # - - wasi32 = { - config = "wasm32-unknown-wasi"; - useLLVM = true; - }; - - # Ghcjs - ghcjs = { - # This triple is special to GHC/Cabal/GHCJS and not recognized by autotools - # See: https://gitlab.haskell.org/ghc/ghc/-/commit/6636b670233522f01d002c9b97827d00289dbf5c - # https://github.com/ghcjs/ghcjs/issues/53 - config = "javascript-unknown-ghcjs"; - }; -} diff --git a/lib/systems/flake-systems.nix b/lib/systems/flake-systems.nix deleted file mode 100644 index b1988c6a4fb..00000000000 --- a/lib/systems/flake-systems.nix +++ /dev/null @@ -1,29 +0,0 @@ -# See [RFC 46] for mandated platform support and ../../pkgs/stdenv for -# implemented platform support. This list is mainly descriptive, i.e. all -# system doubles for platforms where nixpkgs can do native compilation -# reasonably well are included. -# -# [RFC 46]: https://github.com/NixOS/rfcs/blob/master/rfcs/0046-platform-support-tiers.md -{ }: - -[ - # Tier 1 - "x86_64-linux" - # Tier 2 - "aarch64-linux" - "x86_64-darwin" - # Tier 3 - "armv6l-linux" - "armv7l-linux" - "i686-linux" - "mipsel-linux" - - # Other platforms with sufficient support in stdenv which is not formally - # mandated by their platform tier. - "aarch64-darwin" - "armv5tel-linux" - "powerpc64le-linux" - "riscv64-linux" - - # "x86_64-freebsd" is excluded because it is mostly broken -] diff --git a/lib/systems/inspect.nix b/lib/systems/inspect.nix deleted file mode 100644 index 89e9f4231d9..00000000000 --- a/lib/systems/inspect.nix +++ /dev/null @@ -1,117 +0,0 @@ -{ lib }: -with import ./parse.nix { inherit lib; }; -with lib.attrsets; -with lib.lists; - -let abis_ = abis; in -let abis = lib.mapAttrs (_: abi: builtins.removeAttrs abi [ "assertions" ]) abis_; in - -rec { - # these patterns are to be matched against {host,build,target}Platform.parsed - patterns = rec { - # The patterns below are lists in sum-of-products form. - # - # Each attribute is list of product conditions; non-list values are treated - # as a singleton list. If *any* product condition in the list matches then - # the predicate matches. Each product condition is tested by - # `lib.attrsets.matchAttrs`, which requires a match on *all* attributes of - # the product. - - isi686 = { cpu = cpuTypes.i686; }; - isx86_32 = { cpu = { family = "x86"; bits = 32; }; }; - isx86_64 = { cpu = { family = "x86"; bits = 64; }; }; - isPower = { cpu = { family = "power"; }; }; - isPower64 = { cpu = { family = "power"; bits = 64; }; }; - # This ABI is the default in NixOS PowerPC64 BE, but not on mainline GCC, - # so it sometimes causes issues in certain packages that makes the wrong - # assumption on the used ABI. - isAbiElfv2 = [ - { abi = { abi = "elfv2"; }; } - { abi = { name = "musl"; }; cpu = { family = "power"; bits = 64; }; } - ]; - isx86 = { cpu = { family = "x86"; }; }; - isAarch32 = { cpu = { family = "arm"; bits = 32; }; }; - isArmv7 = map ({ arch, ... }: { cpu = { inherit arch; }; }) - (lib.filter (cpu: lib.hasPrefix "armv7" cpu.arch or "") - (lib.attrValues cpuTypes)); - isAarch64 = { cpu = { family = "arm"; bits = 64; }; }; - isAarch = { cpu = { family = "arm"; }; }; - isMicroBlaze = { cpu = { family = "microblaze"; }; }; - isMips = { cpu = { family = "mips"; }; }; - isMips32 = { cpu = { family = "mips"; bits = 32; }; }; - isMips64 = { cpu = { family = "mips"; bits = 64; }; }; - isMips64n32 = { cpu = { family = "mips"; bits = 64; }; abi = { abi = "n32"; }; }; - isMips64n64 = { cpu = { family = "mips"; bits = 64; }; abi = { abi = "64"; }; }; - isMmix = { cpu = { family = "mmix"; }; }; - isRiscV = { cpu = { family = "riscv"; }; }; - isRiscV32 = { cpu = { family = "riscv"; bits = 32; }; }; - isRiscV64 = { cpu = { family = "riscv"; bits = 64; }; }; - isRx = { cpu = { family = "rx"; }; }; - isSparc = { cpu = { family = "sparc"; }; }; - isWasm = { cpu = { family = "wasm"; }; }; - isMsp430 = { cpu = { family = "msp430"; }; }; - isVc4 = { cpu = { family = "vc4"; }; }; - isAvr = { cpu = { family = "avr"; }; }; - isAlpha = { cpu = { family = "alpha"; }; }; - isOr1k = { cpu = { family = "or1k"; }; }; - isM68k = { cpu = { family = "m68k"; }; }; - isS390 = { cpu = { family = "s390"; }; }; - isS390x = { cpu = { family = "s390"; bits = 64; }; }; - isLoongArch64 = { cpu = { family = "loongarch"; bits = 64; }; }; - isJavaScript = { cpu = cpuTypes.javascript; }; - - is32bit = { cpu = { bits = 32; }; }; - is64bit = { cpu = { bits = 64; }; }; - isILP32 = map (a: { abi = { abi = a; }; }) [ "n32" "ilp32" "x32" ]; - isBigEndian = { cpu = { significantByte = significantBytes.bigEndian; }; }; - isLittleEndian = { cpu = { significantByte = significantBytes.littleEndian; }; }; - - isBSD = { kernel = { families = { inherit (kernelFamilies) bsd; }; }; }; - isDarwin = { kernel = { families = { inherit (kernelFamilies) darwin; }; }; }; - isUnix = [ isBSD isDarwin isLinux isSunOS isCygwin isRedox ]; - - isMacOS = { kernel = kernels.macos; }; - isiOS = { kernel = kernels.ios; }; - isLinux = { kernel = kernels.linux; }; - isSunOS = { kernel = kernels.solaris; }; - isFreeBSD = { kernel = { name = "freebsd"; }; }; - isNetBSD = { kernel = kernels.netbsd; }; - isOpenBSD = { kernel = kernels.openbsd; }; - isWindows = { kernel = kernels.windows; }; - isCygwin = { kernel = kernels.windows; abi = abis.cygnus; }; - isMinGW = { kernel = kernels.windows; abi = abis.gnu; }; - isWasi = { kernel = kernels.wasi; }; - isRedox = { kernel = kernels.redox; }; - isGhcjs = { kernel = kernels.ghcjs; }; - isGenode = { kernel = kernels.genode; }; - isNone = { kernel = kernels.none; }; - - isAndroid = [ { abi = abis.android; } { abi = abis.androideabi; } ]; - isGnu = with abis; map (a: { abi = a; }) [ gnuabi64 gnu gnueabi gnueabihf gnuabielfv1 gnuabielfv2 ]; - isMusl = with abis; map (a: { abi = a; }) [ musl musleabi musleabihf muslabin32 muslabi64 ]; - isUClibc = with abis; map (a: { abi = a; }) [ uclibc uclibceabi uclibceabihf ]; - - isEfi = [ - { cpu = { family = "arm"; version = "6"; }; } - { cpu = { family = "arm"; version = "7"; }; } - { cpu = { family = "arm"; version = "8"; }; } - { cpu = { family = "riscv"; }; } - { cpu = { family = "x86"; }; } - ]; - }; - - matchAnyAttrs = patterns: - if builtins.isList patterns then attrs: any (pattern: matchAttrs pattern attrs) patterns - else matchAttrs patterns; - - predicates = mapAttrs (_: matchAnyAttrs) patterns; - - # these patterns are to be matched against the entire - # {host,build,target}Platform structure; they include a `parsed={}` marker so - # that `lib.meta.availableOn` can distinguish them from the patterns which - # apply only to the `parsed` field. - - platformPatterns = mapAttrs (_: p: { parsed = {}; } // p) { - isStatic = { isStatic = true; }; - }; -} diff --git a/lib/systems/parse.nix b/lib/systems/parse.nix deleted file mode 100644 index ea8e1ff8fcf..00000000000 --- a/lib/systems/parse.nix +++ /dev/null @@ -1,507 +0,0 @@ -# Define the list of system with their properties. -# -# See https://clang.llvm.org/docs/CrossCompilation.html and -# http://llvm.org/docs/doxygen/html/Triple_8cpp_source.html especially -# Triple::normalize. Parsing should essentially act as a more conservative -# version of that last function. -# -# Most of the types below come in "open" and "closed" pairs. The open ones -# specify what information we need to know about systems in general, and the -# closed ones are sub-types representing the whitelist of systems we support in -# practice. -# -# Code in the remainder of nixpkgs shouldn't rely on the closed ones in -# e.g. exhaustive cases. Its more a sanity check to make sure nobody defines -# systems that overlap with existing ones and won't notice something amiss. -# -{ lib }: -with lib.lists; -with lib.types; -with lib.attrsets; -with lib.strings; -with (import ./inspect.nix { inherit lib; }).predicates; - -let - inherit (lib.options) mergeOneOption; - - setTypes = type: - mapAttrs (name: value: - assert type.check value; - setType type.name ({ inherit name; } // value)); - -in - -rec { - - ################################################################################ - - types.openSignificantByte = mkOptionType { - name = "significant-byte"; - description = "Endianness"; - merge = mergeOneOption; - }; - - types.significantByte = enum (attrValues significantBytes); - - significantBytes = setTypes types.openSignificantByte { - bigEndian = {}; - littleEndian = {}; - }; - - ################################################################################ - - # Reasonable power of 2 - types.bitWidth = enum [ 8 16 32 64 128 ]; - - ################################################################################ - - types.openCpuType = mkOptionType { - name = "cpu-type"; - description = "instruction set architecture name and information"; - merge = mergeOneOption; - check = x: types.bitWidth.check x.bits - && (if 8 < x.bits - then types.significantByte.check x.significantByte - else !(x ? significantByte)); - }; - - types.cpuType = enum (attrValues cpuTypes); - - cpuTypes = with significantBytes; setTypes types.openCpuType { - arm = { bits = 32; significantByte = littleEndian; family = "arm"; }; - armv5tel = { bits = 32; significantByte = littleEndian; family = "arm"; version = "5"; arch = "armv5t"; }; - armv6m = { bits = 32; significantByte = littleEndian; family = "arm"; version = "6"; arch = "armv6-m"; }; - armv6l = { bits = 32; significantByte = littleEndian; family = "arm"; version = "6"; arch = "armv6"; }; - armv7a = { bits = 32; significantByte = littleEndian; family = "arm"; version = "7"; arch = "armv7-a"; }; - armv7r = { bits = 32; significantByte = littleEndian; family = "arm"; version = "7"; arch = "armv7-r"; }; - armv7m = { bits = 32; significantByte = littleEndian; family = "arm"; version = "7"; arch = "armv7-m"; }; - armv7l = { bits = 32; significantByte = littleEndian; family = "arm"; version = "7"; arch = "armv7"; }; - armv8a = { bits = 32; significantByte = littleEndian; family = "arm"; version = "8"; arch = "armv8-a"; }; - armv8r = { bits = 32; significantByte = littleEndian; family = "arm"; version = "8"; arch = "armv8-a"; }; - armv8m = { bits = 32; significantByte = littleEndian; family = "arm"; version = "8"; arch = "armv8-m"; }; - aarch64 = { bits = 64; significantByte = littleEndian; family = "arm"; version = "8"; arch = "armv8-a"; }; - aarch64_be = { bits = 64; significantByte = bigEndian; family = "arm"; version = "8"; arch = "armv8-a"; }; - - i386 = { bits = 32; significantByte = littleEndian; family = "x86"; arch = "i386"; }; - i486 = { bits = 32; significantByte = littleEndian; family = "x86"; arch = "i486"; }; - i586 = { bits = 32; significantByte = littleEndian; family = "x86"; arch = "i586"; }; - i686 = { bits = 32; significantByte = littleEndian; family = "x86"; arch = "i686"; }; - x86_64 = { bits = 64; significantByte = littleEndian; family = "x86"; arch = "x86-64"; }; - - microblaze = { bits = 32; significantByte = bigEndian; family = "microblaze"; }; - microblazeel = { bits = 32; significantByte = littleEndian; family = "microblaze"; }; - - mips = { bits = 32; significantByte = bigEndian; family = "mips"; }; - mipsel = { bits = 32; significantByte = littleEndian; family = "mips"; }; - mipsisa32r6 = { bits = 32; significantByte = bigEndian; family = "mips"; }; - mipsisa32r6el = { bits = 32; significantByte = littleEndian; family = "mips"; }; - mips64 = { bits = 64; significantByte = bigEndian; family = "mips"; }; - mips64el = { bits = 64; significantByte = littleEndian; family = "mips"; }; - mipsisa64r6 = { bits = 64; significantByte = bigEndian; family = "mips"; }; - mipsisa64r6el = { bits = 64; significantByte = littleEndian; family = "mips"; }; - - mmix = { bits = 64; significantByte = bigEndian; family = "mmix"; }; - - m68k = { bits = 32; significantByte = bigEndian; family = "m68k"; }; - - powerpc = { bits = 32; significantByte = bigEndian; family = "power"; }; - powerpc64 = { bits = 64; significantByte = bigEndian; family = "power"; }; - powerpc64le = { bits = 64; significantByte = littleEndian; family = "power"; }; - powerpcle = { bits = 32; significantByte = littleEndian; family = "power"; }; - - riscv32 = { bits = 32; significantByte = littleEndian; family = "riscv"; }; - riscv64 = { bits = 64; significantByte = littleEndian; family = "riscv"; }; - - s390 = { bits = 32; significantByte = bigEndian; family = "s390"; }; - s390x = { bits = 64; significantByte = bigEndian; family = "s390"; }; - - sparc = { bits = 32; significantByte = bigEndian; family = "sparc"; }; - sparc64 = { bits = 64; significantByte = bigEndian; family = "sparc"; }; - - wasm32 = { bits = 32; significantByte = littleEndian; family = "wasm"; }; - wasm64 = { bits = 64; significantByte = littleEndian; family = "wasm"; }; - - alpha = { bits = 64; significantByte = littleEndian; family = "alpha"; }; - - rx = { bits = 32; significantByte = littleEndian; family = "rx"; }; - msp430 = { bits = 16; significantByte = littleEndian; family = "msp430"; }; - avr = { bits = 8; family = "avr"; }; - - vc4 = { bits = 32; significantByte = littleEndian; family = "vc4"; }; - - or1k = { bits = 32; significantByte = bigEndian; family = "or1k"; }; - - loongarch64 = { bits = 64; significantByte = littleEndian; family = "loongarch"; }; - - javascript = { bits = 32; significantByte = littleEndian; family = "javascript"; }; - }; - - # GNU build systems assume that older NetBSD architectures are using a.out. - gnuNetBSDDefaultExecFormat = cpu: - if (cpu.family == "arm" && cpu.bits == 32) || - (cpu.family == "sparc" && cpu.bits == 32) || - (cpu.family == "m68k" && cpu.bits == 32) || - (cpu.family == "x86" && cpu.bits == 32) - then execFormats.aout - else execFormats.elf; - - # Determine when two CPUs are compatible with each other. That is, - # can code built for system B run on system A? For that to happen, - # the programs that system B accepts must be a subset of the - # programs that system A accepts. - # - # We have the following properties of the compatibility relation, - # which must be preserved when adding compatibility information for - # additional CPUs. - # - (reflexivity) - # Every CPU is compatible with itself. - # - (transitivity) - # If A is compatible with B and B is compatible with C then A is compatible with C. - # - # Note: Since 22.11 the archs of a mode switching CPU are no longer considered - # pairwise compatible. Mode switching implies that binaries built for A - # and B respectively can't be executed at the same time. - isCompatible = a: b: with cpuTypes; lib.any lib.id [ - # x86 - (b == i386 && isCompatible a i486) - (b == i486 && isCompatible a i586) - (b == i586 && isCompatible a i686) - - # XXX: Not true in some cases. Like in WSL mode. - (b == i686 && isCompatible a x86_64) - - # ARMv4 - (b == arm && isCompatible a armv5tel) - - # ARMv5 - (b == armv5tel && isCompatible a armv6l) - - # ARMv6 - (b == armv6l && isCompatible a armv6m) - (b == armv6m && isCompatible a armv7l) - - # ARMv7 - (b == armv7l && isCompatible a armv7a) - (b == armv7l && isCompatible a armv7r) - (b == armv7l && isCompatible a armv7m) - - # ARMv8 - (b == aarch64 && a == armv8a) - (b == armv8a && isCompatible a aarch64) - (b == armv8r && isCompatible a armv8a) - (b == armv8m && isCompatible a armv8a) - - # PowerPC - (b == powerpc && isCompatible a powerpc64) - (b == powerpcle && isCompatible a powerpc64le) - - # MIPS - (b == mips && isCompatible a mips64) - (b == mipsel && isCompatible a mips64el) - - # RISCV - (b == riscv32 && isCompatible a riscv64) - - # SPARC - (b == sparc && isCompatible a sparc64) - - # WASM - (b == wasm32 && isCompatible a wasm64) - - # identity - (b == a) - ]; - - ################################################################################ - - types.openVendor = mkOptionType { - name = "vendor"; - description = "vendor for the platform"; - merge = mergeOneOption; - }; - - types.vendor = enum (attrValues vendors); - - vendors = setTypes types.openVendor { - apple = {}; - pc = {}; - # Actually matters, unlocking some MinGW-w64-specific options in GCC. See - # bottom of https://sourceforge.net/p/mingw-w64/wiki2/Unicode%20apps/ - w64 = {}; - - none = {}; - unknown = {}; - }; - - ################################################################################ - - types.openExecFormat = mkOptionType { - name = "exec-format"; - description = "executable container used by the kernel"; - merge = mergeOneOption; - }; - - types.execFormat = enum (attrValues execFormats); - - execFormats = setTypes types.openExecFormat { - aout = {}; # a.out - elf = {}; - macho = {}; - pe = {}; - wasm = {}; - - unknown = {}; - }; - - ################################################################################ - - types.openKernelFamily = mkOptionType { - name = "exec-format"; - description = "executable container used by the kernel"; - merge = mergeOneOption; - }; - - types.kernelFamily = enum (attrValues kernelFamilies); - - kernelFamilies = setTypes types.openKernelFamily { - bsd = {}; - darwin = {}; - }; - - ################################################################################ - - types.openKernel = mkOptionType { - name = "kernel"; - description = "kernel name and information"; - merge = mergeOneOption; - check = x: types.execFormat.check x.execFormat - && all types.kernelFamily.check (attrValues x.families); - }; - - types.kernel = enum (attrValues kernels); - - kernels = with execFormats; with kernelFamilies; setTypes types.openKernel { - # TODO(@Ericson2314): Don't want to mass-rebuild yet to keeping 'darwin' as - # the normalized name for macOS. - macos = { execFormat = macho; families = { inherit darwin; }; name = "darwin"; }; - ios = { execFormat = macho; families = { inherit darwin; }; }; - # 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. - freebsd12 = { execFormat = elf; families = { inherit bsd; }; name = "freebsd"; version = 12; }; - freebsd13 = { execFormat = elf; families = { inherit bsd; }; name = "freebsd"; version = 13; }; - linux = { execFormat = elf; families = { }; }; - netbsd = { execFormat = elf; families = { inherit bsd; }; }; - none = { execFormat = unknown; families = { }; }; - openbsd = { execFormat = elf; families = { inherit bsd; }; }; - solaris = { execFormat = elf; families = { }; }; - wasi = { execFormat = wasm; families = { }; }; - redox = { execFormat = elf; families = { }; }; - windows = { execFormat = pe; families = { }; }; - ghcjs = { execFormat = unknown; families = { }; }; - genode = { execFormat = elf; families = { }; }; - mmixware = { execFormat = unknown; families = { }; }; - } // { # aliases - # 'darwin' is the kernel for all of them. We choose macOS by default. - darwin = kernels.macos; - watchos = kernels.ios; - tvos = kernels.ios; - win32 = kernels.windows; - }; - - ################################################################################ - - types.openAbi = mkOptionType { - name = "abi"; - description = "binary interface for compiled code and syscalls"; - merge = mergeOneOption; - }; - - types.abi = enum (attrValues abis); - - abis = setTypes types.openAbi { - cygnus = {}; - msvc = {}; - - # Note: eabi is specific to ARM and PowerPC. - # On PowerPC, this corresponds to PPCEABI. - # On ARM, this corresponds to ARMEABI. - eabi = { float = "soft"; }; - eabihf = { float = "hard"; }; - - # Other architectures should use ELF in embedded situations. - elf = {}; - - androideabi = {}; - android = { - assertions = [ - { assertion = platform: !platform.isAarch32; - message = '' - The "android" ABI is not for 32-bit ARM. Use "androideabi" instead. - ''; - } - ]; - }; - - gnueabi = { float = "soft"; }; - gnueabihf = { float = "hard"; }; - gnu = { - assertions = [ - { assertion = platform: !platform.isAarch32; - message = '' - The "gnu" ABI is ambiguous on 32-bit ARM. Use "gnueabi" or "gnueabihf" instead. - ''; - } - { assertion = platform: with platform; !(isPower64 && isBigEndian); - message = '' - The "gnu" ABI is ambiguous on big-endian 64-bit PowerPC. Use "gnuabielfv2" or "gnuabielfv1" instead. - ''; - } - ]; - }; - gnuabi64 = { abi = "64"; }; - muslabi64 = { abi = "64"; }; - - # NOTE: abi=n32 requires a 64-bit MIPS chip! That is not a typo. - # It is basically the 64-bit abi with 32-bit pointers. Details: - # https://www.linux-mips.org/pub/linux/mips/doc/ABI/MIPS-N32-ABI-Handbook.pdf - gnuabin32 = { abi = "n32"; }; - muslabin32 = { abi = "n32"; }; - - gnuabielfv2 = { abi = "elfv2"; }; - gnuabielfv1 = { abi = "elfv1"; }; - - musleabi = { float = "soft"; }; - musleabihf = { float = "hard"; }; - musl = {}; - - uclibceabi = { float = "soft"; }; - uclibceabihf = { float = "hard"; }; - uclibc = {}; - - unknown = {}; - }; - - ################################################################################ - - types.parsedPlatform = mkOptionType { - name = "system"; - description = "fully parsed representation of llvm- or nix-style platform tuple"; - merge = mergeOneOption; - check = { cpu, vendor, kernel, abi }: - types.cpuType.check cpu - && types.vendor.check vendor - && types.kernel.check kernel - && types.abi.check abi; - }; - - isSystem = isType "system"; - - mkSystem = components: - assert types.parsedPlatform.check components; - setType "system" components; - - mkSkeletonFromList = l: { - "1" = if elemAt l 0 == "avr" - then { cpu = elemAt l 0; kernel = "none"; abi = "unknown"; } - else throw "Target specification with 1 components is ambiguous"; - "2" = # We only do 2-part hacks for things Nix already supports - if elemAt l 1 == "cygwin" - then { cpu = elemAt l 0; kernel = "windows"; abi = "cygnus"; } - # MSVC ought to be the default ABI so this case isn't needed. But then it - # becomes difficult to handle the gnu* variants for Aarch32 correctly for - # minGW. So it's easier to make gnu* the default for the MinGW, but - # hack-in MSVC for the non-MinGW case right here. - else if elemAt l 1 == "windows" - then { cpu = elemAt l 0; kernel = "windows"; abi = "msvc"; } - else if (elemAt l 1) == "elf" - then { cpu = elemAt l 0; vendor = "unknown"; kernel = "none"; abi = elemAt l 1; } - else { cpu = elemAt l 0; kernel = elemAt l 1; }; - "3" = - # cpu-kernel-environment - if elemAt l 1 == "linux" || - elem (elemAt l 2) ["eabi" "eabihf" "elf" "gnu"] - then { - cpu = elemAt l 0; - kernel = elemAt l 1; - abi = elemAt l 2; - vendor = "unknown"; - } - # cpu-vendor-os - else if elemAt l 1 == "apple" || - elem (elemAt l 2) [ "wasi" "redox" "mmixware" "ghcjs" "mingw32" ] || - hasPrefix "freebsd" (elemAt l 2) || - hasPrefix "netbsd" (elemAt l 2) || - hasPrefix "genode" (elemAt l 2) - then { - cpu = elemAt l 0; - vendor = elemAt l 1; - kernel = if elemAt l 2 == "mingw32" - then "windows" # autotools breaks on -gnu for window - else elemAt l 2; - } - else throw "Target specification with 3 components is ambiguous"; - "4" = { cpu = elemAt l 0; vendor = elemAt l 1; kernel = elemAt l 2; abi = elemAt l 3; }; - }.${toString (length l)} - or (throw "system string has invalid number of hyphen-separated components"); - - # This should revert the job done by config.guess from the gcc compiler. - mkSystemFromSkeleton = { cpu - , # Optional, but fallback too complex for here. - # Inferred below instead. - vendor ? assert false; null - , kernel - , # Also inferred below - abi ? assert false; null - } @ args: let - getCpu = name: cpuTypes.${name} or (throw "Unknown CPU type: ${name}"); - getVendor = name: vendors.${name} or (throw "Unknown vendor: ${name}"); - getKernel = name: kernels.${name} or (throw "Unknown kernel: ${name}"); - getAbi = name: abis.${name} or (throw "Unknown ABI: ${name}"); - - parsed = { - cpu = getCpu args.cpu; - vendor = - /**/ if args ? vendor then getVendor args.vendor - else if isDarwin parsed then vendors.apple - else if isWindows parsed then vendors.pc - else vendors.unknown; - kernel = if hasPrefix "darwin" args.kernel then getKernel "darwin" - else if hasPrefix "netbsd" args.kernel then getKernel "netbsd" - else getKernel args.kernel; - abi = - /**/ if args ? abi then getAbi args.abi - else if isLinux parsed || isWindows parsed then - if isAarch32 parsed then - if lib.versionAtLeast (parsed.cpu.version or "0") "6" - then abis.gnueabihf - else abis.gnueabi - # Default ppc64 BE to ELFv2 - else if isPower64 parsed && isBigEndian parsed then abis.gnuabielfv2 - else abis.gnu - else abis.unknown; - }; - - in mkSystem parsed; - - mkSystemFromString = s: mkSystemFromSkeleton (mkSkeletonFromList (lib.splitString "-" s)); - - kernelName = kernel: - kernel.name + toString (kernel.version or ""); - - doubleFromSystem = { cpu, kernel, abi, ... }: - /**/ if abi == abis.cygnus then "${cpu.name}-cygwin" - else if kernel.families ? darwin then "${cpu.name}-darwin" - else "${cpu.name}-${kernelName kernel}"; - - tripleFromSystem = { cpu, vendor, kernel, abi, ... } @ sys: assert isSystem sys; let - optExecFormat = - lib.optionalString (kernel.name == "netbsd" && - gnuNetBSDDefaultExecFormat cpu != kernel.execFormat) - kernel.execFormat.name; - optAbi = lib.optionalString (abi != abis.unknown) "-${abi.name}"; - in "${cpu.name}-${vendor.name}-${kernelName kernel}${optExecFormat}${optAbi}"; - - ################################################################################ - -} diff --git a/lib/systems/platforms.nix b/lib/systems/platforms.nix deleted file mode 100644 index d574943e47d..00000000000 --- a/lib/systems/platforms.nix +++ /dev/null @@ -1,565 +0,0 @@ -# Note: lib/systems/default.nix takes care of producing valid, -# fully-formed "platform" values (e.g. hostPlatform, buildPlatform, -# targetPlatform, etc) containing at least the minimal set of attrs -# required (see types.parsedPlatform in lib/systems/parse.nix). This -# file takes an already-valid platform and further elaborates it with -# optional fields; currently these are: linux-kernel, gcc, and rustc. - -{ lib }: -rec { - pc = { - linux-kernel = { - name = "pc"; - - baseConfig = "defconfig"; - # Build whatever possible as a module, if not stated in the extra config. - autoModules = true; - target = "bzImage"; - }; - }; - - pc_simplekernel = lib.recursiveUpdate pc { - linux-kernel.autoModules = false; - }; - - powernv = { - linux-kernel = { - name = "PowerNV"; - - baseConfig = "powernv_defconfig"; - target = "vmlinux"; - autoModules = true; - # avoid driver/FS trouble arising from unusual page size - extraConfig = '' - PPC_64K_PAGES n - PPC_4K_PAGES y - IPV6 y - - ATA_BMDMA y - ATA_SFF y - VIRTIO_MENU y - ''; - }; - }; - - ## - ## ARM - ## - - pogoplug4 = { - linux-kernel = { - name = "pogoplug4"; - - baseConfig = "multi_v5_defconfig"; - autoModules = false; - extraConfig = '' - # Ubi for the mtd - MTD_UBI y - UBIFS_FS y - UBIFS_FS_XATTR y - UBIFS_FS_ADVANCED_COMPR y - UBIFS_FS_LZO y - UBIFS_FS_ZLIB y - UBIFS_FS_DEBUG n - ''; - makeFlags = [ "LOADADDR=0x8000" ]; - target = "uImage"; - # TODO reenable once manual-config's config actually builds a .dtb and this is checked to be working - #DTB = true; - }; - gcc = { - arch = "armv5te"; - }; - }; - - sheevaplug = { - linux-kernel = { - name = "sheevaplug"; - - baseConfig = "multi_v5_defconfig"; - autoModules = false; - extraConfig = '' - BLK_DEV_RAM y - BLK_DEV_INITRD y - BLK_DEV_CRYPTOLOOP m - BLK_DEV_DM m - DM_CRYPT m - MD y - REISERFS_FS m - BTRFS_FS m - XFS_FS m - JFS_FS m - EXT4_FS m - USB_STORAGE_CYPRESS_ATACB m - - # mv cesa requires this sw fallback, for mv-sha1 - CRYPTO_SHA1 y - # Fast crypto - CRYPTO_TWOFISH y - CRYPTO_TWOFISH_COMMON y - CRYPTO_BLOWFISH y - CRYPTO_BLOWFISH_COMMON y - - IP_PNP y - IP_PNP_DHCP y - NFS_FS y - ROOT_NFS y - TUN m - NFS_V4 y - NFS_V4_1 y - NFS_FSCACHE y - NFSD m - NFSD_V2_ACL y - NFSD_V3 y - NFSD_V3_ACL y - NFSD_V4 y - NETFILTER y - IP_NF_IPTABLES y - IP_NF_FILTER y - IP_NF_MATCH_ADDRTYPE y - IP_NF_TARGET_LOG y - IP_NF_MANGLE y - IPV6 m - VLAN_8021Q m - - CIFS y - CIFS_XATTR y - CIFS_POSIX y - CIFS_FSCACHE y - CIFS_ACL y - - WATCHDOG y - WATCHDOG_CORE y - ORION_WATCHDOG m - - ZRAM m - NETCONSOLE m - - # Disable OABI to have seccomp_filter (required for systemd) - # https://github.com/raspberrypi/firmware/issues/651 - OABI_COMPAT n - - # Fail to build - DRM n - SCSI_ADVANSYS n - USB_ISP1362_HCD n - SND_SOC n - SND_ALI5451 n - FB_SAVAGE n - SCSI_NSP32 n - ATA_SFF n - SUNGEM n - IRDA n - ATM_HE n - SCSI_ACARD n - BLK_DEV_CMD640_ENHANCED n - - FUSE_FS m - - # systemd uses cgroups - CGROUPS y - - # Latencytop - LATENCYTOP y - - # Ubi for the mtd - MTD_UBI y - UBIFS_FS y - UBIFS_FS_XATTR y - UBIFS_FS_ADVANCED_COMPR y - UBIFS_FS_LZO y - UBIFS_FS_ZLIB y - UBIFS_FS_DEBUG n - - # Kdb, for kernel troubles - KGDB y - KGDB_SERIAL_CONSOLE y - KGDB_KDB y - ''; - makeFlags = [ "LOADADDR=0x0200000" ]; - target = "uImage"; - DTB = true; # Beyond 3.10 - }; - gcc = { - arch = "armv5te"; - }; - }; - - raspberrypi = { - linux-kernel = { - name = "raspberrypi"; - - baseConfig = "bcm2835_defconfig"; - DTB = true; - autoModules = true; - preferBuiltin = true; - extraConfig = '' - # Disable OABI to have seccomp_filter (required for systemd) - # https://github.com/raspberrypi/firmware/issues/651 - OABI_COMPAT n - ''; - target = "zImage"; - }; - gcc = { - arch = "armv6"; - fpu = "vfp"; - }; - }; - - # Legacy attribute, for compatibility with existing configs only. - raspberrypi2 = armv7l-hf-multiplatform; - - zero-gravitas = { - linux-kernel = { - name = "zero-gravitas"; - - baseConfig = "zero-gravitas_defconfig"; - # Target verified by checking /boot on reMarkable 1 device - target = "zImage"; - autoModules = false; - DTB = true; - }; - gcc = { - fpu = "neon"; - cpu = "cortex-a9"; - }; - }; - - zero-sugar = { - linux-kernel = { - name = "zero-sugar"; - - baseConfig = "zero-sugar_defconfig"; - DTB = true; - autoModules = false; - preferBuiltin = true; - target = "zImage"; - }; - gcc = { - cpu = "cortex-a7"; - fpu = "neon-vfpv4"; - float-abi = "hard"; - }; - }; - - utilite = { - linux-kernel = { - name = "utilite"; - maseConfig = "multi_v7_defconfig"; - autoModules = false; - extraConfig = '' - # Ubi for the mtd - MTD_UBI y - UBIFS_FS y - UBIFS_FS_XATTR y - UBIFS_FS_ADVANCED_COMPR y - UBIFS_FS_LZO y - UBIFS_FS_ZLIB y - UBIFS_FS_DEBUG n - ''; - makeFlags = [ "LOADADDR=0x10800000" ]; - target = "uImage"; - DTB = true; - }; - gcc = { - cpu = "cortex-a9"; - fpu = "neon"; - }; - }; - - guruplug = lib.recursiveUpdate sheevaplug { - # Define `CONFIG_MACH_GURUPLUG' (see - # ) - # and other GuruPlug-specific things. Requires the `guruplug-defconfig' - # patch. - linux-kernel.baseConfig = "guruplug_defconfig"; - }; - - beaglebone = lib.recursiveUpdate armv7l-hf-multiplatform { - linux-kernel = { - name = "beaglebone"; - baseConfig = "bb.org_defconfig"; - autoModules = false; - extraConfig = ""; # TBD kernel config - target = "zImage"; - }; - }; - - # https://developer.android.com/ndk/guides/abis#v7a - armv7a-android = { - linux-kernel.name = "armeabi-v7a"; - gcc = { - arch = "armv7-a"; - float-abi = "softfp"; - fpu = "vfpv3-d16"; - }; - }; - - armv7l-hf-multiplatform = { - linux-kernel = { - name = "armv7l-hf-multiplatform"; - Major = "2.6"; # Using "2.6" enables 2.6 kernel syscalls in glibc. - baseConfig = "multi_v7_defconfig"; - DTB = true; - autoModules = true; - preferBuiltin = true; - target = "zImage"; - extraConfig = '' - # Serial port for Raspberry Pi 3. Wasn't included in ARMv7 defconfig - # until 4.17. - SERIAL_8250_BCM2835AUX y - SERIAL_8250_EXTENDED y - SERIAL_8250_SHARE_IRQ y - - # Hangs ODROID-XU4 - ARM_BIG_LITTLE_CPUIDLE n - - # Disable OABI to have seccomp_filter (required for systemd) - # https://github.com/raspberrypi/firmware/issues/651 - OABI_COMPAT n - - # >=5.12 fails with: - # drivers/net/ethernet/micrel/ks8851_common.o: in function `ks8851_probe_common': - # ks8851_common.c:(.text+0x179c): undefined reference to `__this_module' - # See: https://lore.kernel.org/netdev/20210116164828.40545-1-marex@denx.de/T/ - KS8851_MLL y - ''; - }; - gcc = { - # Some table about fpu flags: - # http://community.arm.com/servlet/JiveServlet/showImage/38-1981-3827/blogentry-103749-004812900+1365712953_thumb.png - # Cortex-A5: -mfpu=neon-fp16 - # Cortex-A7 (rpi2): -mfpu=neon-vfpv4 - # Cortex-A8 (beaglebone): -mfpu=neon - # Cortex-A9: -mfpu=neon-fp16 - # Cortex-A15: -mfpu=neon-vfpv4 - - # More about FPU: - # https://wiki.debian.org/ArmHardFloatPort/VfpComparison - - # vfpv3-d16 is what Debian uses and seems to be the best compromise: NEON is not supported in e.g. Scaleway or Tegra 2, - # and the above page suggests NEON is only an improvement with hand-written assembly. - arch = "armv7-a"; - fpu = "vfpv3-d16"; - - # For Raspberry Pi the 2 the best would be: - # cpu = "cortex-a7"; - # fpu = "neon-vfpv4"; - }; - }; - - aarch64-multiplatform = { - linux-kernel = { - name = "aarch64-multiplatform"; - baseConfig = "defconfig"; - DTB = true; - autoModules = true; - preferBuiltin = true; - extraConfig = '' - # Raspberry Pi 3 stuff. Not needed for s >= 4.10. - ARCH_BCM2835 y - BCM2835_MBOX y - BCM2835_WDT y - RASPBERRYPI_FIRMWARE y - RASPBERRYPI_POWER y - SERIAL_8250_BCM2835AUX y - SERIAL_8250_EXTENDED y - SERIAL_8250_SHARE_IRQ y - - # Cavium ThunderX stuff. - PCI_HOST_THUNDER_ECAM y - - # Nvidia Tegra stuff. - PCI_TEGRA y - - # The default (=y) forces us to have the XHCI firmware available in initrd, - # which our initrd builder can't currently do easily. - USB_XHCI_TEGRA m - ''; - target = "Image"; - }; - gcc = { - arch = "armv8-a"; - }; - }; - - apple-m1 = { - gcc = { - arch = "armv8.3-a+crypto+sha2+aes+crc+fp16+lse+simd+ras+rdm+rcpc"; - cpu = "apple-a13"; - }; - }; - - ## - ## MIPS - ## - - ben_nanonote = { - linux-kernel = { - name = "ben_nanonote"; - }; - gcc = { - arch = "mips32"; - float = "soft"; - }; - }; - - fuloong2f_n32 = { - linux-kernel = { - name = "fuloong2f_n32"; - baseConfig = "lemote2f_defconfig"; - autoModules = false; - extraConfig = '' - MIGRATION n - COMPACTION n - - # nixos mounts some cgroup - CGROUPS y - - BLK_DEV_RAM y - BLK_DEV_INITRD y - BLK_DEV_CRYPTOLOOP m - BLK_DEV_DM m - DM_CRYPT m - MD y - REISERFS_FS m - EXT4_FS m - USB_STORAGE_CYPRESS_ATACB m - - IP_PNP y - IP_PNP_DHCP y - IP_PNP_BOOTP y - NFS_FS y - ROOT_NFS y - TUN m - NFS_V4 y - NFS_V4_1 y - NFS_FSCACHE y - NFSD m - NFSD_V2_ACL y - NFSD_V3 y - NFSD_V3_ACL y - NFSD_V4 y - - # Fail to build - DRM n - SCSI_ADVANSYS n - USB_ISP1362_HCD n - SND_SOC n - SND_ALI5451 n - FB_SAVAGE n - SCSI_NSP32 n - ATA_SFF n - SUNGEM n - IRDA n - ATM_HE n - SCSI_ACARD n - BLK_DEV_CMD640_ENHANCED n - - FUSE_FS m - - # Needed for udev >= 150 - SYSFS_DEPRECATED_V2 n - - VGA_CONSOLE n - VT_HW_CONSOLE_BINDING y - SERIAL_8250_CONSOLE y - FRAMEBUFFER_CONSOLE y - EXT2_FS y - EXT3_FS y - REISERFS_FS y - MAGIC_SYSRQ y - - # The kernel doesn't boot at all, with FTRACE - FTRACE n - ''; - target = "vmlinux"; - }; - gcc = { - arch = "loongson2f"; - float = "hard"; - abi = "n32"; - }; - }; - - # can execute on 32bit chip - gcc_mips32r2_o32 = { gcc = { arch = "mips32r2"; abi = "32"; }; }; - gcc_mips32r6_o32 = { gcc = { arch = "mips32r6"; abi = "32"; }; }; - gcc_mips64r2_n32 = { gcc = { arch = "mips64r2"; abi = "n32"; }; }; - gcc_mips64r6_n32 = { gcc = { arch = "mips64r6"; abi = "n32"; }; }; - gcc_mips64r2_64 = { gcc = { arch = "mips64r2"; abi = "64"; }; }; - gcc_mips64r6_64 = { gcc = { arch = "mips64r6"; abi = "64"; }; }; - - # based on: - # https://www.mail-archive.com/qemu-discuss@nongnu.org/msg05179.html - # https://gmplib.org/~tege/qemu.html#mips64-debian - mips64el-qemu-linux-gnuabi64 = { - linux-kernel = { - name = "mips64el"; - baseConfig = "64r2el_defconfig"; - target = "vmlinuz"; - autoModules = false; - DTB = true; - # for qemu 9p passthrough filesystem - extraConfig = '' - MIPS_MALTA y - PAGE_SIZE_4KB y - CPU_LITTLE_ENDIAN y - CPU_MIPS64_R2 y - 64BIT y - CPU_MIPS64_R2 y - - NET_9P y - NET_9P_VIRTIO y - 9P_FS y - 9P_FS_POSIX_ACL y - PCI y - VIRTIO_PCI y - ''; - }; - }; - - ## - ## Other - ## - - riscv-multiplatform = { - linux-kernel = { - name = "riscv-multiplatform"; - target = "Image"; - autoModules = true; - baseConfig = "defconfig"; - DTB = true; - extraConfig = '' - SERIAL_OF_PLATFORM y - ''; - }; - }; - - # This function takes a minimally-valid "platform" and returns an - # attrset containing zero or more additional attrs which should be - # included in the platform in order to further elaborate it. - select = platform: - # x86 - /**/ if platform.isx86 then pc - - # ARM - else if platform.isAarch32 then let - version = platform.parsed.cpu.version or null; - in if version == null then pc - else if lib.versionOlder version "6" then sheevaplug - else if lib.versionOlder version "7" then raspberrypi - else armv7l-hf-multiplatform - - else if platform.isAarch64 then - if platform.isDarwin then apple-m1 - else aarch64-multiplatform - - else if platform.isRiscV then riscv-multiplatform - - else if platform.parsed.cpu == lib.systems.parse.cpuTypes.mipsel then (import ./examples.nix { inherit lib; }).mipsel-linux-gnu - - else if platform.parsed.cpu == lib.systems.parse.cpuTypes.powerpc64le then powernv - - else { }; -} diff --git a/lib/tests/check-eval.nix b/lib/tests/check-eval.nix deleted file mode 100644 index 8bd7b605a39..00000000000 --- a/lib/tests/check-eval.nix +++ /dev/null @@ -1,7 +0,0 @@ -# Throws an error if any of our lib tests fail. - -let tests = [ "misc" "systems" ]; - all = builtins.concatLists (map (f: import (./. + "/${f}.nix")) tests); -in if all == [] - then null - else throw (builtins.toJSON all) diff --git a/lib/tests/maintainer-module.nix b/lib/tests/maintainer-module.nix deleted file mode 100644 index afa12587a98..00000000000 --- a/lib/tests/maintainer-module.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ lib, ... }: -let - inherit (lib) types; -in { - options = { - name = lib.mkOption { - type = types.str; - }; - email = lib.mkOption { - type = types.nullOr types.str; - default = null; - }; - matrix = lib.mkOption { - type = types.nullOr types.str; - default = null; - }; - github = lib.mkOption { - type = types.nullOr types.str; - default = null; - }; - githubId = lib.mkOption { - type = types.nullOr types.ints.unsigned; - default = null; - }; - keys = lib.mkOption { - type = types.listOf (types.submodule { - options.fingerprint = lib.mkOption { type = types.str; }; - }); - default = []; - }; - }; -} diff --git a/lib/tests/maintainers.nix b/lib/tests/maintainers.nix deleted file mode 100644 index be1c8aaa85c..00000000000 --- a/lib/tests/maintainers.nix +++ /dev/null @@ -1,53 +0,0 @@ -# to run these tests (and the others) -# nix-build nixpkgs/lib/tests/release.nix -# These tests should stay in sync with the comment in maintainers/maintainers-list.nix -{ # The pkgs used for dependencies for the testing itself - pkgs ? import ../.. {} -, lib ? pkgs.lib -}: - -let - checkMaintainer = handle: uncheckedAttrs: - let - prefix = [ "lib" "maintainers" handle ]; - checkedAttrs = (lib.modules.evalModules { - inherit prefix; - modules = [ - ./maintainer-module.nix - { - _file = toString ../../maintainers/maintainer-list.nix; - config = uncheckedAttrs; - } - ]; - }).config; - - checks = lib.optional (checkedAttrs.github != null && checkedAttrs.githubId == null) '' - echo ${lib.escapeShellArg (lib.showOption prefix)}': If `github` is specified, `githubId` must be too.' - # Calling this too often would hit non-authenticated API limits, but this - # shouldn't happen since such errors will get fixed rather quickly - info=$(curl -sS https://api.github.com/users/${checkedAttrs.github}) - id=$(jq -r '.id' <<< "$info") - echo "The GitHub ID for GitHub user ${checkedAttrs.github} is $id:" - echo -e " githubId = $id;\n" - '' ++ lib.optional (checkedAttrs.email == null && checkedAttrs.github == null && checkedAttrs.matrix == null) '' - echo ${lib.escapeShellArg (lib.showOption prefix)}': At least one of `email`, `github` or `matrix` must be specified, so that users know how to reach you.' - '' ++ lib.optional (checkedAttrs.email != null && lib.hasSuffix "noreply.github.com" checkedAttrs.email) '' - echo ${lib.escapeShellArg (lib.showOption prefix)}': If an email address is given, it should allow people to reach you. If you do not want that, you can just provide `github` or `matrix` instead.' - ''; - in lib.deepSeq checkedAttrs checks; - - missingGithubIds = lib.concatLists (lib.mapAttrsToList checkMaintainer lib.maintainers); - - success = pkgs.runCommand "checked-maintainers-success" {} ">$out"; - - failure = pkgs.runCommand "checked-maintainers-failure" { - nativeBuildInputs = [ pkgs.curl pkgs.jq ]; - outputHash = "sha256:${lib.fakeSha256}"; - outputHAlgo = "sha256"; - outputHashMode = "flat"; - SSL_CERT_FILE = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"; - } '' - ${lib.concatStringsSep "\n" missingGithubIds} - exit 1 - ''; -in if missingGithubIds == [] then success else failure diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix deleted file mode 100644 index ea3548b9514..00000000000 --- a/lib/tests/misc.nix +++ /dev/null @@ -1,1593 +0,0 @@ -# to run these tests: -# nix-instantiate --eval --strict nixpkgs/lib/tests/misc.nix -# if the resulting list is empty, all tests passed -with import ../default.nix; - -let - testingThrow = expr: { - expr = (builtins.tryEval (builtins.seq expr "didn't throw")); - expected = { success = false; value = false; }; - }; - testingDeepThrow = expr: testingThrow (builtins.deepSeq expr expr); - - testSanitizeDerivationName = { name, expected }: - let - drv = derivation { - name = strings.sanitizeDerivationName name; - builder = "x"; - system = "x"; - }; - in { - # Evaluate the derivation so an invalid name would be caught - expr = builtins.seq drv.drvPath drv.name; - inherit expected; - }; - -in - -runTests { - -# TRIVIAL - - testId = { - expr = id 1; - expected = 1; - }; - - testConst = { - expr = const 2 3; - expected = 2; - }; - - testPipe = { - expr = pipe 2 [ - (x: x + 2) # 2 + 2 = 4 - (x: x * 2) # 4 * 2 = 8 - ]; - expected = 8; - }; - - testPipeEmpty = { - expr = pipe 2 []; - expected = 2; - }; - - testPipeStrings = { - expr = pipe [ 3 4 ] [ - (map toString) - (map (s: s + "\n")) - concatStrings - ]; - expected = '' - 3 - 4 - ''; - }; - - /* - testOr = { - expr = or true false; - expected = true; - }; - */ - - testAnd = { - expr = and true false; - expected = false; - }; - - testFix = { - expr = fix (x: {a = if x ? a then "a" else "b";}); - expected = {a = "a";}; - }; - - testComposeExtensions = { - expr = let obj = makeExtensible (self: { foo = self.bar; }); - f = self: super: { bar = false; baz = true; }; - g = self: super: { bar = super.baz or false; }; - f_o_g = composeExtensions f g; - composed = obj.extend f_o_g; - in composed.foo; - expected = true; - }; - - testComposeManyExtensions0 = { - expr = let obj = makeExtensible (self: { foo = true; }); - emptyComposition = composeManyExtensions []; - composed = obj.extend emptyComposition; - in composed.foo; - expected = true; - }; - - testComposeManyExtensions = - let f = self: super: { bar = false; baz = true; }; - g = self: super: { bar = super.baz or false; }; - h = self: super: { qux = super.bar or false; }; - obj = makeExtensible (self: { foo = self.qux; }); - in { - expr = let composition = composeManyExtensions [f g h]; - composed = obj.extend composition; - in composed.foo; - expected = (obj.extend (composeExtensions f (composeExtensions g h))).foo; - }; - - testBitAnd = { - expr = (bitAnd 3 10); - expected = 2; - }; - - testBitOr = { - expr = (bitOr 3 10); - expected = 11; - }; - - testBitXor = { - expr = (bitXor 3 10); - expected = 9; - }; - - testToHexString = { - expr = toHexString 250; - expected = "FA"; - }; - - testToBaseDigits = { - expr = toBaseDigits 2 6; - expected = [ 1 1 0 ]; - }; - - testFunctionArgsFunctor = { - expr = functionArgs { __functor = self: { a, b }: null; }; - expected = { a = false; b = false; }; - }; - - testFunctionArgsSetFunctionArgs = { - expr = functionArgs (setFunctionArgs (args: args.x) { x = false; }); - expected = { x = false; }; - }; - -# STRINGS - - testConcatMapStrings = { - expr = concatMapStrings (x: x + ";") ["a" "b" "c"]; - expected = "a;b;c;"; - }; - - testConcatStringsSep = { - expr = concatStringsSep "," ["a" "b" "c"]; - expected = "a,b,c"; - }; - - testConcatLines = { - expr = concatLines ["a" "b" "c"]; - expected = "a\nb\nc\n"; - }; - - testSplitStringsSimple = { - expr = strings.splitString "." "a.b.c.d"; - expected = [ "a" "b" "c" "d" ]; - }; - - testSplitStringsEmpty = { - expr = strings.splitString "." "a..b"; - expected = [ "a" "" "b" ]; - }; - - testSplitStringsOne = { - expr = strings.splitString ":" "a.b"; - expected = [ "a.b" ]; - }; - - testSplitStringsNone = { - expr = strings.splitString "." ""; - expected = [ "" ]; - }; - - testSplitStringsFirstEmpty = { - expr = strings.splitString "/" "/a/b/c"; - expected = [ "" "a" "b" "c" ]; - }; - - testSplitStringsLastEmpty = { - expr = strings.splitString ":" "2001:db8:0:0042::8a2e:370:"; - expected = [ "2001" "db8" "0" "0042" "" "8a2e" "370" "" ]; - }; - - testSplitStringsRegex = { - expr = strings.splitString "\\[{}]()^$?*+|." "A\\[{}]()^$?*+|.B"; - expected = [ "A" "B" ]; - }; - - testSplitStringsDerivation = { - expr = take 3 (strings.splitString "/" (derivation { - name = "name"; - builder = "builder"; - system = "system"; - })); - expected = ["" "nix" "store"]; - }; - - testSplitVersionSingle = { - expr = versions.splitVersion "1"; - expected = [ "1" ]; - }; - - testSplitVersionDouble = { - expr = versions.splitVersion "1.2"; - expected = [ "1" "2" ]; - }; - - testSplitVersionTriple = { - expr = versions.splitVersion "1.2.3"; - expected = [ "1" "2" "3" ]; - }; - - testPadVersionLess = { - expr = versions.pad 3 "1.2"; - expected = "1.2.0"; - }; - - testPadVersionLessExtra = { - expr = versions.pad 3 "1.3-rc1"; - expected = "1.3.0-rc1"; - }; - - testPadVersionMore = { - expr = versions.pad 3 "1.2.3.4"; - expected = "1.2.3"; - }; - - testIsStorePath = { - expr = - let goodPath = - "${builtins.storeDir}/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11"; - in { - storePath = isStorePath goodPath; - storePathDerivation = isStorePath (import ../.. { system = "x86_64-linux"; }).hello; - storePathAppendix = isStorePath - "${goodPath}/bin/python"; - nonAbsolute = isStorePath (concatStrings (tail (stringToCharacters goodPath))); - asPath = isStorePath (/. + goodPath); - otherPath = isStorePath "/something/else"; - otherVals = { - attrset = isStorePath {}; - list = isStorePath []; - int = isStorePath 42; - }; - }; - expected = { - storePath = true; - storePathDerivation = true; - storePathAppendix = false; - nonAbsolute = false; - asPath = true; - otherPath = false; - otherVals = { - attrset = false; - list = false; - int = false; - }; - }; - }; - - testEscapeXML = { - expr = escapeXML ''"test" 'test' < & >''; - expected = ""test" 'test' < & >"; - }; - - testToShellVars = { - expr = '' - ${toShellVars { - STRing01 = "just a 'string'"; - _array_ = [ "with" "more strings" ]; - assoc."with some" = '' - strings - possibly newlines - ''; - drv = { - outPath = "/drv"; - foo = "ignored attribute"; - }; - path = /path; - stringable = { - __toString = _: "hello toString"; - bar = "ignored attribute"; - }; - }} - ''; - expected = '' - STRing01='just a '\'''string'\'''' - declare -a _array_=('with' 'more strings') - declare -A assoc=(['with some']='strings - possibly newlines - ') - drv='/drv' - path='/path' - stringable='hello toString' - ''; - }; - - testHasInfixFalse = { - expr = hasInfix "c" "abde"; - expected = false; - }; - - testHasInfixTrue = { - expr = hasInfix "c" "abcde"; - expected = true; - }; - - testHasInfixDerivation = { - expr = hasInfix "hello" (import ../.. { system = "x86_64-linux"; }).hello; - expected = true; - }; - - testHasInfixPath = { - expr = hasInfix "tests" ./.; - expected = true; - }; - - testHasInfixPathStoreDir = { - expr = hasInfix builtins.storeDir ./.; - expected = true; - }; - - testHasInfixToString = { - expr = hasInfix "a" { __toString = _: "a"; }; - expected = true; - }; - - testNormalizePath = { - expr = strings.normalizePath "//a/b//c////d/"; - expected = "/a/b/c/d/"; - }; - - testCharToInt = { - expr = strings.charToInt "A"; - expected = 65; - }; - - testEscapeC = { - expr = strings.escapeC [ " " ] "Hello World"; - expected = "Hello\\x20World"; - }; - - testEscapeURL = testAllTrue [ - ("" == strings.escapeURL "") - ("Hello" == strings.escapeURL "Hello") - ("Hello%20World" == strings.escapeURL "Hello World") - ("Hello%2FWorld" == strings.escapeURL "Hello/World") - ("42%25" == strings.escapeURL "42%") - ("%20%3F%26%3D%23%2B%25%21%3C%3E%23%22%7B%7D%7C%5C%5E%5B%5D%60%09%3A%2F%40%24%27%28%29%2A%2C%3B" == strings.escapeURL " ?&=#+%!<>#\"{}|\\^[]`\t:/@$'()*,;") - ]; - - testToInt = testAllTrue [ - # Naive - (123 == toInt "123") - (0 == toInt "0") - # Whitespace Padding - (123 == toInt " 123") - (123 == toInt "123 ") - (123 == toInt " 123 ") - (123 == toInt " 123 ") - (0 == toInt " 0") - (0 == toInt "0 ") - (0 == toInt " 0 ") - (-1 == toInt "-1") - (-1 == toInt " -1 ") - ]; - - testToIntFails = testAllTrue [ - ( builtins.tryEval (toInt "") == { success = false; value = false; } ) - ( builtins.tryEval (toInt "123 123") == { success = false; value = false; } ) - ( builtins.tryEval (toInt "0 123") == { success = false; value = false; } ) - ( builtins.tryEval (toInt " 0d ") == { success = false; value = false; } ) - ( builtins.tryEval (toInt " 1d ") == { success = false; value = false; } ) - ( builtins.tryEval (toInt " d0 ") == { success = false; value = false; } ) - ( builtins.tryEval (toInt "00") == { success = false; value = false; } ) - ( builtins.tryEval (toInt "01") == { success = false; value = false; } ) - ( builtins.tryEval (toInt "002") == { success = false; value = false; } ) - ( builtins.tryEval (toInt " 002 ") == { success = false; value = false; } ) - ( builtins.tryEval (toInt " foo ") == { success = false; value = false; } ) - ( builtins.tryEval (toInt " foo 123 ") == { success = false; value = false; } ) - ( builtins.tryEval (toInt " foo123 ") == { success = false; value = false; } ) - ]; - - testToIntBase10 = testAllTrue [ - # Naive - (123 == toIntBase10 "123") - (0 == toIntBase10 "0") - # Whitespace Padding - (123 == toIntBase10 " 123") - (123 == toIntBase10 "123 ") - (123 == toIntBase10 " 123 ") - (123 == toIntBase10 " 123 ") - (0 == toIntBase10 " 0") - (0 == toIntBase10 "0 ") - (0 == toIntBase10 " 0 ") - # Zero Padding - (123 == toIntBase10 "0123") - (123 == toIntBase10 "0000123") - (0 == toIntBase10 "000000") - # Whitespace and Zero Padding - (123 == toIntBase10 " 0123") - (123 == toIntBase10 "0123 ") - (123 == toIntBase10 " 0123 ") - (123 == toIntBase10 " 0000123") - (123 == toIntBase10 "0000123 ") - (123 == toIntBase10 " 0000123 ") - (0 == toIntBase10 " 000000") - (0 == toIntBase10 "000000 ") - (0 == toIntBase10 " 000000 ") - (-1 == toIntBase10 "-1") - (-1 == toIntBase10 " -1 ") - ]; - - testToIntBase10Fails = testAllTrue [ - ( builtins.tryEval (toIntBase10 "") == { success = false; value = false; } ) - ( builtins.tryEval (toIntBase10 "123 123") == { success = false; value = false; } ) - ( builtins.tryEval (toIntBase10 "0 123") == { success = false; value = false; } ) - ( builtins.tryEval (toIntBase10 " 0d ") == { success = false; value = false; } ) - ( builtins.tryEval (toIntBase10 " 1d ") == { success = false; value = false; } ) - ( builtins.tryEval (toIntBase10 " d0 ") == { success = false; value = false; } ) - ( builtins.tryEval (toIntBase10 " foo ") == { success = false; value = false; } ) - ( builtins.tryEval (toIntBase10 " foo 123 ") == { success = false; value = false; } ) - ( builtins.tryEval (toIntBase10 " foo 00123 ") == { success = false; value = false; } ) - ( builtins.tryEval (toIntBase10 " foo00123 ") == { success = false; value = false; } ) - ]; - -# LISTS - - testFilter = { - expr = filter (x: x != "a") ["a" "b" "c" "a"]; - expected = ["b" "c"]; - }; - - testFold = - let - f = op: fold: fold op 0 (range 0 100); - # fold with associative operator - assoc = f builtins.add; - # fold with non-associative operator - nonAssoc = f builtins.sub; - in { - expr = { - assocRight = assoc foldr; - # right fold with assoc operator is same as left fold - assocRightIsLeft = assoc foldr == assoc foldl; - nonAssocRight = nonAssoc foldr; - nonAssocLeft = nonAssoc foldl; - # with non-assoc operator the fold results are not the same - nonAssocRightIsNotLeft = nonAssoc foldl != nonAssoc foldr; - # fold is an alias for foldr - foldIsRight = nonAssoc fold == nonAssoc foldr; - }; - expected = { - assocRight = 5050; - assocRightIsLeft = true; - nonAssocRight = 50; - nonAssocLeft = (-5050); - nonAssocRightIsNotLeft = true; - foldIsRight = true; - }; - }; - - testTake = testAllTrue [ - ([] == (take 0 [ 1 2 3 ])) - ([1] == (take 1 [ 1 2 3 ])) - ([ 1 2 ] == (take 2 [ 1 2 3 ])) - ([ 1 2 3 ] == (take 3 [ 1 2 3 ])) - ([ 1 2 3 ] == (take 4 [ 1 2 3 ])) - ]; - - testFoldAttrs = { - expr = foldAttrs (n: a: [n] ++ a) [] [ - { a = 2; b = 7; } - { a = 3; c = 8; } - ]; - expected = { a = [ 2 3 ]; b = [7]; c = [8];}; - }; - - testSort = { - expr = sort builtins.lessThan [ 40 2 30 42 ]; - expected = [2 30 40 42]; - }; - - testReplicate = { - expr = replicate 3 "a"; - expected = ["a" "a" "a"]; - }; - - testToIntShouldConvertStringToInt = { - expr = toInt "27"; - expected = 27; - }; - - testToIntShouldThrowErrorIfItCouldNotConvertToInt = { - expr = builtins.tryEval (toInt "\"foo\""); - expected = { success = false; value = false; }; - }; - - testHasAttrByPathTrue = { - expr = hasAttrByPath ["a" "b"] { a = { b = "yey"; }; }; - expected = true; - }; - - testHasAttrByPathFalse = { - expr = hasAttrByPath ["a" "b"] { a = { c = "yey"; }; }; - expected = false; - }; - - -# ATTRSETS - - testConcatMapAttrs = { - expr = concatMapAttrs - (name: value: { - ${name} = value; - ${name + value} = value; - }) - { - foo = "bar"; - foobar = "baz"; - }; - expected = { - foo = "bar"; - foobar = "baz"; - foobarbaz = "baz"; - }; - }; - - # code from example - testFoldlAttrs = { - expr = { - example = foldlAttrs - (acc: name: value: { - sum = acc.sum + value; - names = acc.names ++ [ name ]; - }) - { sum = 0; names = [ ]; } - { - foo = 1; - bar = 10; - }; - # should just return the initial value - emptySet = foldlAttrs (throw "function not needed") 123 { }; - # should just evaluate to the last value - accNotNeeded = foldlAttrs (_acc: _name: v: v) (throw "accumulator not needed") { z = 3; a = 2; }; - # the accumulator doesnt have to be an attrset it can be as trivial as being just a number or string - trivialAcc = foldlAttrs (acc: _name: v: acc * 10 + v) 1 { z = 1; a = 2; }; - }; - expected = { - example = { - sum = 11; - names = [ "bar" "foo" ]; - }; - emptySet = 123; - accNotNeeded = 3; - trivialAcc = 121; - }; - }; - - # code from the example - testRecursiveUpdateUntil = { - expr = recursiveUpdateUntil (path: l: r: path == ["foo"]) { - # first attribute set - foo.bar = 1; - foo.baz = 2; - bar = 3; - } { - #second attribute set - foo.bar = 1; - foo.quz = 2; - baz = 4; - }; - expected = { - foo.bar = 1; # 'foo.*' from the second set - foo.quz = 2; # - bar = 3; # 'bar' from the first set - baz = 4; # 'baz' from the second set - }; - }; - - testOverrideExistingEmpty = { - expr = overrideExisting {} { a = 1; }; - expected = {}; - }; - - testOverrideExistingDisjoint = { - expr = overrideExisting { b = 2; } { a = 1; }; - expected = { b = 2; }; - }; - - testOverrideExistingOverride = { - expr = overrideExisting { a = 3; b = 2; } { a = 1; }; - expected = { a = 1; b = 2; }; - }; - -# GENERATORS -# these tests assume attributes are converted to lists -# in alphabetical order - - testMkKeyValueDefault = { - expr = generators.mkKeyValueDefault {} ":" "f:oo" "bar"; - expected = ''f\:oo:bar''; - }; - - testMkValueString = { - expr = let - vals = { - int = 42; - string = ''fo"o''; - bool = true; - bool2 = false; - null = null; - # float = 42.23; # floats are strange - }; - in mapAttrs - (const (generators.mkValueStringDefault {})) - vals; - expected = { - int = "42"; - string = ''fo"o''; - bool = "true"; - bool2 = "false"; - null = "null"; - # float = "42.23" true false [ "bar" ] ]''; - }; - }; - - testToKeyValue = { - expr = generators.toKeyValue {} { - key = "value"; - "other=key" = "baz"; - }; - expected = '' - key=value - other\=key=baz - ''; - }; - - testToINIEmpty = { - expr = generators.toINI {} {}; - expected = ""; - }; - - testToINIEmptySection = { - expr = generators.toINI {} { foo = {}; bar = {}; }; - expected = '' - [bar] - - [foo] - ''; - }; - - testToINIDuplicateKeys = { - expr = generators.toINI { listsAsDuplicateKeys = true; } { foo.bar = true; baz.qux = [ 1 false ]; }; - expected = '' - [baz] - qux=1 - qux=false - - [foo] - bar=true - ''; - }; - - testToINIDefaultEscapes = { - expr = generators.toINI {} { - "no [ and ] allowed unescaped" = { - "and also no = in keys" = 42; - }; - }; - expected = '' - [no \[ and \] allowed unescaped] - and also no \= in keys=42 - ''; - }; - - testToINIDefaultFull = { - expr = generators.toINI {} { - "section 1" = { - attribute1 = 5; - x = "Me-se JarJar Binx"; - # booleans are converted verbatim by default - boolean = false; - }; - "foo[]" = { - "he\\h=he" = "this is okay"; - }; - }; - expected = '' - [foo\[\]] - he\h\=he=this is okay - - [section 1] - attribute1=5 - boolean=false - x=Me-se JarJar Binx - ''; - }; - - testToINIWithGlobalSectionEmpty = { - expr = generators.toINIWithGlobalSection {} { - globalSection = { - }; - sections = { - }; - }; - expected = '' - ''; - }; - - testToINIWithGlobalSectionGlobalEmptyIsTheSameAsToINI = - let - sections = { - "section 1" = { - attribute1 = 5; - x = "Me-se JarJar Binx"; - }; - "foo" = { - "he\\h=he" = "this is okay"; - }; - }; - in { - expr = - generators.toINIWithGlobalSection {} { - globalSection = {}; - sections = sections; - }; - expected = generators.toINI {} sections; - }; - - testToINIWithGlobalSectionFull = { - expr = generators.toINIWithGlobalSection {} { - globalSection = { - foo = "bar"; - test = false; - }; - sections = { - "section 1" = { - attribute1 = 5; - x = "Me-se JarJar Binx"; - }; - "foo" = { - "he\\h=he" = "this is okay"; - }; - }; - }; - expected = '' - foo=bar - test=false - - [foo] - he\h\=he=this is okay - - [section 1] - attribute1=5 - x=Me-se JarJar Binx - ''; - }; - - /* right now only invocation check */ - testToJSONSimple = - let val = { - foobar = [ "baz" 1 2 3 ]; - }; - in { - expr = generators.toJSON {} val; - # trivial implementation - expected = builtins.toJSON val; - }; - - /* right now only invocation check */ - testToYAMLSimple = - let val = { - list = [ { one = 1; } { two = 2; } ]; - all = 42; - }; - in { - expr = generators.toYAML {} val; - # trivial implementation - expected = builtins.toJSON val; - }; - - testToPretty = - let - deriv = derivation { name = "test"; builder = "/bin/sh"; system = "aarch64-linux"; }; - in { - expr = mapAttrs (const (generators.toPretty { multiline = false; })) rec { - int = 42; - float = 0.1337; - bool = true; - emptystring = ""; - string = "fn\${o}\"r\\d"; - newlinestring = "\n"; - path = /. + "/foo"; - null_ = null; - function = x: x; - functionArgs = { arg ? 4, foo }: arg; - list = [ 3 4 function [ false ] ]; - emptylist = []; - attrs = { foo = null; "foo b/ar" = "baz"; }; - emptyattrs = {}; - drv = deriv; - }; - expected = rec { - int = "42"; - float = "0.1337"; - bool = "true"; - emptystring = ''""''; - string = ''"fn\''${o}\"r\\d"''; - newlinestring = "\"\\n\""; - path = "/foo"; - null_ = "null"; - function = ""; - functionArgs = ""; - list = "[ 3 4 ${function} [ false ] ]"; - emptylist = "[ ]"; - attrs = "{ foo = null; \"foo b/ar\" = \"baz\"; }"; - emptyattrs = "{ }"; - drv = ""; - }; - }; - - testToPrettyLimit = - let - a.b = 1; - a.c = a; - in { - expr = generators.toPretty { } (generators.withRecursion { throwOnDepthLimit = false; depthLimit = 2; } a); - expected = "{\n b = 1;\n c = {\n b = \"\";\n c = {\n b = \"\";\n c = \"\";\n };\n };\n}"; - }; - - testToPrettyLimitThrow = - let - a.b = 1; - a.c = a; - in { - expr = (builtins.tryEval - (generators.toPretty { } (generators.withRecursion { depthLimit = 2; } a))).success; - expected = false; - }; - - testWithRecursionDealsWithFunctors = - let - functor = { - __functor = self: { a, b, }: null; - }; - a = { - value = "1234"; - b = functor; - c.d = functor; - }; - in { - expr = generators.toPretty { } (generators.withRecursion { depthLimit = 1; throwOnDepthLimit = false; } a); - expected = "{\n b = ;\n c = {\n d = \"\";\n };\n value = \"\";\n}"; - }; - - testToPrettyMultiline = { - expr = mapAttrs (const (generators.toPretty { })) rec { - list = [ 3 4 [ false ] ]; - attrs = { foo = null; bar.foo = "baz"; }; - newlinestring = "\n"; - multilinestring = '' - hello - ''${there} - te'''st - ''; - multilinestring' = '' - hello - there - test''; - }; - expected = rec { - list = '' - [ - 3 - 4 - [ - false - ] - ]''; - attrs = '' - { - bar = { - foo = "baz"; - }; - foo = null; - }''; - newlinestring = "''\n \n''"; - multilinestring = '' - ''' - hello - '''''${there} - te''''st - '''''; - multilinestring' = '' - ''' - hello - there - test'''''; - - }; - }; - - testToPrettyAllowPrettyValues = { - expr = generators.toPretty { allowPrettyValues = true; } - { __pretty = v: "«" + v + "»"; val = "foo"; }; - expected = "«foo»"; - }; - - - testToLuaEmptyAttrSet = { - expr = generators.toLua {} {}; - expected = ''{}''; - }; - - testToLuaEmptyList = { - expr = generators.toLua {} []; - expected = ''{}''; - }; - - testToLuaListOfVariousTypes = { - expr = generators.toLua {} [ null 43 3.14159 true ]; - expected = '' - { - nil, - 43, - 3.14159, - true - }''; - }; - - testToLuaString = { - expr = generators.toLua {} ''double-quote (") and single quotes (')''; - expected = ''"double-quote (\") and single quotes (')"''; - }; - - testToLuaAttrsetWithLuaInline = { - expr = generators.toLua {} { x = generators.mkLuaInline ''"abc" .. "def"''; }; - expected = '' - { - ["x"] = ("abc" .. "def") - }''; - }; - - testToLuaAttrsetWithSpaceInKey = { - expr = generators.toLua {} { "some space and double-quote (\")" = 42; }; - expected = '' - { - ["some space and double-quote (\")"] = 42 - }''; - }; - - testToLuaWithoutMultiline = { - expr = generators.toLua { multiline = false; } [ 41 43 ]; - expected = ''{ 41, 43 }''; - }; - - testToLuaEmptyBindings = { - expr = generators.toLua { asBindings = true; } {}; - expected = ""; - }; - - testToLuaBindings = { - expr = generators.toLua { asBindings = true; } { x1 = 41; _y = { a = 43; }; }; - expected = '' - _y = { - ["a"] = 43 - } - x1 = 41 - ''; - }; - - testToLuaPartialTableBindings = { - expr = generators.toLua { asBindings = true; } { "x.y" = 42; }; - expected = '' - x.y = 42 - ''; - }; - - testToLuaIndentedBindings = { - expr = generators.toLua { asBindings = true; indent = " "; } { x = { y = 42; }; }; - expected = " x = {\n [\"y\"] = 42\n }\n"; - }; - - testToLuaBindingsWithSpace = testingThrow ( - generators.toLua { asBindings = true; } { "with space" = 42; } - ); - - testToLuaBindingsWithLeadingDigit = testingThrow ( - generators.toLua { asBindings = true; } { "11eleven" = 42; } - ); - - testToLuaBasicExample = { - expr = generators.toLua {} { - cmd = [ "typescript-language-server" "--stdio" ]; - settings.workspace.library = generators.mkLuaInline ''vim.api.nvim_get_runtime_file("", true)''; - }; - expected = '' - { - ["cmd"] = { - "typescript-language-server", - "--stdio" - }, - ["settings"] = { - ["workspace"] = { - ["library"] = (vim.api.nvim_get_runtime_file("", true)) - } - } - }''; - }; - -# CLI - - testToGNUCommandLine = { - expr = cli.toGNUCommandLine {} { - data = builtins.toJSON { id = 0; }; - X = "PUT"; - retry = 3; - retry-delay = null; - url = [ "https://example.com/foo" "https://example.com/bar" ]; - silent = false; - verbose = true; - }; - - expected = [ - "-X" "PUT" - "--data" "{\"id\":0}" - "--retry" "3" - "--url" "https://example.com/foo" - "--url" "https://example.com/bar" - "--verbose" - ]; - }; - - testToGNUCommandLineShell = { - expr = cli.toGNUCommandLineShell {} { - data = builtins.toJSON { id = 0; }; - X = "PUT"; - retry = 3; - retry-delay = null; - url = [ "https://example.com/foo" "https://example.com/bar" ]; - silent = false; - verbose = true; - }; - - expected = "'-X' 'PUT' '--data' '{\"id\":0}' '--retry' '3' '--url' 'https://example.com/foo' '--url' 'https://example.com/bar' '--verbose'"; - }; - - testSanitizeDerivationNameLeadingDots = testSanitizeDerivationName { - name = "..foo"; - expected = "foo"; - }; - - testSanitizeDerivationNameUnicode = testSanitizeDerivationName { - name = "fö"; - expected = "f-"; - }; - - testSanitizeDerivationNameAscii = testSanitizeDerivationName { - name = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"; - expected = "-+--.-0123456789-=-?-ABCDEFGHIJKLMNOPQRSTUVWXYZ-_-abcdefghijklmnopqrstuvwxyz-"; - }; - - testSanitizeDerivationNameTooLong = testSanitizeDerivationName { - name = "This string is loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"; - expected = "loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"; - }; - - testSanitizeDerivationNameTooLongWithInvalid = testSanitizeDerivationName { - name = "Hello there aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &&&&&&&&"; - expected = "there-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-"; - }; - - testSanitizeDerivationNameEmpty = testSanitizeDerivationName { - name = ""; - expected = "unknown"; - }; - - testFreeformOptions = { - expr = - let - submodule = { lib, ... }: { - freeformType = lib.types.attrsOf (lib.types.submodule { - options.bar = lib.mkOption {}; - }); - options.bar = lib.mkOption {}; - }; - - module = { lib, ... }: { - options.foo = lib.mkOption { - type = lib.types.submodule submodule; - }; - }; - - options = (evalModules { - modules = [ module ]; - }).options; - - locs = filter (o: ! o.internal) (optionAttrSetToDocList options); - in map (o: o.loc) locs; - expected = [ [ "_module" "args" ] [ "foo" ] [ "foo" "" "bar" ] [ "foo" "bar" ] ]; - }; - - testCartesianProductOfEmptySet = { - expr = cartesianProductOfSets {}; - expected = [ {} ]; - }; - - testCartesianProductOfOneSet = { - expr = cartesianProductOfSets { a = [ 1 2 3 ]; }; - expected = [ { a = 1; } { a = 2; } { a = 3; } ]; - }; - - testCartesianProductOfTwoSets = { - expr = cartesianProductOfSets { a = [ 1 ]; b = [ 10 20 ]; }; - expected = [ - { a = 1; b = 10; } - { a = 1; b = 20; } - ]; - }; - - testCartesianProductOfTwoSetsWithOneEmpty = { - expr = cartesianProductOfSets { a = [ ]; b = [ 10 20 ]; }; - expected = [ ]; - }; - - testCartesianProductOfThreeSets = { - expr = cartesianProductOfSets { - a = [ 1 2 3 ]; - b = [ 10 20 30 ]; - c = [ 100 200 300 ]; - }; - expected = [ - { a = 1; b = 10; c = 100; } - { a = 1; b = 10; c = 200; } - { a = 1; b = 10; c = 300; } - - { a = 1; b = 20; c = 100; } - { a = 1; b = 20; c = 200; } - { a = 1; b = 20; c = 300; } - - { a = 1; b = 30; c = 100; } - { a = 1; b = 30; c = 200; } - { a = 1; b = 30; c = 300; } - - { a = 2; b = 10; c = 100; } - { a = 2; b = 10; c = 200; } - { a = 2; b = 10; c = 300; } - - { a = 2; b = 20; c = 100; } - { a = 2; b = 20; c = 200; } - { a = 2; b = 20; c = 300; } - - { a = 2; b = 30; c = 100; } - { a = 2; b = 30; c = 200; } - { a = 2; b = 30; c = 300; } - - { a = 3; b = 10; c = 100; } - { a = 3; b = 10; c = 200; } - { a = 3; b = 10; c = 300; } - - { a = 3; b = 20; c = 100; } - { a = 3; b = 20; c = 200; } - { a = 3; b = 20; c = 300; } - - { a = 3; b = 30; c = 100; } - { a = 3; b = 30; c = 200; } - { a = 3; b = 30; c = 300; } - ]; - }; - - # The example from the showAttrPath documentation - testShowAttrPathExample = { - expr = showAttrPath [ "foo" "10" "bar" ]; - expected = "foo.\"10\".bar"; - }; - - testShowAttrPathEmpty = { - expr = showAttrPath []; - expected = ""; - }; - - testShowAttrPathVarious = { - expr = showAttrPath [ - "." - "foo" - "2" - "a2-b" - "_bc'de" - ]; - expected = ''".".foo."2".a2-b._bc'de''; - }; - - testGroupBy = { - expr = groupBy (n: toString (mod n 5)) (range 0 16); - expected = { - "0" = [ 0 5 10 15 ]; - "1" = [ 1 6 11 16 ]; - "2" = [ 2 7 12 ]; - "3" = [ 3 8 13 ]; - "4" = [ 4 9 14 ]; - }; - }; - - testGroupBy' = { - expr = groupBy' builtins.add 0 (x: boolToString (x > 2)) [ 5 1 2 3 4 ]; - expected = { false = 3; true = 12; }; - }; - - # The example from the updateManyAttrsByPath documentation - testUpdateManyAttrsByPathExample = { - expr = updateManyAttrsByPath [ - { - path = [ "a" "b" ]; - update = old: { d = old.c; }; - } - { - path = [ "a" "b" "c" ]; - update = old: old + 1; - } - { - path = [ "x" "y" ]; - update = old: "xy"; - } - ] { a.b.c = 0; }; - expected = { a = { b = { d = 1; }; }; x = { y = "xy"; }; }; - }; - - # If there are no updates, the value is passed through - testUpdateManyAttrsByPathNone = { - expr = updateManyAttrsByPath [] "something"; - expected = "something"; - }; - - # A single update to the root path is just like applying the function directly - testUpdateManyAttrsByPathSingleIncrement = { - expr = updateManyAttrsByPath [ - { - path = [ ]; - update = old: old + 1; - } - ] 0; - expected = 1; - }; - - # Multiple updates can be applied are done in order - testUpdateManyAttrsByPathMultipleIncrements = { - expr = updateManyAttrsByPath [ - { - path = [ ]; - update = old: old + "a"; - } - { - path = [ ]; - update = old: old + "b"; - } - { - path = [ ]; - update = old: old + "c"; - } - ] ""; - expected = "abc"; - }; - - # If an update doesn't use the value, all previous updates are not evaluated - testUpdateManyAttrsByPathLazy = { - expr = updateManyAttrsByPath [ - { - path = [ ]; - update = old: old + throw "nope"; - } - { - path = [ ]; - update = old: "untainted"; - } - ] (throw "start"); - expected = "untainted"; - }; - - # Deeply nested attributes can be updated without affecting others - testUpdateManyAttrsByPathDeep = { - expr = updateManyAttrsByPath [ - { - path = [ "a" "b" "c" ]; - update = old: old + 1; - } - ] { - a.b.c = 0; - - a.b.z = 0; - a.y.z = 0; - x.y.z = 0; - }; - expected = { - a.b.c = 1; - - a.b.z = 0; - a.y.z = 0; - x.y.z = 0; - }; - }; - - # Nested attributes are updated first - testUpdateManyAttrsByPathNestedBeforehand = { - expr = updateManyAttrsByPath [ - { - path = [ "a" ]; - update = old: old // { x = old.b; }; - } - { - path = [ "a" "b" ]; - update = old: old + 1; - } - ] { - a.b = 0; - }; - expected = { - a.b = 1; - a.x = 1; - }; - }; - - ## Levenshtein distance functions and co. - testCommonPrefixLengthEmpty = { - expr = strings.commonPrefixLength "" "hello"; - expected = 0; - }; - - testCommonPrefixLengthSame = { - expr = strings.commonPrefixLength "hello" "hello"; - expected = 5; - }; - - testCommonPrefixLengthDiffering = { - expr = strings.commonPrefixLength "hello" "hey"; - expected = 2; - }; - - testCommonSuffixLengthEmpty = { - expr = strings.commonSuffixLength "" "hello"; - expected = 0; - }; - - testCommonSuffixLengthSame = { - expr = strings.commonSuffixLength "hello" "hello"; - expected = 5; - }; - - testCommonSuffixLengthDiffering = { - expr = strings.commonSuffixLength "test" "rest"; - expected = 3; - }; - - testLevenshteinEmpty = { - expr = strings.levenshtein "" ""; - expected = 0; - }; - - testLevenshteinOnlyAdd = { - expr = strings.levenshtein "" "hello there"; - expected = 11; - }; - - testLevenshteinOnlyRemove = { - expr = strings.levenshtein "hello there" ""; - expected = 11; - }; - - testLevenshteinOnlyTransform = { - expr = strings.levenshtein "abcdef" "ghijkl"; - expected = 6; - }; - - testLevenshteinMixed = { - expr = strings.levenshtein "kitchen" "sitting"; - expected = 5; - }; - - testLevenshteinAtMostZeroFalse = { - expr = strings.levenshteinAtMost 0 "foo" "boo"; - expected = false; - }; - - testLevenshteinAtMostZeroTrue = { - expr = strings.levenshteinAtMost 0 "foo" "foo"; - expected = true; - }; - - testLevenshteinAtMostOneFalse = { - expr = strings.levenshteinAtMost 1 "car" "ct"; - expected = false; - }; - - testLevenshteinAtMostOneTrue = { - expr = strings.levenshteinAtMost 1 "car" "cr"; - expected = true; - }; - - # We test levenshteinAtMost 2 particularly well because it uses a complicated - # implementation - testLevenshteinAtMostTwoIsEmpty = { - expr = strings.levenshteinAtMost 2 "" ""; - expected = true; - }; - - testLevenshteinAtMostTwoIsZero = { - expr = strings.levenshteinAtMost 2 "abcdef" "abcdef"; - expected = true; - }; - - testLevenshteinAtMostTwoIsOne = { - expr = strings.levenshteinAtMost 2 "abcdef" "abddef"; - expected = true; - }; - - testLevenshteinAtMostTwoDiff0False = { - expr = strings.levenshteinAtMost 2 "abcdef" "aczyef"; - expected = false; - }; - - testLevenshteinAtMostTwoDiff0Outer = { - expr = strings.levenshteinAtMost 2 "abcdef" "zbcdez"; - expected = true; - }; - - testLevenshteinAtMostTwoDiff0DelLeft = { - expr = strings.levenshteinAtMost 2 "abcdef" "bcdefz"; - expected = true; - }; - - testLevenshteinAtMostTwoDiff0DelRight = { - expr = strings.levenshteinAtMost 2 "abcdef" "zabcde"; - expected = true; - }; - - testLevenshteinAtMostTwoDiff1False = { - expr = strings.levenshteinAtMost 2 "abcdef" "bddez"; - expected = false; - }; - - testLevenshteinAtMostTwoDiff1DelLeft = { - expr = strings.levenshteinAtMost 2 "abcdef" "bcdez"; - expected = true; - }; - - testLevenshteinAtMostTwoDiff1DelRight = { - expr = strings.levenshteinAtMost 2 "abcdef" "zbcde"; - expected = true; - }; - - testLevenshteinAtMostTwoDiff2False = { - expr = strings.levenshteinAtMost 2 "hello" "hxo"; - expected = false; - }; - - testLevenshteinAtMostTwoDiff2True = { - expr = strings.levenshteinAtMost 2 "hello" "heo"; - expected = true; - }; - - testLevenshteinAtMostTwoDiff3 = { - expr = strings.levenshteinAtMost 2 "hello" "ho"; - expected = false; - }; - - testLevenshteinAtMostThreeFalse = { - expr = strings.levenshteinAtMost 3 "hello" "Holla!"; - expected = false; - }; - - testLevenshteinAtMostThreeTrue = { - expr = strings.levenshteinAtMost 3 "hello" "Holla"; - expected = true; - }; - - # lazyDerivation - - testLazyDerivationIsLazyInDerivationForAttrNames = { - expr = attrNames (lazyDerivation { - derivation = throw "not lazy enough"; - }); - # It's ok to add attribute names here when lazyDerivation is improved - # in accordance with its inline comments. - expected = [ "drvPath" "meta" "name" "out" "outPath" "outputName" "outputs" "system" "type" ]; - }; - - testLazyDerivationIsLazyInDerivationForPassthruAttr = { - expr = (lazyDerivation { - derivation = throw "not lazy enough"; - passthru.tests = "whatever is in tests"; - }).tests; - expected = "whatever is in tests"; - }; - - testLazyDerivationIsLazyInDerivationForPassthruAttr2 = { - # passthru.tests is not a special case. It works for any attr. - expr = (lazyDerivation { - derivation = throw "not lazy enough"; - passthru.foo = "whatever is in foo"; - }).foo; - expected = "whatever is in foo"; - }; - - testLazyDerivationIsLazyInDerivationForMeta = { - expr = (lazyDerivation { - derivation = throw "not lazy enough"; - meta = "whatever is in meta"; - }).meta; - expected = "whatever is in meta"; - }; - - testLazyDerivationReturnsDerivationAttrs = let - derivation = { - type = "derivation"; - outputs = ["out"]; - out = "test out"; - outPath = "test outPath"; - outputName = "out"; - drvPath = "test drvPath"; - name = "test name"; - system = "test system"; - meta = "test meta"; - }; - in { - expr = lazyDerivation { inherit derivation; }; - expected = derivation; - }; - - testTypeDescriptionInt = { - expr = (with types; int).description; - expected = "signed integer"; - }; - testTypeDescriptionListOfInt = { - expr = (with types; listOf int).description; - expected = "list of signed integer"; - }; - testTypeDescriptionListOfListOfInt = { - expr = (with types; listOf (listOf int)).description; - expected = "list of list of signed integer"; - }; - testTypeDescriptionListOfEitherStrOrBool = { - expr = (with types; listOf (either str bool)).description; - expected = "list of (string or boolean)"; - }; - testTypeDescriptionEitherListOfStrOrBool = { - expr = (with types; either (listOf bool) str).description; - expected = "(list of boolean) or string"; - }; - testTypeDescriptionEitherStrOrListOfBool = { - expr = (with types; either str (listOf bool)).description; - expected = "string or list of boolean"; - }; - testTypeDescriptionOneOfListOfStrOrBool = { - expr = (with types; oneOf [ (listOf bool) str ]).description; - expected = "(list of boolean) or string"; - }; - testTypeDescriptionOneOfListOfStrOrBoolOrNumber = { - expr = (with types; oneOf [ (listOf bool) str number ]).description; - expected = "(list of boolean) or string or signed integer or floating point number"; - }; - testTypeDescriptionEitherListOfBoolOrEitherStringOrNumber = { - expr = (with types; either (listOf bool) (either str number)).description; - expected = "(list of boolean) or string or signed integer or floating point number"; - }; - testTypeDescriptionEitherEitherListOfBoolOrStringOrNumber = { - expr = (with types; either (either (listOf bool) str) number).description; - expected = "(list of boolean) or string or signed integer or floating point number"; - }; - testTypeDescriptionEitherNullOrBoolOrString = { - expr = (with types; either (nullOr bool) str).description; - expected = "null or boolean or string"; - }; - testTypeDescriptionEitherListOfEitherBoolOrStrOrInt = { - expr = (with types; either (listOf (either bool str)) int).description; - expected = "(list of (boolean or string)) or signed integer"; - }; - testTypeDescriptionEitherIntOrListOrEitherBoolOrStr = { - expr = (with types; either int (listOf (either bool str))).description; - expected = "signed integer or list of (boolean or string)"; - }; -} diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh deleted file mode 100755 index c1cf0a94a1b..00000000000 --- a/lib/tests/modules.sh +++ /dev/null @@ -1,382 +0,0 @@ -#!/usr/bin/env bash -# -# This script is used to test that the module system is working as expected. -# By default it test the version of nixpkgs which is defined in the NIX_PATH. - -set -o errexit -o noclobber -o nounset -o pipefail -shopt -s failglob inherit_errexit - -# https://stackoverflow.com/a/246128/6605742 -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" - -cd "$DIR"/modules - -pass=0 -fail=0 - -evalConfig() { - local attr=$1 - shift - local script="import ./default.nix { modules = [ $* ];}" - nix-instantiate --timeout 1 -E "$script" -A "$attr" --eval-only --show-trace --read-write-mode -} - -reportFailure() { - local attr=$1 - shift - local script="import ./default.nix { modules = [ $* ];}" - echo 2>&1 "$ nix-instantiate -E '$script' -A '$attr' --eval-only" - evalConfig "$attr" "$@" || true - ((++fail)) -} - -checkConfigOutput() { - local outputContains=$1 - shift - if evalConfig "$@" 2>/dev/null | grep --silent "$outputContains" ; then - ((++pass)) - else - echo 2>&1 "error: Expected result matching '$outputContains', while evaluating" - reportFailure "$@" - fi -} - -checkConfigError() { - local errorContains=$1 - local err="" - shift - if err="$(evalConfig "$@" 2>&1 >/dev/null)"; then - echo 2>&1 "error: Expected error code, got exit code 0, while evaluating" - reportFailure "$@" - else - if echo "$err" | grep -zP --silent "$errorContains" ; then - ((++pass)) - else - echo 2>&1 "error: Expected error matching '$errorContains', while evaluating" - reportFailure "$@" - fi - fi -} - -# Shorthand meta attribute does not duplicate the config -checkConfigOutput '^"one two"$' config.result ./shorthand-meta.nix - -# Check boolean option. -checkConfigOutput '^false$' config.enable ./declare-enable.nix -checkConfigError 'The option .* does not exist. Definition values:\n\s*- In .*: true' config.enable ./define-enable.nix -checkConfigError 'The option .* does not exist. Definition values:\n\s*- In .*' config.enable ./define-enable-throw.nix -checkConfigError 'while evaluating a definition from `.*/define-enable-abort.nix' config.enable ./define-enable-abort.nix -checkConfigError 'while evaluating the error message for definitions for .enable., which is an option that does not exist' config.enable ./define-enable-abort.nix - -checkConfigOutput '^1$' config.bare-submodule.nested ./declare-bare-submodule.nix ./declare-bare-submodule-nested-option.nix -checkConfigOutput '^2$' config.bare-submodule.deep ./declare-bare-submodule.nix ./declare-bare-submodule-deep-option.nix -checkConfigOutput '^42$' config.bare-submodule.nested ./declare-bare-submodule.nix ./declare-bare-submodule-nested-option.nix ./declare-bare-submodule-deep-option.nix ./define-bare-submodule-values.nix -checkConfigOutput '^420$' config.bare-submodule.deep ./declare-bare-submodule.nix ./declare-bare-submodule-nested-option.nix ./declare-bare-submodule-deep-option.nix ./define-bare-submodule-values.nix -checkConfigOutput '^2$' config.bare-submodule.deep ./declare-bare-submodule.nix ./declare-bare-submodule-deep-option.nix ./define-shorthandOnlyDefinesConfig-true.nix -checkConfigError 'The option .bare-submodule.deep. in .*/declare-bare-submodule-deep-option.nix. is already declared in .*/declare-bare-submodule-deep-option-duplicate.nix' config.bare-submodule.deep ./declare-bare-submodule.nix ./declare-bare-submodule-deep-option.nix ./declare-bare-submodule-deep-option-duplicate.nix - -# Check integer types. -# unsigned -checkConfigOutput '^42$' config.value ./declare-int-unsigned-value.nix ./define-value-int-positive.nix -checkConfigError 'A definition for option .* is not of type.*unsigned integer.*. Definition values:\n\s*- In .*: -23' config.value ./declare-int-unsigned-value.nix ./define-value-int-negative.nix -# positive -checkConfigError 'A definition for option .* is not of type.*positive integer.*. Definition values:\n\s*- In .*: 0' config.value ./declare-int-positive-value.nix ./define-value-int-zero.nix -# between -checkConfigOutput '^42$' config.value ./declare-int-between-value.nix ./define-value-int-positive.nix -checkConfigError 'A definition for option .* is not of type.*between.*-21 and 43.*inclusive.*. Definition values:\n\s*- In .*: -23' config.value ./declare-int-between-value.nix ./define-value-int-negative.nix - -# Check either types -# types.either -checkConfigOutput '^42$' config.value ./declare-either.nix ./define-value-int-positive.nix -checkConfigOutput '^"24"$' config.value ./declare-either.nix ./define-value-string.nix -# types.oneOf -checkConfigOutput '^42$' config.value ./declare-oneOf.nix ./define-value-int-positive.nix -checkConfigOutput '^\[ \]$' config.value ./declare-oneOf.nix ./define-value-list.nix -checkConfigOutput '^"24"$' config.value ./declare-oneOf.nix ./define-value-string.nix - -# Check mkForce without submodules. -set -- config.enable ./declare-enable.nix ./define-enable.nix -checkConfigOutput '^true$' "$@" -checkConfigOutput '^false$' "$@" ./define-force-enable.nix -checkConfigOutput '^false$' "$@" ./define-enable-force.nix - -# Check mkForce with option and submodules. -checkConfigError 'attribute .*foo.* .* not found' config.attrsOfSub.foo.enable ./declare-attrsOfSub-any-enable.nix -checkConfigOutput '^false$' config.attrsOfSub.foo.enable ./declare-attrsOfSub-any-enable.nix ./define-attrsOfSub-foo.nix -set -- config.attrsOfSub.foo.enable ./declare-attrsOfSub-any-enable.nix ./define-attrsOfSub-foo-enable.nix -checkConfigOutput '^true$' "$@" -checkConfigOutput '^false$' "$@" ./define-force-attrsOfSub-foo-enable.nix -checkConfigOutput '^false$' "$@" ./define-attrsOfSub-force-foo-enable.nix -checkConfigOutput '^false$' "$@" ./define-attrsOfSub-foo-force-enable.nix -checkConfigOutput '^false$' "$@" ./define-attrsOfSub-foo-enable-force.nix - -# Check overriding effect of mkForce on submodule definitions. -checkConfigError 'attribute .*bar.* .* not found' config.attrsOfSub.bar.enable ./declare-attrsOfSub-any-enable.nix ./define-attrsOfSub-foo.nix -checkConfigOutput '^false$' config.attrsOfSub.bar.enable ./declare-attrsOfSub-any-enable.nix ./define-attrsOfSub-foo.nix ./define-attrsOfSub-bar.nix -set -- config.attrsOfSub.bar.enable ./declare-attrsOfSub-any-enable.nix ./define-attrsOfSub-foo.nix ./define-attrsOfSub-bar-enable.nix -checkConfigOutput '^true$' "$@" -checkConfigError 'attribute .*bar.* .* not found' "$@" ./define-force-attrsOfSub-foo-enable.nix -checkConfigError 'attribute .*bar.* .* not found' "$@" ./define-attrsOfSub-force-foo-enable.nix -checkConfigOutput '^true$' "$@" ./define-attrsOfSub-foo-force-enable.nix -checkConfigOutput '^true$' "$@" ./define-attrsOfSub-foo-enable-force.nix - -# Check mkIf with submodules. -checkConfigError 'attribute .*foo.* .* not found' config.attrsOfSub.foo.enable ./declare-enable.nix ./declare-attrsOfSub-any-enable.nix -set -- config.attrsOfSub.foo.enable ./declare-enable.nix ./declare-attrsOfSub-any-enable.nix -checkConfigError 'attribute .*foo.* .* not found' "$@" ./define-if-attrsOfSub-foo-enable.nix -checkConfigError 'attribute .*foo.* .* not found' "$@" ./define-attrsOfSub-if-foo-enable.nix -checkConfigError 'attribute .*foo.* .* not found' "$@" ./define-attrsOfSub-foo-if-enable.nix -checkConfigOutput '^false$' "$@" ./define-attrsOfSub-foo-enable-if.nix -checkConfigOutput '^true$' "$@" ./define-enable.nix ./define-if-attrsOfSub-foo-enable.nix -checkConfigOutput '^true$' "$@" ./define-enable.nix ./define-attrsOfSub-if-foo-enable.nix -checkConfigOutput '^true$' "$@" ./define-enable.nix ./define-attrsOfSub-foo-if-enable.nix -checkConfigOutput '^true$' "$@" ./define-enable.nix ./define-attrsOfSub-foo-enable-if.nix - -# Check disabledModules with config definitions and option declarations. -set -- config.enable ./define-enable.nix ./declare-enable.nix -checkConfigOutput '^true$' "$@" -checkConfigOutput '^false$' "$@" ./disable-define-enable.nix -checkConfigOutput '^false$' "$@" ./disable-define-enable-string-path.nix -checkConfigError "The option .*enable.* does not exist. Definition values:\n\s*- In .*: true" "$@" ./disable-declare-enable.nix -checkConfigError "attribute .*enable.* in selection path .*config.enable.* not found" "$@" ./disable-define-enable.nix ./disable-declare-enable.nix -checkConfigError "attribute .*enable.* in selection path .*config.enable.* not found" "$@" ./disable-enable-modules.nix - -checkConfigOutput '^true$' 'config.positive.enable' ./disable-module-with-key.nix -checkConfigOutput '^false$' 'config.negative.enable' ./disable-module-with-key.nix -checkConfigError 'Module ..*disable-module-bad-key.nix. contains a disabledModules item that is an attribute set, presumably a module, that does not have a .key. attribute. .*' 'config.enable' ./disable-module-bad-key.nix - -# Not sure if we want to keep supporting module keys that aren't strings, paths or v?key, but we shouldn't remove support accidentally. -checkConfigOutput '^true$' 'config.positive.enable' ./disable-module-with-toString-key.nix -checkConfigOutput '^false$' 'config.negative.enable' ./disable-module-with-toString-key.nix - -# Check _module.args. -set -- config.enable ./declare-enable.nix ./define-enable-with-custom-arg.nix -checkConfigError 'while evaluating the module argument .*custom.* in .*define-enable-with-custom-arg.nix.*:' "$@" -checkConfigOutput '^true$' "$@" ./define-_module-args-custom.nix - -# Check that using _module.args on imports cause infinite recursions, with -# the proper error context. -set -- "$@" ./define-_module-args-custom.nix ./import-custom-arg.nix -checkConfigError 'while evaluating the module argument .*custom.* in .*import-custom-arg.nix.*:' "$@" -checkConfigError 'infinite recursion encountered' "$@" - -# Check _module.check. -set -- config.enable ./declare-enable.nix ./define-enable.nix ./define-attrsOfSub-foo.nix -checkConfigError 'The option .* does not exist. Definition values:\n\s*- In .*' "$@" -checkConfigOutput '^true$' "$@" ./define-module-check.nix - -# Check coerced value. -checkConfigOutput '^"42"$' config.value ./declare-coerced-value.nix -checkConfigOutput '^"24"$' config.value ./declare-coerced-value.nix ./define-value-string.nix -checkConfigError 'A definition for option .* is not.*string or signed integer convertible to it.*. Definition values:\n\s*- In .*: \[ \]' config.value ./declare-coerced-value.nix ./define-value-list.nix - -# Check coerced value with unsound coercion -checkConfigOutput '^12$' config.value ./declare-coerced-value-unsound.nix -checkConfigError 'A definition for option .* is not of type .*. Definition values:\n\s*- In .*: "1000"' config.value ./declare-coerced-value-unsound.nix ./define-value-string-bigint.nix -checkConfigError 'toInt: Could not convert .* to int' config.value ./declare-coerced-value-unsound.nix ./define-value-string-arbitrary.nix - -# Check mkAliasOptionModule. -checkConfigOutput '^true$' config.enable ./alias-with-priority.nix -checkConfigOutput '^true$' config.enableAlias ./alias-with-priority.nix -checkConfigOutput '^false$' config.enable ./alias-with-priority-can-override.nix -checkConfigOutput '^false$' config.enableAlias ./alias-with-priority-can-override.nix - -# submoduleWith - -## specialArgs should work -checkConfigOutput '^"foo"$' config.submodule.foo ./declare-submoduleWith-special.nix - -## shorthandOnlyDefines config behaves as expected -checkConfigOutput '^true$' config.submodule.config ./declare-submoduleWith-shorthand.nix ./define-submoduleWith-shorthand.nix -checkConfigError 'is not of type `boolean' config.submodule.config ./declare-submoduleWith-shorthand.nix ./define-submoduleWith-noshorthand.nix -checkConfigError "You're trying to define a value of type \`bool'\n\s*rather than an attribute set for the option" config.submodule.config ./declare-submoduleWith-noshorthand.nix ./define-submoduleWith-shorthand.nix -checkConfigOutput '^true$' config.submodule.config ./declare-submoduleWith-noshorthand.nix ./define-submoduleWith-noshorthand.nix - -## submoduleWith should merge all modules in one swoop -checkConfigOutput '^true$' config.submodule.inner ./declare-submoduleWith-modules.nix -checkConfigOutput '^true$' config.submodule.outer ./declare-submoduleWith-modules.nix -# Should also be able to evaluate the type name (which evaluates freeformType, -# which evaluates all the modules defined by the type) -checkConfigOutput '^"submodule"$' options.submodule.type.description ./declare-submoduleWith-modules.nix - -## submodules can be declared using (evalModules {...}).type -checkConfigOutput '^true$' config.submodule.inner ./declare-submodule-via-evalModules.nix -checkConfigOutput '^true$' config.submodule.outer ./declare-submodule-via-evalModules.nix -# Should also be able to evaluate the type name (which evaluates freeformType, -# which evaluates all the modules defined by the type) -checkConfigOutput '^"submodule"$' options.submodule.type.description ./declare-submodule-via-evalModules.nix - -## Paths should be allowed as values and work as expected -checkConfigOutput '^true$' config.submodule.enable ./declare-submoduleWith-path.nix - -## deferredModule -# default module is merged into nodes.foo -checkConfigOutput '"beta"' config.nodes.foo.settingsDict.c ./deferred-module.nix -# errors from the default module are reported with accurate location -checkConfigError 'In `the-file-that-contains-the-bad-config.nix, via option default'\'': "bogus"' config.nodes.foo.bottom ./deferred-module.nix -checkConfigError '.*lib/tests/modules/deferred-module-error.nix, via option deferred [(]:anon-1:anon-1:anon-1[)] does not look like a module.' config.result ./deferred-module-error.nix - -# Check the file location information is propagated into submodules -checkConfigOutput the-file.nix config.submodule.internalFiles.0 ./submoduleFiles.nix - - -# Check that disabledModules works recursively and correctly -checkConfigOutput '^true$' config.enable ./disable-recursive/main.nix -checkConfigOutput '^true$' config.enable ./disable-recursive/{main.nix,disable-foo.nix} -checkConfigOutput '^true$' config.enable ./disable-recursive/{main.nix,disable-bar.nix} -checkConfigError 'The option .* does not exist. Definition values:\n\s*- In .*: true' config.enable ./disable-recursive/{main.nix,disable-foo.nix,disable-bar.nix} - -# Check that imports can depend on derivations -checkConfigOutput '^true$' config.enable ./import-from-store.nix - -# Check that configs can be conditional on option existence -checkConfigOutput '^true$' config.enable ./define-option-dependently.nix ./declare-enable.nix ./declare-int-positive-value.nix -checkConfigOutput '^360$' config.value ./define-option-dependently.nix ./declare-enable.nix ./declare-int-positive-value.nix -checkConfigOutput '^7$' config.value ./define-option-dependently.nix ./declare-int-positive-value.nix -checkConfigOutput '^true$' config.set.enable ./define-option-dependently-nested.nix ./declare-enable-nested.nix ./declare-int-positive-value-nested.nix -checkConfigOutput '^360$' config.set.value ./define-option-dependently-nested.nix ./declare-enable-nested.nix ./declare-int-positive-value-nested.nix -checkConfigOutput '^7$' config.set.value ./define-option-dependently-nested.nix ./declare-int-positive-value-nested.nix - -# Check attrsOf and lazyAttrsOf. Only lazyAttrsOf should be lazy, and only -# attrsOf should work with conditional definitions -# In addition, lazyAttrsOf should honor an options emptyValue -checkConfigError "is not lazy" config.isLazy ./declare-attrsOf.nix ./attrsOf-lazy-check.nix -checkConfigOutput '^true$' config.isLazy ./declare-lazyAttrsOf.nix ./attrsOf-lazy-check.nix -checkConfigOutput '^true$' config.conditionalWorks ./declare-attrsOf.nix ./attrsOf-conditional-check.nix -checkConfigOutput '^false$' config.conditionalWorks ./declare-lazyAttrsOf.nix ./attrsOf-conditional-check.nix -checkConfigOutput '^"empty"$' config.value.foo ./declare-lazyAttrsOf.nix ./attrsOf-conditional-check.nix - - -# Even with multiple assignments, a type error should be thrown if any of them aren't valid -checkConfigError 'A definition for option .* is not of type .*' \ - config.value ./declare-int-unsigned-value.nix ./define-value-list.nix ./define-value-int-positive.nix - -## Freeform modules -# Assigning without a declared option should work -checkConfigOutput '^"24"$' config.value ./freeform-attrsOf.nix ./define-value-string.nix -# No freeform assignments shouldn't make it error -checkConfigOutput '^{ }$' config ./freeform-attrsOf.nix -# but only if the type matches -checkConfigError 'A definition for option .* is not of type .*' config.value ./freeform-attrsOf.nix ./define-value-list.nix -# and properties should be applied -checkConfigOutput '^"yes"$' config.value ./freeform-attrsOf.nix ./define-value-string-properties.nix -# Options should still be declarable, and be able to have a type that doesn't match the freeform type -checkConfigOutput '^false$' config.enable ./freeform-attrsOf.nix ./define-value-string.nix ./declare-enable.nix -checkConfigOutput '^"24"$' config.value ./freeform-attrsOf.nix ./define-value-string.nix ./declare-enable.nix -# and this should work too with nested values -checkConfigOutput '^false$' config.nest.foo ./freeform-attrsOf.nix ./freeform-nested.nix -checkConfigOutput '^"bar"$' config.nest.bar ./freeform-attrsOf.nix ./freeform-nested.nix -# Check whether a declared option can depend on an freeform-typed one -checkConfigOutput '^null$' config.foo ./freeform-attrsOf.nix ./freeform-str-dep-unstr.nix -checkConfigOutput '^"24"$' config.foo ./freeform-attrsOf.nix ./freeform-str-dep-unstr.nix ./define-value-string.nix -# Check whether an freeform-typed value can depend on a declared option, this can only work with lazyAttrsOf -checkConfigError 'infinite recursion encountered' config.foo ./freeform-attrsOf.nix ./freeform-unstr-dep-str.nix -checkConfigError 'The option .* is used but not defined' config.foo ./freeform-lazyAttrsOf.nix ./freeform-unstr-dep-str.nix -checkConfigOutput '^"24"$' config.foo ./freeform-lazyAttrsOf.nix ./freeform-unstr-dep-str.nix ./define-value-string.nix -# submodules in freeformTypes should have their locations annotated -checkConfigOutput '/freeform-submodules.nix"$' config.fooDeclarations.0 ./freeform-submodules.nix -# freeformTypes can get merged using `types.type`, including submodules -checkConfigOutput '^10$' config.free.xxx.foo ./freeform-submodules.nix -checkConfigOutput '^10$' config.free.yyy.bar ./freeform-submodules.nix - -## types.anything -# Check that attribute sets are merged recursively -checkConfigOutput '^null$' config.value.foo ./types-anything/nested-attrs.nix -checkConfigOutput '^null$' config.value.l1.foo ./types-anything/nested-attrs.nix -checkConfigOutput '^null$' config.value.l1.l2.foo ./types-anything/nested-attrs.nix -checkConfigOutput '^null$' config.value.l1.l2.l3.foo ./types-anything/nested-attrs.nix -# Attribute sets that are coercible to strings shouldn't be recursed into -checkConfigOutput '^"foo"$' config.value.outPath ./types-anything/attrs-coercible.nix -# Multiple lists aren't concatenated together -checkConfigError 'The option .* has conflicting definitions' config.value ./types-anything/lists.nix -# Check that all equalizable atoms can be used as long as all definitions are equal -checkConfigOutput '^0$' config.value.int ./types-anything/equal-atoms.nix -checkConfigOutput '^false$' config.value.bool ./types-anything/equal-atoms.nix -checkConfigOutput '^""$' config.value.string ./types-anything/equal-atoms.nix -checkConfigOutput '^/$' config.value.path ./types-anything/equal-atoms.nix -checkConfigOutput '^null$' config.value.null ./types-anything/equal-atoms.nix -checkConfigOutput '^0.1$' config.value.float ./types-anything/equal-atoms.nix -# Functions can't be merged together -checkConfigError "The option .value.multiple-lambdas.. has conflicting option types" config.applied.multiple-lambdas ./types-anything/functions.nix -checkConfigOutput '^$' config.value.single-lambda ./types-anything/functions.nix -checkConfigOutput '^null$' config.applied.merging-lambdas.x ./types-anything/functions.nix -checkConfigOutput '^null$' config.applied.merging-lambdas.y ./types-anything/functions.nix -# Check that all mk* modifiers are applied -checkConfigError 'attribute .* not found' config.value.mkiffalse ./types-anything/mk-mods.nix -checkConfigOutput '^{ }$' config.value.mkiftrue ./types-anything/mk-mods.nix -checkConfigOutput '^1$' config.value.mkdefault ./types-anything/mk-mods.nix -checkConfigOutput '^{ }$' config.value.mkmerge ./types-anything/mk-mods.nix -checkConfigOutput '^true$' config.value.mkbefore ./types-anything/mk-mods.nix -checkConfigOutput '^1$' config.value.nested.foo ./types-anything/mk-mods.nix -checkConfigOutput '^"baz"$' config.value.nested.bar.baz ./types-anything/mk-mods.nix - -## types.functionTo -checkConfigOutput '^"input is input"$' config.result ./functionTo/trivial.nix -checkConfigOutput '^"a b"$' config.result ./functionTo/merging-list.nix -checkConfigError 'A definition for option .fun.. is not of type .string.. Definition values:\n\s*- In .*wrong-type.nix' config.result ./functionTo/wrong-type.nix -checkConfigOutput '^"b a"$' config.result ./functionTo/list-order.nix -checkConfigOutput '^"a c"$' config.result ./functionTo/merging-attrs.nix -checkConfigOutput '^"a bee"$' config.result ./functionTo/submodule-options.nix -checkConfigOutput '^"fun..a fun..b"$' config.optionsResult ./functionTo/submodule-options.nix - -# moduleType -checkConfigOutput '^"a b"$' config.resultFoo ./declare-variants.nix ./define-variant.nix -checkConfigOutput '^"a b y z"$' config.resultFooBar ./declare-variants.nix ./define-variant.nix -checkConfigOutput '^"a b c"$' config.resultFooFoo ./declare-variants.nix ./define-variant.nix - -## emptyValue's -checkConfigOutput "[ ]" config.list.a ./emptyValues.nix -checkConfigOutput "{ }" config.attrs.a ./emptyValues.nix -checkConfigOutput "null" config.null.a ./emptyValues.nix -checkConfigOutput "{ }" config.submodule.a ./emptyValues.nix -# These types don't have empty values -checkConfigError 'The option .int.a. is used but not defined' config.int.a ./emptyValues.nix -checkConfigError 'The option .nonEmptyList.a. is used but not defined' config.nonEmptyList.a ./emptyValues.nix - -## types.raw -checkConfigOutput "{ foo = ; }" config.unprocessedNesting ./raw.nix -checkConfigOutput "10" config.processedToplevel ./raw.nix -checkConfigError "The option .multiple. is defined multiple times" config.multiple ./raw.nix -checkConfigOutput "bar" config.priorities ./raw.nix - -## Option collision -checkConfigError \ - 'The option .set. in module .*/declare-set.nix. would be a parent of the following options, but its type .attribute set of signed integer. does not support nested options.\n\s*- option[(]s[)] with prefix .set.enable. in module .*/declare-enable-nested.nix.' \ - config.set \ - ./declare-set.nix ./declare-enable-nested.nix - -# Test that types.optionType merges types correctly -checkConfigOutput '^10$' config.theOption.int ./optionTypeMerging.nix -checkConfigOutput '^"hello"$' config.theOption.str ./optionTypeMerging.nix - -# Test that types.optionType correctly annotates option locations -checkConfigError 'The option .theOption.nested. in .other.nix. is already declared in .optionTypeFile.nix.' config.theOption.nested ./optionTypeFile.nix - -# Test that types.optionType leaves types untouched as long as they don't need to be merged -checkConfigOutput 'ok' config.freeformItems.foo.bar ./adhoc-freeformType-survives-type-merge.nix - -# Anonymous submodules don't get nixed by import resolution/deduplication -# because of an `extendModules` bug, issue 168767. -checkConfigOutput '^1$' config.sub.specialisation.value ./extendModules-168767-imports.nix - -# doRename works when `warnings` does not exist. -checkConfigOutput '^1234$' config.c.d.e ./doRename-basic.nix -# doRename adds a warning. -checkConfigOutput '^"The option `a\.b. defined in `.*/doRename-warnings\.nix. has been renamed to `c\.d\.e.\."$' \ - config.result \ - ./doRename-warnings.nix - -# Anonymous modules get deduplicated by key -checkConfigOutput '^"pear"$' config.once.raw ./merge-module-with-key.nix -checkConfigOutput '^"pear\\npear"$' config.twice.raw ./merge-module-with-key.nix - -cat < - # - default - # where all nodes include the default - ({ config, ... }: { - _file = "generic.nix"; - options.nodes = mkOption { - type = lazyAttrsOf (submodule { imports = [ config.default ]; }); - default = {}; - }; - options.default = mkOption { - type = deferredModule; - default = { }; - description = '' - Module that is included in all nodes. - ''; - }; - }) - - { - _file = "default-1.nix"; - default = { config, ... }: { - options.settingsDict = lib.mkOption { type = lazyAttrsOf str; default = {}; }; - options.bottom = lib.mkOption { type = enum []; }; - }; - } - - { - _file = "default-a-is-b.nix"; - default = ./define-settingsDict-a-is-b.nix; - } - - { - _file = "nodes-foo.nix"; - nodes.foo.settingsDict.b = "beta"; - } - - { - _file = "the-file-that-contains-the-bad-config.nix"; - default.bottom = "bogus"; - } - - { - _file = "nodes-foo-c-is-a.nix"; - nodes.foo = { config, ... }: { - settingsDict.c = config.settingsDict.a; - }; - } - - ]; -} diff --git a/lib/tests/modules/define-_module-args-custom.nix b/lib/tests/modules/define-_module-args-custom.nix deleted file mode 100644 index e565fd215a5..00000000000 --- a/lib/tests/modules/define-_module-args-custom.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ lib, ... }: - -{ - config = { - _module.args.custom = true; - }; -} diff --git a/lib/tests/modules/define-attrsOfSub-bar-enable.nix b/lib/tests/modules/define-attrsOfSub-bar-enable.nix deleted file mode 100644 index 99c55d8b360..00000000000 --- a/lib/tests/modules/define-attrsOfSub-bar-enable.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - attrsOfSub.bar.enable = true; -} diff --git a/lib/tests/modules/define-attrsOfSub-bar.nix b/lib/tests/modules/define-attrsOfSub-bar.nix deleted file mode 100644 index 2a33068a568..00000000000 --- a/lib/tests/modules/define-attrsOfSub-bar.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - attrsOfSub.bar = {}; -} diff --git a/lib/tests/modules/define-attrsOfSub-foo-enable-force.nix b/lib/tests/modules/define-attrsOfSub-foo-enable-force.nix deleted file mode 100644 index c9ee36446f1..00000000000 --- a/lib/tests/modules/define-attrsOfSub-foo-enable-force.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ lib, ... }: - -{ - attrsOfSub.foo.enable = lib.mkForce false; -} diff --git a/lib/tests/modules/define-attrsOfSub-foo-enable-if.nix b/lib/tests/modules/define-attrsOfSub-foo-enable-if.nix deleted file mode 100644 index 0b3baddb5ec..00000000000 --- a/lib/tests/modules/define-attrsOfSub-foo-enable-if.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ config, lib, ... }: - -{ - attrsOfSub.foo.enable = lib.mkIf config.enable true; -} diff --git a/lib/tests/modules/define-attrsOfSub-foo-enable.nix b/lib/tests/modules/define-attrsOfSub-foo-enable.nix deleted file mode 100644 index 39cd63cef72..00000000000 --- a/lib/tests/modules/define-attrsOfSub-foo-enable.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - attrsOfSub.foo.enable = true; -} diff --git a/lib/tests/modules/define-attrsOfSub-foo-force-enable.nix b/lib/tests/modules/define-attrsOfSub-foo-force-enable.nix deleted file mode 100644 index 009da7c77cd..00000000000 --- a/lib/tests/modules/define-attrsOfSub-foo-force-enable.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ lib, ... }: - -{ - attrsOfSub.foo = lib.mkForce { - enable = false; - }; -} diff --git a/lib/tests/modules/define-attrsOfSub-foo-if-enable.nix b/lib/tests/modules/define-attrsOfSub-foo-if-enable.nix deleted file mode 100644 index 93702dfa86f..00000000000 --- a/lib/tests/modules/define-attrsOfSub-foo-if-enable.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ config, lib, ... }: - -{ - attrsOfSub.foo = lib.mkIf config.enable { - enable = true; - }; -} diff --git a/lib/tests/modules/define-attrsOfSub-foo.nix b/lib/tests/modules/define-attrsOfSub-foo.nix deleted file mode 100644 index e6bb531dedd..00000000000 --- a/lib/tests/modules/define-attrsOfSub-foo.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - attrsOfSub.foo = {}; -} diff --git a/lib/tests/modules/define-attrsOfSub-force-foo-enable.nix b/lib/tests/modules/define-attrsOfSub-force-foo-enable.nix deleted file mode 100644 index 5c02dd34314..00000000000 --- a/lib/tests/modules/define-attrsOfSub-force-foo-enable.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ lib, ... }: - -{ - attrsOfSub = lib.mkForce { - foo.enable = false; - }; -} diff --git a/lib/tests/modules/define-attrsOfSub-if-foo-enable.nix b/lib/tests/modules/define-attrsOfSub-if-foo-enable.nix deleted file mode 100644 index a3fe6051d41..00000000000 --- a/lib/tests/modules/define-attrsOfSub-if-foo-enable.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ config, lib, ... }: - -{ - attrsOfSub = lib.mkIf config.enable { - foo.enable = true; - }; -} diff --git a/lib/tests/modules/define-bare-submodule-values.nix b/lib/tests/modules/define-bare-submodule-values.nix deleted file mode 100644 index 00ede929ee6..00000000000 --- a/lib/tests/modules/define-bare-submodule-values.nix +++ /dev/null @@ -1,4 +0,0 @@ -{ - bare-submodule.nested = 42; - bare-submodule.deep = 420; -} diff --git a/lib/tests/modules/define-enable-abort.nix b/lib/tests/modules/define-enable-abort.nix deleted file mode 100644 index 85b58a567ca..00000000000 --- a/lib/tests/modules/define-enable-abort.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - config.enable = abort "oops"; -} diff --git a/lib/tests/modules/define-enable-force.nix b/lib/tests/modules/define-enable-force.nix deleted file mode 100644 index f4990a32863..00000000000 --- a/lib/tests/modules/define-enable-force.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ lib, ... }: - -{ - enable = lib.mkForce false; -} diff --git a/lib/tests/modules/define-enable-throw.nix b/lib/tests/modules/define-enable-throw.nix deleted file mode 100644 index 16a59b781dc..00000000000 --- a/lib/tests/modules/define-enable-throw.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - config.enable = throw "oops"; -} diff --git a/lib/tests/modules/define-enable-with-custom-arg.nix b/lib/tests/modules/define-enable-with-custom-arg.nix deleted file mode 100644 index 7da74671d14..00000000000 --- a/lib/tests/modules/define-enable-with-custom-arg.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ lib, custom, ... }: - -{ - config = { - enable = custom; - }; -} diff --git a/lib/tests/modules/define-enable.nix b/lib/tests/modules/define-enable.nix deleted file mode 100644 index 7dc26010ae5..00000000000 --- a/lib/tests/modules/define-enable.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - enable = true; -} diff --git a/lib/tests/modules/define-force-attrsOfSub-foo-enable.nix b/lib/tests/modules/define-force-attrsOfSub-foo-enable.nix deleted file mode 100644 index dafb2360e1f..00000000000 --- a/lib/tests/modules/define-force-attrsOfSub-foo-enable.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ lib, ... }: - -lib.mkForce { - attrsOfSub.foo.enable = false; -} diff --git a/lib/tests/modules/define-force-enable.nix b/lib/tests/modules/define-force-enable.nix deleted file mode 100644 index 978caa2a8c0..00000000000 --- a/lib/tests/modules/define-force-enable.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ lib, ... }: - -lib.mkForce { - enable = false; -} diff --git a/lib/tests/modules/define-if-attrsOfSub-foo-enable.nix b/lib/tests/modules/define-if-attrsOfSub-foo-enable.nix deleted file mode 100644 index 6a8e32e802a..00000000000 --- a/lib/tests/modules/define-if-attrsOfSub-foo-enable.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ config, lib, ... }: - -lib.mkIf config.enable { - attrsOfSub.foo.enable = true; -} diff --git a/lib/tests/modules/define-module-check.nix b/lib/tests/modules/define-module-check.nix deleted file mode 100644 index 5a0707c975f..00000000000 --- a/lib/tests/modules/define-module-check.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - _module.check = false; -} diff --git a/lib/tests/modules/define-option-dependently-nested.nix b/lib/tests/modules/define-option-dependently-nested.nix deleted file mode 100644 index 69ee4255534..00000000000 --- a/lib/tests/modules/define-option-dependently-nested.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ lib, options, ... }: - -# Some modules may be distributed separately and need to adapt to other modules -# that are distributed and versioned separately. -{ - - # Always defined, but the value depends on the presence of an option. - config.set = { - value = if options ? set.enable then 360 else 7; - } - # Only define if possible. - // lib.optionalAttrs (options ? set.enable) { - enable = true; - }; - -} diff --git a/lib/tests/modules/define-option-dependently.nix b/lib/tests/modules/define-option-dependently.nix deleted file mode 100644 index ad85f99a919..00000000000 --- a/lib/tests/modules/define-option-dependently.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ lib, options, ... }: - -# Some modules may be distributed separately and need to adapt to other modules -# that are distributed and versioned separately. -{ - - # Always defined, but the value depends on the presence of an option. - config = { - value = if options ? enable then 360 else 7; - } - # Only define if possible. - // lib.optionalAttrs (options ? enable) { - enable = true; - }; - -} diff --git a/lib/tests/modules/define-settingsDict-a-is-b.nix b/lib/tests/modules/define-settingsDict-a-is-b.nix deleted file mode 100644 index 42363f45f78..00000000000 --- a/lib/tests/modules/define-settingsDict-a-is-b.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ config, ... }: { - settingsDict.a = config.settingsDict.b; -} diff --git a/lib/tests/modules/define-shorthandOnlyDefinesConfig-true.nix b/lib/tests/modules/define-shorthandOnlyDefinesConfig-true.nix deleted file mode 100644 index bd3a73dce34..00000000000 --- a/lib/tests/modules/define-shorthandOnlyDefinesConfig-true.nix +++ /dev/null @@ -1 +0,0 @@ -{ shorthandOnlyDefinesConfig = true; } diff --git a/lib/tests/modules/define-submoduleWith-noshorthand.nix b/lib/tests/modules/define-submoduleWith-noshorthand.nix deleted file mode 100644 index 35e1607b6f1..00000000000 --- a/lib/tests/modules/define-submoduleWith-noshorthand.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - submodule.config.config = true; -} diff --git a/lib/tests/modules/define-submoduleWith-shorthand.nix b/lib/tests/modules/define-submoduleWith-shorthand.nix deleted file mode 100644 index 17df248db8e..00000000000 --- a/lib/tests/modules/define-submoduleWith-shorthand.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - submodule.config = true; -} diff --git a/lib/tests/modules/define-value-int-negative.nix b/lib/tests/modules/define-value-int-negative.nix deleted file mode 100644 index a041222987a..00000000000 --- a/lib/tests/modules/define-value-int-negative.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - value = -23; -} diff --git a/lib/tests/modules/define-value-int-positive.nix b/lib/tests/modules/define-value-int-positive.nix deleted file mode 100644 index 5803de17263..00000000000 --- a/lib/tests/modules/define-value-int-positive.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - value = 42; -} diff --git a/lib/tests/modules/define-value-int-zero.nix b/lib/tests/modules/define-value-int-zero.nix deleted file mode 100644 index 68bb9f415c3..00000000000 --- a/lib/tests/modules/define-value-int-zero.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - value = 0; -} diff --git a/lib/tests/modules/define-value-list.nix b/lib/tests/modules/define-value-list.nix deleted file mode 100644 index 4831c1cc09b..00000000000 --- a/lib/tests/modules/define-value-list.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - value = []; -} diff --git a/lib/tests/modules/define-value-string-arbitrary.nix b/lib/tests/modules/define-value-string-arbitrary.nix deleted file mode 100644 index 8e3abaf536a..00000000000 --- a/lib/tests/modules/define-value-string-arbitrary.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - value = "foobar"; -} diff --git a/lib/tests/modules/define-value-string-bigint.nix b/lib/tests/modules/define-value-string-bigint.nix deleted file mode 100644 index f27e31985c9..00000000000 --- a/lib/tests/modules/define-value-string-bigint.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - value = "1000"; -} diff --git a/lib/tests/modules/define-value-string-properties.nix b/lib/tests/modules/define-value-string-properties.nix deleted file mode 100644 index 972304c0112..00000000000 --- a/lib/tests/modules/define-value-string-properties.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ lib, ... }: { - - imports = [{ - value = lib.mkDefault "def"; - }]; - - value = lib.mkMerge [ - (lib.mkIf false "nope") - "yes" - ]; - -} diff --git a/lib/tests/modules/define-value-string.nix b/lib/tests/modules/define-value-string.nix deleted file mode 100644 index e7a166965a7..00000000000 --- a/lib/tests/modules/define-value-string.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - value = "24"; -} diff --git a/lib/tests/modules/define-variant.nix b/lib/tests/modules/define-variant.nix deleted file mode 100644 index 423cb0e37cb..00000000000 --- a/lib/tests/modules/define-variant.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ config, lib, ... }: -let inherit (lib) types mkOption attrNames; -in -{ - options = { - attrs = mkOption { type = types.attrsOf lib.types.int; }; - result = mkOption { }; - resultFoo = mkOption { }; - resultFooBar = mkOption { }; - resultFooFoo = mkOption { }; - }; - config = { - attrs.a = 1; - variants.foo.attrs.b = 1; - variants.bar.attrs.y = 1; - variants.foo.variants.bar.attrs.z = 1; - variants.foo.variants.foo.attrs.c = 3; - resultFoo = lib.concatMapStringsSep " " toString (attrNames config.variants.foo.attrs); - resultFooBar = lib.concatMapStringsSep " " toString (attrNames config.variants.foo.variants.bar.attrs); - resultFooFoo = lib.concatMapStringsSep " " toString (attrNames config.variants.foo.variants.foo.attrs); - }; -} diff --git a/lib/tests/modules/disable-declare-enable.nix b/lib/tests/modules/disable-declare-enable.nix deleted file mode 100644 index a373ee7e550..00000000000 --- a/lib/tests/modules/disable-declare-enable.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ lib, ... }: - -{ - disabledModules = [ ./declare-enable.nix ]; -} diff --git a/lib/tests/modules/disable-define-enable-string-path.nix b/lib/tests/modules/disable-define-enable-string-path.nix deleted file mode 100644 index 6429a6d6354..00000000000 --- a/lib/tests/modules/disable-define-enable-string-path.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ lib, ... }: - -{ - disabledModules = [ (toString ./define-enable.nix) ]; -} diff --git a/lib/tests/modules/disable-define-enable.nix b/lib/tests/modules/disable-define-enable.nix deleted file mode 100644 index 0d84a7c3cb6..00000000000 --- a/lib/tests/modules/disable-define-enable.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ lib, ... }: - -{ - disabledModules = [ ./define-enable.nix ]; -} diff --git a/lib/tests/modules/disable-enable-modules.nix b/lib/tests/modules/disable-enable-modules.nix deleted file mode 100644 index c325f4e0743..00000000000 --- a/lib/tests/modules/disable-enable-modules.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ lib, ... }: - -{ - disabledModules = [ "define-enable.nix" "declare-enable.nix" ]; -} diff --git a/lib/tests/modules/disable-module-bad-key.nix b/lib/tests/modules/disable-module-bad-key.nix deleted file mode 100644 index f50d06f2f03..00000000000 --- a/lib/tests/modules/disable-module-bad-key.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ lib, ... }: -let - inherit (lib) mkOption types; - - moduleWithKey = { config, ... }: { - config = { - enable = true; - }; - }; -in -{ - imports = [ - ./declare-enable.nix - ]; - disabledModules = [ { } ]; -} diff --git a/lib/tests/modules/disable-module-with-key.nix b/lib/tests/modules/disable-module-with-key.nix deleted file mode 100644 index ea2a60aa832..00000000000 --- a/lib/tests/modules/disable-module-with-key.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ lib, ... }: -let - inherit (lib) mkOption types; - - moduleWithKey = { - key = "disable-module-with-key.nix#moduleWithKey"; - config = { - enable = true; - }; - }; -in -{ - options = { - positive = mkOption { - type = types.submodule { - imports = [ - ./declare-enable.nix - moduleWithKey - ]; - }; - default = {}; - }; - negative = mkOption { - type = types.submodule { - imports = [ - ./declare-enable.nix - moduleWithKey - ]; - disabledModules = [ moduleWithKey ]; - }; - default = {}; - }; - }; -} diff --git a/lib/tests/modules/disable-module-with-toString-key.nix b/lib/tests/modules/disable-module-with-toString-key.nix deleted file mode 100644 index 3f8c81904ce..00000000000 --- a/lib/tests/modules/disable-module-with-toString-key.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ lib, ... }: -let - inherit (lib) mkOption types; - - moduleWithKey = { - key = 123; - config = { - enable = true; - }; - }; -in -{ - options = { - positive = mkOption { - type = types.submodule { - imports = [ - ./declare-enable.nix - moduleWithKey - ]; - }; - default = {}; - }; - negative = mkOption { - type = types.submodule { - imports = [ - ./declare-enable.nix - moduleWithKey - ]; - disabledModules = [ 123 ]; - }; - default = {}; - }; - }; -} diff --git a/lib/tests/modules/disable-recursive/bar.nix b/lib/tests/modules/disable-recursive/bar.nix deleted file mode 100644 index 4d9240a432d..00000000000 --- a/lib/tests/modules/disable-recursive/bar.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - imports = [ - ../declare-enable.nix - ]; -} diff --git a/lib/tests/modules/disable-recursive/disable-bar.nix b/lib/tests/modules/disable-recursive/disable-bar.nix deleted file mode 100644 index 987b2802ae8..00000000000 --- a/lib/tests/modules/disable-recursive/disable-bar.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - - disabledModules = [ - ./bar.nix - ]; - -} diff --git a/lib/tests/modules/disable-recursive/disable-foo.nix b/lib/tests/modules/disable-recursive/disable-foo.nix deleted file mode 100644 index 5b68a3c4610..00000000000 --- a/lib/tests/modules/disable-recursive/disable-foo.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - - disabledModules = [ - ./foo.nix - ]; - -} diff --git a/lib/tests/modules/disable-recursive/foo.nix b/lib/tests/modules/disable-recursive/foo.nix deleted file mode 100644 index 4d9240a432d..00000000000 --- a/lib/tests/modules/disable-recursive/foo.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - imports = [ - ../declare-enable.nix - ]; -} diff --git a/lib/tests/modules/disable-recursive/main.nix b/lib/tests/modules/disable-recursive/main.nix deleted file mode 100644 index 48a3c6218cf..00000000000 --- a/lib/tests/modules/disable-recursive/main.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - imports = [ - ./foo.nix - ./bar.nix - ]; - - enable = true; -} diff --git a/lib/tests/modules/doRename-basic.nix b/lib/tests/modules/doRename-basic.nix deleted file mode 100644 index 9d79fa4f26a..00000000000 --- a/lib/tests/modules/doRename-basic.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ lib, ... }: { - imports = [ - (lib.doRename { from = ["a" "b"]; to = ["c" "d" "e"]; warn = true; use = x: x; visible = true; }) - ]; - options = { - c.d.e = lib.mkOption {}; - }; - config = { - a.b = 1234; - }; -} diff --git a/lib/tests/modules/doRename-warnings.nix b/lib/tests/modules/doRename-warnings.nix deleted file mode 100644 index 6f0f1e87e3a..00000000000 --- a/lib/tests/modules/doRename-warnings.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ lib, config, ... }: { - imports = [ - (lib.doRename { from = ["a" "b"]; to = ["c" "d" "e"]; warn = true; use = x: x; visible = true; }) - ]; - options = { - warnings = lib.mkOption { type = lib.types.listOf lib.types.str; }; - c.d.e = lib.mkOption {}; - result = lib.mkOption {}; - }; - config = { - a.b = 1234; - result = lib.concatStringsSep "%" config.warnings; - }; -} diff --git a/lib/tests/modules/emptyValues.nix b/lib/tests/modules/emptyValues.nix deleted file mode 100644 index 77825de3281..00000000000 --- a/lib/tests/modules/emptyValues.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ lib, ... }: -let - inherit (lib) types; -in { - - options = { - int = lib.mkOption { - type = types.lazyAttrsOf types.int; - }; - list = lib.mkOption { - type = types.lazyAttrsOf (types.listOf types.int); - }; - nonEmptyList = lib.mkOption { - type = types.lazyAttrsOf (types.nonEmptyListOf types.int); - }; - attrs = lib.mkOption { - type = types.lazyAttrsOf (types.attrsOf types.int); - }; - null = lib.mkOption { - type = types.lazyAttrsOf (types.nullOr types.int); - }; - submodule = lib.mkOption { - type = types.lazyAttrsOf (types.submodule {}); - }; - }; - - config = { - int.a = lib.mkIf false null; - list.a = lib.mkIf false null; - nonEmptyList.a = lib.mkIf false null; - attrs.a = lib.mkIf false null; - null.a = lib.mkIf false null; - submodule.a = lib.mkIf false null; - }; - -} diff --git a/lib/tests/modules/extendModules-168767-imports.nix b/lib/tests/modules/extendModules-168767-imports.nix deleted file mode 100644 index 489e6b5a5d8..00000000000 --- a/lib/tests/modules/extendModules-168767-imports.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ lib -, extendModules -, ... -}: -with lib; -{ - imports = [ - - { - options.sub = mkOption { - default = { }; - type = types.submodule ( - { config - , extendModules - , ... - }: - { - options.value = mkOption { - type = types.int; - }; - - options.specialisation = mkOption { - default = { }; - inherit - (extendModules { - modules = [{ - specialisation = mkOverride 0 { }; - }]; - }) - type; - }; - } - ); - }; - } - - { config.sub.value = 1; } - - - ]; -} diff --git a/lib/tests/modules/freeform-attrsOf.nix b/lib/tests/modules/freeform-attrsOf.nix deleted file mode 100644 index 8cc577f38a6..00000000000 --- a/lib/tests/modules/freeform-attrsOf.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ lib, ... }: { - freeformType = with lib.types; attrsOf (either str (attrsOf str)); -} diff --git a/lib/tests/modules/freeform-lazyAttrsOf.nix b/lib/tests/modules/freeform-lazyAttrsOf.nix deleted file mode 100644 index 36d6c0b13fc..00000000000 --- a/lib/tests/modules/freeform-lazyAttrsOf.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ lib, ... }: { - freeformType = with lib.types; lazyAttrsOf (either str (lazyAttrsOf str)); -} diff --git a/lib/tests/modules/freeform-nested.nix b/lib/tests/modules/freeform-nested.nix deleted file mode 100644 index b81fa7f0d22..00000000000 --- a/lib/tests/modules/freeform-nested.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ lib, ... }: -let - deathtrapArgs = lib.mapAttrs - (k: _: throw "The module system is too strict, accessing an unused option's ${k} mkOption-attribute.") - (lib.functionArgs lib.mkOption); -in -{ - options.nest.foo = lib.mkOption { - type = lib.types.bool; - default = false; - }; - options.nest.unused = lib.mkOption deathtrapArgs; - config.nest.bar = "bar"; -} diff --git a/lib/tests/modules/freeform-str-dep-unstr.nix b/lib/tests/modules/freeform-str-dep-unstr.nix deleted file mode 100644 index a2dfbc80cfa..00000000000 --- a/lib/tests/modules/freeform-str-dep-unstr.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ lib, config, ... }: { - options.foo = lib.mkOption { - type = lib.types.nullOr lib.types.str; - default = null; - }; - - config.foo = lib.mkIf (config ? value) config.value; -} diff --git a/lib/tests/modules/freeform-submodules.nix b/lib/tests/modules/freeform-submodules.nix deleted file mode 100644 index 3910435a7b5..00000000000 --- a/lib/tests/modules/freeform-submodules.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ lib, options, ... }: with lib.types; { - - options.fooDeclarations = lib.mkOption { - default = (options.free.type.getSubOptions [])._freeformOptions.foo.declarations; - }; - - options.free = lib.mkOption { - type = submodule { - config._module.freeformType = lib.mkMerge [ - (attrsOf (submodule { - options.foo = lib.mkOption {}; - })) - (attrsOf (submodule { - options.bar = lib.mkOption {}; - })) - ]; - }; - }; - - config.free.xxx.foo = 10; - config.free.yyy.bar = 10; -} diff --git a/lib/tests/modules/freeform-unstr-dep-str.nix b/lib/tests/modules/freeform-unstr-dep-str.nix deleted file mode 100644 index 549d89afeca..00000000000 --- a/lib/tests/modules/freeform-unstr-dep-str.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ lib, config, ... }: { - options.value = lib.mkOption { - type = lib.types.nullOr lib.types.str; - default = null; - }; - - config.foo = lib.mkIf (config.value != null) config.value; -} diff --git a/lib/tests/modules/functionTo/list-order.nix b/lib/tests/modules/functionTo/list-order.nix deleted file mode 100644 index 77a1a43a84f..00000000000 --- a/lib/tests/modules/functionTo/list-order.nix +++ /dev/null @@ -1,25 +0,0 @@ - -{ lib, config, ... }: -let - inherit (lib) types; -in { - options = { - fun = lib.mkOption { - type = types.functionTo (types.listOf types.str); - }; - - result = lib.mkOption { - type = types.str; - default = toString (config.fun { - a = "a"; - b = "b"; - c = "c"; - }); - }; - }; - - config.fun = lib.mkMerge [ - (input: lib.mkAfter [ input.a ]) - (input: [ input.b ]) - ]; -} diff --git a/lib/tests/modules/functionTo/merging-attrs.nix b/lib/tests/modules/functionTo/merging-attrs.nix deleted file mode 100644 index 97c015f928a..00000000000 --- a/lib/tests/modules/functionTo/merging-attrs.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ lib, config, ... }: -let - inherit (lib) types; -in { - options = { - fun = lib.mkOption { - type = types.functionTo (types.attrsOf types.str); - }; - - result = lib.mkOption { - type = types.str; - default = toString (lib.attrValues (config.fun { - a = "a"; - b = "b"; - c = "c"; - })); - }; - }; - - config.fun = lib.mkMerge [ - (input: { inherit (input) a; }) - (input: { inherit (input) b; }) - (input: { - b = lib.mkForce input.c; - }) - ]; -} diff --git a/lib/tests/modules/functionTo/merging-list.nix b/lib/tests/modules/functionTo/merging-list.nix deleted file mode 100644 index 15fcd2bdcc4..00000000000 --- a/lib/tests/modules/functionTo/merging-list.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ lib, config, ... }: -let - inherit (lib) types; -in { - options = { - fun = lib.mkOption { - type = types.functionTo (types.listOf types.str); - }; - - result = lib.mkOption { - type = types.str; - default = toString (config.fun { - a = "a"; - b = "b"; - c = "c"; - }); - }; - }; - - config.fun = lib.mkMerge [ - (input: [ input.a ]) - (input: [ input.b ]) - ]; -} diff --git a/lib/tests/modules/functionTo/submodule-options.nix b/lib/tests/modules/functionTo/submodule-options.nix deleted file mode 100644 index b884892efd6..00000000000 --- a/lib/tests/modules/functionTo/submodule-options.nix +++ /dev/null @@ -1,61 +0,0 @@ -{ lib, config, options, ... }: -let - inherit (lib) types; -in -{ - imports = [ - - # fun..a - ({ ... }: { - options = { - fun = lib.mkOption { - type = types.functionTo (types.submodule { - options.a = lib.mkOption { default = "a"; }; - }); - }; - }; - }) - - # fun..b - ({ ... }: { - options = { - fun = lib.mkOption { - type = types.functionTo (types.submodule { - options.b = lib.mkOption { default = "b"; }; - }); - }; - }; - }) - ]; - - options = { - result = lib.mkOption - { - type = types.str; - default = lib.concatStringsSep " " (lib.attrValues (config.fun (throw "shouldn't use input param"))); - }; - - optionsResult = lib.mkOption - { - type = types.str; - default = lib.concatStringsSep " " - (lib.concatLists - (lib.mapAttrsToList - (k: v: - if k == "_module" - then [ ] - else [ (lib.showOption v.loc) ] - ) - ( - (options.fun.type.getSubOptions [ "fun" ]) - ) - ) - ); - }; - }; - - config.fun = lib.mkMerge - [ - (input: { b = "bee"; }) - ]; -} diff --git a/lib/tests/modules/functionTo/trivial.nix b/lib/tests/modules/functionTo/trivial.nix deleted file mode 100644 index 0962a0cf893..00000000000 --- a/lib/tests/modules/functionTo/trivial.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ lib, config, ... }: -let - inherit (lib) types; -in { - options = { - fun = lib.mkOption { - type = types.functionTo types.str; - }; - - result = lib.mkOption { - type = types.str; - default = config.fun "input"; - }; - }; - - config.fun = input: "input is ${input}"; -} diff --git a/lib/tests/modules/functionTo/wrong-type.nix b/lib/tests/modules/functionTo/wrong-type.nix deleted file mode 100644 index fd65b75088d..00000000000 --- a/lib/tests/modules/functionTo/wrong-type.nix +++ /dev/null @@ -1,18 +0,0 @@ - -{ lib, config, ... }: -let - inherit (lib) types; -in { - options = { - fun = lib.mkOption { - type = types.functionTo types.str; - }; - - result = lib.mkOption { - type = types.str; - default = config.fun 0; - }; - }; - - config.fun = input: input + 1; -} diff --git a/lib/tests/modules/import-custom-arg.nix b/lib/tests/modules/import-custom-arg.nix deleted file mode 100644 index 3e687b661c1..00000000000 --- a/lib/tests/modules/import-custom-arg.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ lib, custom, ... }: - -{ - imports = [] - ++ lib.optional custom ./define-enable-force.nix; -} diff --git a/lib/tests/modules/import-from-store.nix b/lib/tests/modules/import-from-store.nix deleted file mode 100644 index f5af22432ce..00000000000 --- a/lib/tests/modules/import-from-store.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ lib, ... }: -{ - - imports = [ - "${builtins.toFile "drv" "{}"}" - ./declare-enable.nix - ./define-enable.nix - ]; - -} - diff --git a/lib/tests/modules/merge-module-with-key.nix b/lib/tests/modules/merge-module-with-key.nix deleted file mode 100644 index 21f00e6ef97..00000000000 --- a/lib/tests/modules/merge-module-with-key.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ lib, ... }: -let - inherit (lib) mkOption types; - - moduleWithoutKey = { - config = { - raw = "pear"; - }; - }; - - moduleWithKey = { - key = __curPos.file + "#moduleWithKey"; - config = { - raw = "pear"; - }; - }; - - decl = { - options = { - raw = mkOption { - type = types.lines; - }; - }; - }; -in -{ - options = { - once = mkOption { - type = types.submodule { - imports = [ - decl - moduleWithKey - moduleWithKey - ]; - }; - default = {}; - }; - twice = mkOption { - type = types.submodule { - imports = [ - decl - moduleWithoutKey - moduleWithoutKey - ]; - }; - default = {}; - }; - }; -} diff --git a/lib/tests/modules/optionTypeFile.nix b/lib/tests/modules/optionTypeFile.nix deleted file mode 100644 index 6015d59a72c..00000000000 --- a/lib/tests/modules/optionTypeFile.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ config, lib, ... }: { - - _file = "optionTypeFile.nix"; - - options.theType = lib.mkOption { - type = lib.types.optionType; - }; - - options.theOption = lib.mkOption { - type = config.theType; - default = {}; - }; - - config.theType = lib.mkMerge [ - (lib.types.submodule { - options.nested = lib.mkOption { - type = lib.types.int; - }; - }) - (lib.types.submodule { - _file = "other.nix"; - options.nested = lib.mkOption { - type = lib.types.str; - }; - }) - ]; - -} diff --git a/lib/tests/modules/optionTypeMerging.nix b/lib/tests/modules/optionTypeMerging.nix deleted file mode 100644 index 74a620c4620..00000000000 --- a/lib/tests/modules/optionTypeMerging.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ config, lib, ... }: { - - options.theType = lib.mkOption { - type = lib.types.optionType; - }; - - options.theOption = lib.mkOption { - type = config.theType; - }; - - config.theType = lib.mkMerge [ - (lib.types.submodule { - options.int = lib.mkOption { - type = lib.types.int; - default = 10; - }; - }) - (lib.types.submodule { - options.str = lib.mkOption { - type = lib.types.str; - }; - }) - ]; - - config.theOption.str = "hello"; - -} diff --git a/lib/tests/modules/raw.nix b/lib/tests/modules/raw.nix deleted file mode 100644 index 418e671ed07..00000000000 --- a/lib/tests/modules/raw.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ lib, ... }: { - - options = { - processedToplevel = lib.mkOption { - type = lib.types.raw; - }; - unprocessedNesting = lib.mkOption { - type = lib.types.raw; - }; - multiple = lib.mkOption { - type = lib.types.raw; - }; - priorities = lib.mkOption { - type = lib.types.raw; - }; - }; - - config = { - processedToplevel = lib.mkIf true 10; - unprocessedNesting.foo = throw "foo"; - multiple = lib.mkMerge [ - "foo" - "foo" - ]; - priorities = lib.mkMerge [ - "foo" - (lib.mkForce "bar") - ]; - }; -} diff --git a/lib/tests/modules/shorthand-meta.nix b/lib/tests/modules/shorthand-meta.nix deleted file mode 100644 index 8c9619e18a2..00000000000 --- a/lib/tests/modules/shorthand-meta.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ lib, ... }: -let - inherit (lib) types mkOption; -in -{ - imports = [ - ({ config, ... }: { - options = { - meta.foo = mkOption { - type = types.listOf types.str; - }; - result = mkOption { default = lib.concatStringsSep " " config.meta.foo; }; - }; - }) - { - meta.foo = [ "one" "two" ]; - } - ]; -} diff --git a/lib/tests/modules/submoduleFiles.nix b/lib/tests/modules/submoduleFiles.nix deleted file mode 100644 index c0d9b2cef3e..00000000000 --- a/lib/tests/modules/submoduleFiles.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ lib, ... }: { - options.submodule = lib.mkOption { - default = {}; - type = lib.types.submoduleWith { - modules = [ ({ options, ... }: { - options.value = lib.mkOption {}; - - options.internalFiles = lib.mkOption { - default = options.value.files; - }; - })]; - }; - }; - - imports = [ - { - _file = "the-file.nix"; - submodule.value = 10; - } - ]; -} diff --git a/lib/tests/modules/types-anything/attrs-coercible.nix b/lib/tests/modules/types-anything/attrs-coercible.nix deleted file mode 100644 index 085cbd638f1..00000000000 --- a/lib/tests/modules/types-anything/attrs-coercible.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ lib, ... }: { - - options.value = lib.mkOption { - type = lib.types.anything; - }; - - config.value = { - outPath = "foo"; - err = throw "err"; - }; - -} diff --git a/lib/tests/modules/types-anything/equal-atoms.nix b/lib/tests/modules/types-anything/equal-atoms.nix deleted file mode 100644 index 972711201a0..00000000000 --- a/lib/tests/modules/types-anything/equal-atoms.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ lib, ... }: { - - options.value = lib.mkOption { - type = lib.types.anything; - }; - - config = lib.mkMerge [ - { - value.int = 0; - value.bool = false; - value.string = ""; - value.path = /.; - value.null = null; - value.float = 0.1; - } - { - value.int = 0; - value.bool = false; - value.string = ""; - value.path = /.; - value.null = null; - value.float = 0.1; - } - ]; - -} diff --git a/lib/tests/modules/types-anything/functions.nix b/lib/tests/modules/types-anything/functions.nix deleted file mode 100644 index 21edd4aff9c..00000000000 --- a/lib/tests/modules/types-anything/functions.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ lib, config, ... }: { - - options.value = lib.mkOption { - type = lib.types.anything; - }; - - options.applied = lib.mkOption { - default = lib.mapAttrs (name: fun: fun null) config.value; - }; - - config = lib.mkMerge [ - { - value.single-lambda = x: x; - value.multiple-lambdas = x: { inherit x; }; - value.merging-lambdas = x: { inherit x; }; - } - { - value.multiple-lambdas = x: [ x ]; - value.merging-lambdas = y: { inherit y; }; - } - ]; - -} diff --git a/lib/tests/modules/types-anything/lists.nix b/lib/tests/modules/types-anything/lists.nix deleted file mode 100644 index bd846afd3d1..00000000000 --- a/lib/tests/modules/types-anything/lists.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ lib, ... }: { - - options.value = lib.mkOption { - type = lib.types.anything; - }; - - config = lib.mkMerge [ - { - value = [ null ]; - } - { - value = [ null ]; - } - ]; - -} diff --git a/lib/tests/modules/types-anything/mk-mods.nix b/lib/tests/modules/types-anything/mk-mods.nix deleted file mode 100644 index f84ad01df01..00000000000 --- a/lib/tests/modules/types-anything/mk-mods.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ lib, ... }: { - - options.value = lib.mkOption { - type = lib.types.anything; - }; - - config = lib.mkMerge [ - { - value.mkiffalse = lib.mkIf false {}; - } - { - value.mkiftrue = lib.mkIf true {}; - } - { - value.mkdefault = lib.mkDefault 0; - } - { - value.mkdefault = 1; - } - { - value.mkmerge = lib.mkMerge [ - {} - ]; - } - { - value.mkbefore = lib.mkBefore true; - } - { - value.nested = lib.mkMerge [ - { - foo = lib.mkDefault 0; - bar = lib.mkIf false 0; - } - (lib.mkIf true { - foo = lib.mkIf true (lib.mkForce 1); - bar = { - baz = lib.mkDefault "baz"; - }; - }) - ]; - } - ]; - -} diff --git a/lib/tests/modules/types-anything/nested-attrs.nix b/lib/tests/modules/types-anything/nested-attrs.nix deleted file mode 100644 index e57d33ef871..00000000000 --- a/lib/tests/modules/types-anything/nested-attrs.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ lib, ... }: { - - options.value = lib.mkOption { - type = lib.types.anything; - }; - - config = lib.mkMerge [ - { - value.foo = null; - } - { - value.l1.foo = null; - } - { - value.l1.l2.foo = null; - } - { - value.l1.l2.l3.foo = null; - } - ]; - -} diff --git a/lib/tests/release.nix b/lib/tests/release.nix deleted file mode 100644 index dbf6683d49a..00000000000 --- a/lib/tests/release.nix +++ /dev/null @@ -1,51 +0,0 @@ -{ # The pkgs used for dependencies for the testing itself - # Don't test properties of pkgs.lib, but rather the lib in the parent directory - pkgs ? import ../.. {} // { lib = throw "pkgs.lib accessed, but the lib tests should use nixpkgs' lib path directly!"; }, - nix ? pkgs.nix, -}: - -pkgs.runCommand "nixpkgs-lib-tests" { - buildInputs = [ - (import ./check-eval.nix) - (import ./maintainers.nix { - inherit pkgs; - lib = import ../.; - }) - (import ./teams.nix { - inherit pkgs; - lib = import ../.; - }) - (import ../path/tests { - inherit pkgs; - }) - ]; - nativeBuildInputs = [ - nix - ]; - strictDeps = true; -} '' - datadir="${nix}/share" - export TEST_ROOT=$(pwd)/test-tmp - export NIX_BUILD_HOOK= - export NIX_CONF_DIR=$TEST_ROOT/etc - export NIX_LOCALSTATE_DIR=$TEST_ROOT/var - export NIX_LOG_DIR=$TEST_ROOT/var/log/nix - export NIX_STATE_DIR=$TEST_ROOT/var/nix - export NIX_STORE_DIR=$TEST_ROOT/store - export PAGER=cat - cacheDir=$TEST_ROOT/binary-cache - - mkdir -p $NIX_CONF_DIR - echo "experimental-features = nix-command" >> $NIX_CONF_DIR/nix.conf - - nix-store --init - - cp -r ${../.} lib - echo "Running lib/tests/modules.sh" - bash lib/tests/modules.sh - - echo "Running lib/tests/sources.sh" - TEST_LIB=$PWD/lib bash lib/tests/sources.sh - - touch $out -'' diff --git a/lib/tests/sources.sh b/lib/tests/sources.sh deleted file mode 100755 index a7f490a79d7..00000000000 --- a/lib/tests/sources.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail -shopt -s inherit_errexit - -# Use -# || die -die() { - echo >&2 "test case failed: " "$@" - exit 1 -} - -if test -n "${TEST_LIB:-}"; then - NIX_PATH=nixpkgs="$(dirname "$TEST_LIB")" -else - NIX_PATH=nixpkgs="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.."; pwd)" -fi -export NIX_PATH - -work="$(mktemp -d)" -clean_up() { - rm -rf "$work" -} -trap clean_up EXIT -cd "$work" - -touch {README.md,module.o,foo.bar} - -# nix-instantiate doesn't write out the source, only computing the hash, so -# this uses the experimental nix command instead. - -dir="$(nix eval --impure --raw --expr '(with import ; "${ - cleanSource ./. -}")')" -(cd "$dir"; find) | sort -f | diff -U10 - <(cat <&2 tests ok diff --git a/lib/tests/systems.nix b/lib/tests/systems.nix deleted file mode 100644 index 792aa94f335..00000000000 --- a/lib/tests/systems.nix +++ /dev/null @@ -1,42 +0,0 @@ -# We assert that the new algorithmic way of generating these lists matches the -# way they were hard-coded before. -# -# One might think "if we exhaustively test, what's the point of procedurally -# calculating the lists anyway?". The answer is one can mindlessly update these -# tests as new platforms become supported, and then just give the diff a quick -# sanity check before committing :). -let - lib = import ../default.nix; - mseteq = x: y: { - expr = lib.sort lib.lessThan x; - expected = lib.sort lib.lessThan y; - }; -in -with lib.systems.doubles; lib.runTests { - testall = mseteq all (linux ++ darwin ++ freebsd ++ openbsd ++ netbsd ++ illumos ++ wasi ++ windows ++ embedded ++ mmix ++ js ++ genode ++ redox); - - testarm = mseteq arm [ "armv5tel-linux" "armv6l-linux" "armv6l-netbsd" "armv6l-none" "armv7a-linux" "armv7a-netbsd" "armv7l-linux" "armv7l-netbsd" "arm-none" "armv7a-darwin" ]; - testarmv7 = mseteq armv7 [ "armv7a-darwin" "armv7a-linux" "armv7l-linux" "armv7a-netbsd" "armv7l-netbsd" ]; - testi686 = mseteq i686 [ "i686-linux" "i686-freebsd13" "i686-genode" "i686-netbsd" "i686-openbsd" "i686-cygwin" "i686-windows" "i686-none" "i686-darwin" ]; - testmips = mseteq mips [ "mips64el-linux" "mipsel-linux" "mipsel-netbsd" ]; - testmmix = mseteq mmix [ "mmix-mmixware" ]; - testpower = mseteq power [ "powerpc-netbsd" "powerpc-none" "powerpc64-linux" "powerpc64le-linux" "powerpcle-none" ]; - testriscv = mseteq riscv [ "riscv32-linux" "riscv64-linux" "riscv32-netbsd" "riscv64-netbsd" "riscv32-none" "riscv64-none" ]; - testriscv32 = mseteq riscv32 [ "riscv32-linux" "riscv32-netbsd" "riscv32-none" ]; - testriscv64 = mseteq riscv64 [ "riscv64-linux" "riscv64-netbsd" "riscv64-none" ]; - tests390x = mseteq s390x [ "s390x-linux" "s390x-none" ]; - testx86_64 = mseteq x86_64 [ "x86_64-linux" "x86_64-darwin" "x86_64-freebsd13" "x86_64-genode" "x86_64-redox" "x86_64-openbsd" "x86_64-netbsd" "x86_64-cygwin" "x86_64-solaris" "x86_64-windows" "x86_64-none" ]; - - testcygwin = mseteq cygwin [ "i686-cygwin" "x86_64-cygwin" ]; - testdarwin = mseteq darwin [ "x86_64-darwin" "i686-darwin" "aarch64-darwin" "armv7a-darwin" ]; - testfreebsd = mseteq freebsd [ "i686-freebsd13" "x86_64-freebsd13" ]; - testgenode = mseteq genode [ "aarch64-genode" "i686-genode" "x86_64-genode" ]; - testredox = mseteq redox [ "x86_64-redox" ]; - testgnu = mseteq gnu (linux /* ++ kfreebsd ++ ... */); - testillumos = mseteq illumos [ "x86_64-solaris" ]; - testlinux = mseteq linux [ "aarch64-linux" "armv5tel-linux" "armv6l-linux" "armv7a-linux" "armv7l-linux" "i686-linux" "mips64el-linux" "mipsel-linux" "riscv32-linux" "riscv64-linux" "x86_64-linux" "powerpc64-linux" "powerpc64le-linux" "m68k-linux" "s390-linux" "s390x-linux" "microblaze-linux" "microblazeel-linux" "loongarch64-linux" ]; - testnetbsd = mseteq netbsd [ "aarch64-netbsd" "armv6l-netbsd" "armv7a-netbsd" "armv7l-netbsd" "i686-netbsd" "m68k-netbsd" "mipsel-netbsd" "powerpc-netbsd" "riscv32-netbsd" "riscv64-netbsd" "x86_64-netbsd" ]; - testopenbsd = mseteq openbsd [ "i686-openbsd" "x86_64-openbsd" ]; - testwindows = mseteq windows [ "i686-cygwin" "x86_64-cygwin" "i686-windows" "x86_64-windows" ]; - testunix = mseteq unix (linux ++ darwin ++ freebsd ++ openbsd ++ netbsd ++ illumos ++ cygwin ++ redox); -} diff --git a/lib/tests/teams.nix b/lib/tests/teams.nix deleted file mode 100644 index 8a0a5d27263..00000000000 --- a/lib/tests/teams.nix +++ /dev/null @@ -1,50 +0,0 @@ -# to run these tests: -# nix-build nixpkgs/lib/tests/teams.nix -# If it builds, all tests passed -{ pkgs ? import ../.. {}, lib ? pkgs.lib }: - -let - inherit (lib) types; - - teamModule = { config, ... }: { - options = { - shortName = lib.mkOption { - type = types.str; - }; - scope = lib.mkOption { - type = types.str; - }; - enableFeatureFreezePing = lib.mkOption { - type = types.bool; - default = false; - }; - members = lib.mkOption { - type = types.listOf (types.submodule - (import ./maintainer-module.nix { inherit lib; }) - ); - default = []; - }; - githubTeams = lib.mkOption { - type = types.listOf types.str; - default = []; - }; - }; - }; - - checkTeam = team: uncheckedAttrs: - let - prefix = [ "lib" "maintainer-team" team ]; - checkedAttrs = (lib.modules.evalModules { - inherit prefix; - modules = [ - teamModule - { - _file = toString ../../maintainers/team-list.nix; - config = uncheckedAttrs; - } - ]; - }).config; - in checkedAttrs; - - checkedTeams = lib.mapAttrs checkTeam lib.teams; -in pkgs.writeTextDir "maintainer-teams.json" (builtins.toJSON checkedTeams) diff --git a/lib/trivial.nix b/lib/trivial.nix deleted file mode 100644 index 17e83d58b7d..00000000000 --- a/lib/trivial.nix +++ /dev/null @@ -1,522 +0,0 @@ -{ lib }: - -rec { - - ## Simple (higher order) functions - - /* The identity function - For when you need a function that does “nothing”. - - Type: id :: a -> a - */ - id = - # The value to return - x: x; - - /* The constant function - - Ignores the second argument. If called with only one argument, - constructs a function that always returns a static value. - - Type: const :: a -> b -> a - Example: - let f = const 5; in f 10 - => 5 - */ - const = - # Value to return - x: - # Value to ignore - y: x; - - /* Pipes a value through a list of functions, left to right. - - Type: pipe :: a -> [] -> - Example: - pipe 2 [ - (x: x + 2) # 2 + 2 = 4 - (x: x * 2) # 4 * 2 = 8 - ] - => 8 - - # ideal to do text transformations - pipe [ "a/b" "a/c" ] [ - - # create the cp command - (map (file: ''cp "${src}/${file}" $out\n'')) - - # concatenate all commands into one string - lib.concatStrings - - # make that string into a nix derivation - (pkgs.runCommand "copy-to-out" {}) - - ] - => - - The output type of each function has to be the input type - of the next function, and the last function returns the - final value. - */ - pipe = val: functions: - let reverseApply = x: f: f x; - in builtins.foldl' reverseApply val functions; - - # note please don’t add a function like `compose = flip pipe`. - # This would confuse users, because the order of the functions - # in the list is not clear. With pipe, it’s obvious that it - # goes first-to-last. With `compose`, not so much. - - ## Named versions corresponding to some builtin operators. - - /* Concatenate two lists - - Type: concat :: [a] -> [a] -> [a] - - Example: - concat [ 1 2 ] [ 3 4 ] - => [ 1 2 3 4 ] - */ - concat = x: y: x ++ y; - - /* boolean “or” */ - or = x: y: x || y; - - /* boolean “and” */ - and = x: y: x && y; - - /* bitwise “and” */ - bitAnd = builtins.bitAnd - or (import ./zip-int-bits.nix - (a: b: if a==1 && b==1 then 1 else 0)); - - /* bitwise “or” */ - bitOr = builtins.bitOr - or (import ./zip-int-bits.nix - (a: b: if a==1 || b==1 then 1 else 0)); - - /* bitwise “xor” */ - bitXor = builtins.bitXor - or (import ./zip-int-bits.nix - (a: b: if a!=b then 1 else 0)); - - /* bitwise “not” */ - bitNot = builtins.sub (-1); - - /* Convert a boolean to a string. - - This function uses the strings "true" and "false" to represent - boolean values. Calling `toString` on a bool instead returns "1" - and "" (sic!). - - Type: boolToString :: bool -> string - */ - boolToString = b: if b then "true" else "false"; - - /* Merge two attribute sets shallowly, right side trumps left - - mergeAttrs :: attrs -> attrs -> attrs - - Example: - mergeAttrs { a = 1; b = 2; } { b = 3; c = 4; } - => { a = 1; b = 3; c = 4; } - */ - mergeAttrs = - # Left attribute set - x: - # Right attribute set (higher precedence for equal keys) - y: x // y; - - /* Flip the order of the arguments of a binary function. - - Type: flip :: (a -> b -> c) -> (b -> a -> c) - - Example: - flip concat [1] [2] - => [ 2 1 ] - */ - flip = f: a: b: f b a; - - /* Apply function if the supplied argument is non-null. - - Example: - mapNullable (x: x+1) null - => null - mapNullable (x: x+1) 22 - => 23 - */ - mapNullable = - # Function to call - f: - # Argument to check for null before passing it to `f` - a: if a == null then a else f a; - - # Pull in some builtins not included elsewhere. - inherit (builtins) - pathExists readFile isBool - isInt isFloat add sub lessThan - seq deepSeq genericClosure; - - - ## nixpkgs version strings - - /* Returns the current full nixpkgs version number. */ - version = release + versionSuffix; - - /* Returns the current nixpkgs release number as string. */ - release = lib.strings.fileContents ../.version; - - /* The latest release that is supported, at the time of release branch-off, - if applicable. - - Ideally, out-of-tree modules should be able to evaluate cleanly with all - supported Nixpkgs versions (master, release and old release until EOL). - So if possible, deprecation warnings should take effect only when all - out-of-tree expressions/libs/modules can upgrade to the new way without - losing support for supported Nixpkgs versions. - - This release number allows deprecation warnings to be implemented such that - they take effect as soon as the oldest release reaches end of life. */ - oldestSupportedRelease = - # Update on master only. Do not backport. - 2211; - - /* Whether a feature is supported in all supported releases (at the time of - release branch-off, if applicable). See `oldestSupportedRelease`. */ - isInOldestRelease = - /* Release number of feature introduction as an integer, e.g. 2111 for 21.11. - Set it to the upcoming release, matching the nixpkgs/.version file. - */ - release: - release <= lib.trivial.oldestSupportedRelease; - - /* Returns the current nixpkgs release code name. - - On each release the first letter is bumped and a new animal is chosen - starting with that new letter. - */ - codeName = "Stoat"; - - /* Returns the current nixpkgs version suffix as string. */ - versionSuffix = - let suffixFile = ../.version-suffix; - in if pathExists suffixFile - then lib.strings.fileContents suffixFile - else "pre-git"; - - /* Attempts to return the the current revision of nixpkgs and - returns the supplied default value otherwise. - - Type: revisionWithDefault :: string -> string - */ - revisionWithDefault = - # Default value to return if revision can not be determined - default: - let - revisionFile = "${toString ./..}/.git-revision"; - gitRepo = "${toString ./..}/.git"; - in if lib.pathIsGitRepo gitRepo - then lib.commitIdFromGitRepo gitRepo - else if lib.pathExists revisionFile then lib.fileContents revisionFile - else default; - - nixpkgsVersion = builtins.trace "`lib.nixpkgsVersion` is deprecated, use `lib.version` instead!" version; - - /* Determine whether the function is being called from inside a Nix - shell. - - Type: inNixShell :: bool - */ - inNixShell = builtins.getEnv "IN_NIX_SHELL" != ""; - - /* Determine whether the function is being called from inside pure-eval mode - by seeing whether `builtins` contains `currentSystem`. If not, we must be in - pure-eval mode. - - Type: inPureEvalMode :: bool - */ - inPureEvalMode = ! builtins ? currentSystem; - - ## Integer operations - - /* Return minimum of two numbers. */ - min = x: y: if x < y then x else y; - - /* Return maximum of two numbers. */ - max = x: y: if x > y then x else y; - - /* Integer modulus - - Example: - mod 11 10 - => 1 - mod 1 10 - => 1 - */ - mod = base: int: base - (int * (builtins.div base int)); - - - ## Comparisons - - /* C-style comparisons - - a < b, compare a b => -1 - a == b, compare a b => 0 - a > b, compare a b => 1 - */ - compare = a: b: - if a < b - then -1 - else if a > b - then 1 - else 0; - - /* Split type into two subtypes by predicate `p`, take all elements - of the first subtype to be less than all the elements of the - second subtype, compare elements of a single subtype with `yes` - and `no` respectively. - - Type: (a -> bool) -> (a -> a -> int) -> (a -> a -> int) -> (a -> a -> int) - - Example: - let cmp = splitByAndCompare (hasPrefix "foo") compare compare; in - - cmp "a" "z" => -1 - cmp "fooa" "fooz" => -1 - - cmp "f" "a" => 1 - cmp "fooa" "a" => -1 - # while - compare "fooa" "a" => 1 - */ - splitByAndCompare = - # Predicate - p: - # Comparison function if predicate holds for both values - yes: - # Comparison function if predicate holds for neither value - no: - # First value to compare - a: - # Second value to compare - b: - if p a - then if p b then yes a b else -1 - else if p b then 1 else no a b; - - - /* Reads a JSON file. - - Type :: path -> any - */ - importJSON = path: - builtins.fromJSON (builtins.readFile path); - - /* Reads a TOML file. - - Type :: path -> any - */ - importTOML = path: - builtins.fromTOML (builtins.readFile path); - - ## Warnings - - # See https://github.com/NixOS/nix/issues/749. Eventually we'd like these - # to expand to Nix builtins that carry metadata so that Nix can filter out - # the INFO messages without parsing the message string. - # - # Usage: - # { - # foo = lib.warn "foo is deprecated" oldFoo; - # bar = lib.warnIf (bar == "") "Empty bar is deprecated" bar; - # } - # - # TODO: figure out a clever way to integrate location information from - # something like __unsafeGetAttrPos. - - /* - Print a warning before returning the second argument. This function behaves - like `builtins.trace`, but requires a string message and formats it as a - warning, including the `warning: ` prefix. - - To get a call stack trace and abort evaluation, set the environment variable - `NIX_ABORT_ON_WARN=true` and set the Nix options `--option pure-eval false --show-trace` - - Type: string -> a -> a - */ - warn = - if lib.elem (builtins.getEnv "NIX_ABORT_ON_WARN") ["1" "true" "yes"] - then msg: builtins.trace "warning: ${msg}" (abort "NIX_ABORT_ON_WARN=true; warnings are treated as unrecoverable errors.") - else msg: builtins.trace "warning: ${msg}"; - - /* - Like warn, but only warn when the first argument is `true`. - - Type: bool -> string -> a -> a - */ - warnIf = cond: msg: if cond then warn msg else x: x; - - /* - Like warnIf, but negated (warn if the first argument is `false`). - - Type: bool -> string -> a -> a - */ - warnIfNot = cond: msg: if cond then x: x else warn msg; - - /* - Like the `assert b; e` expression, but with a custom error message and - without the semicolon. - - If true, return the identity function, `r: r`. - - If false, throw the error message. - - Calls can be juxtaposed using function application, as `(r: r) a = a`, so - `(r: r) (r: r) a = a`, and so forth. - - Type: bool -> string -> a -> a - - Example: - - throwIfNot (lib.isList overlays) "The overlays argument to nixpkgs must be a list." - lib.foldr (x: throwIfNot (lib.isFunction x) "All overlays passed to nixpkgs must be functions.") (r: r) overlays - pkgs - - */ - throwIfNot = cond: msg: if cond then x: x else throw msg; - - /* - Like throwIfNot, but negated (throw if the first argument is `true`). - - Type: bool -> string -> a -> a - */ - throwIf = cond: msg: if cond then throw msg else x: x; - - /* Check if the elements in a list are valid values from a enum, returning the identity function, or throwing an error message otherwise. - - Example: - let colorVariants = ["bright" "dark" "black"] - in checkListOfEnum "color variants" [ "standard" "light" "dark" ] colorVariants; - => - error: color variants: bright, black unexpected; valid ones: standard, light, dark - - Type: String -> List ComparableVal -> List ComparableVal -> a -> a - */ - checkListOfEnum = msg: valid: given: - let - unexpected = lib.subtractLists valid given; - in - lib.throwIfNot (unexpected == []) - "${msg}: ${builtins.concatStringsSep ", " (builtins.map builtins.toString unexpected)} unexpected; valid ones: ${builtins.concatStringsSep ", " (builtins.map builtins.toString valid)}"; - - info = msg: builtins.trace "INFO: ${msg}"; - - showWarnings = warnings: res: lib.foldr (w: x: warn w x) res warnings; - - ## Function annotations - - /* Add metadata about expected function arguments to a function. - The metadata should match the format given by - builtins.functionArgs, i.e. a set from expected argument to a bool - representing whether that argument has a default or not. - setFunctionArgs : (a → b) → Map String Bool → (a → b) - - This function is necessary because you can't dynamically create a - function of the { a, b ? foo, ... }: format, but some facilities - like callPackage expect to be able to query expected arguments. - */ - setFunctionArgs = f: args: - { # TODO: Should we add call-time "type" checking like built in? - __functor = self: f; - __functionArgs = args; - }; - - /* Extract the expected function arguments from a function. - This works both with nix-native { a, b ? foo, ... }: style - functions and functions with args set with 'setFunctionArgs'. It - has the same return type and semantics as builtins.functionArgs. - setFunctionArgs : (a → b) → Map String Bool. - */ - functionArgs = f: - if f ? __functor - then f.__functionArgs or (lib.functionArgs (f.__functor f)) - else builtins.functionArgs f; - - /* Check whether something is a function or something - annotated with function args. - */ - isFunction = f: builtins.isFunction f || - (f ? __functor && isFunction (f.__functor f)); - - /* - Turns any non-callable values into constant functions. - Returns callable values as is. - - Example: - - nix-repl> lib.toFunction 1 2 - 1 - - nix-repl> lib.toFunction (x: x + 1) 2 - 3 - */ - toFunction = - # Any value - v: - if isFunction v - then v - else k: v; - - /* Convert the given positive integer to a string of its hexadecimal - representation. For example: - - toHexString 0 => "0" - - toHexString 16 => "10" - - toHexString 250 => "FA" - */ - toHexString = i: - let - toHexDigit = d: - if d < 10 - then toString d - else - { - "10" = "A"; - "11" = "B"; - "12" = "C"; - "13" = "D"; - "14" = "E"; - "15" = "F"; - }.${toString d}; - in - lib.concatMapStrings toHexDigit (toBaseDigits 16 i); - - /* `toBaseDigits base i` converts the positive integer i to a list of its - digits in the given base. For example: - - toBaseDigits 10 123 => [ 1 2 3 ] - - toBaseDigits 2 6 => [ 1 1 0 ] - - toBaseDigits 16 250 => [ 15 10 ] - */ - toBaseDigits = base: i: - let - go = i: - if i < base - then [i] - else - let - r = i - ((i / base) * base); - q = (i - r) / base; - in - [r] ++ go q; - in - assert (isInt base); - assert (isInt i); - assert (base >= 2); - assert (i >= 0); - lib.reverseList (go i); -} diff --git a/lib/types.nix b/lib/types.nix deleted file mode 100644 index 666e6502d16..00000000000 --- a/lib/types.nix +++ /dev/null @@ -1,892 +0,0 @@ -# Definitions related to run-time type checking. Used in particular -# to type-check NixOS configurations. -{ lib }: - -let - inherit (lib) - elem - flip - isAttrs - isBool - isDerivation - isFloat - isFunction - isInt - isList - isString - isStorePath - toDerivation - toList - ; - inherit (lib.lists) - all - concatLists - count - elemAt - filter - foldl' - head - imap1 - last - length - tail - ; - inherit (lib.attrsets) - attrNames - filterAttrs - hasAttr - mapAttrs - optionalAttrs - zipAttrsWith - ; - inherit (lib.options) - getFiles - getValues - mergeDefaultOption - mergeEqualOption - mergeOneOption - mergeUniqueOption - showFiles - showOption - ; - inherit (lib.strings) - concatMapStringsSep - concatStringsSep - escapeNixString - hasInfix - isStringLike - ; - inherit (lib.trivial) - boolToString - ; - - inherit (lib.modules) - mergeDefinitions - fixupOptionType - mergeOptionDecls - ; - outer_types = -rec { - isType = type: x: (x._type or "") == type; - - setType = typeName: value: value // { - _type = typeName; - }; - - - # Default type merging function - # takes two type functors and return the merged type - defaultTypeMerge = f: f': - let wrapped = f.wrapped.typeMerge f'.wrapped.functor; - payload = f.binOp f.payload f'.payload; - in - # cannot merge different types - if f.name != f'.name - then null - # simple types - else if (f.wrapped == null && f'.wrapped == null) - && (f.payload == null && f'.payload == null) - then f.type - # composed types - else if (f.wrapped != null && f'.wrapped != null) && (wrapped != null) - then f.type wrapped - # value types - else if (f.payload != null && f'.payload != null) && (payload != null) - then f.type payload - else null; - - # Default type functor - defaultFunctor = name: { - inherit name; - type = types.${name} or null; - wrapped = null; - payload = null; - binOp = a: b: null; - }; - - isOptionType = isType "option-type"; - mkOptionType = - { # Human-readable representation of the type, should be equivalent to - # the type function name. - name - , # Description of the type, defined recursively by embedding the wrapped type if any. - description ? null - # A hint for whether or not this description needs parentheses. Possible values: - # - "noun": a simple noun phrase such as "positive integer" - # - "conjunction": a phrase with a potentially ambiguous "or" connective. - # - "composite": a phrase with an "of" connective - # See the `optionDescriptionPhrase` function. - , descriptionClass ? null - , # DO NOT USE WITHOUT KNOWING WHAT YOU ARE DOING! - # Function applied to each definition that must return false when a definition - # does not match the type. It should not check more than the root of the value, - # because checking nested values reduces laziness, leading to unnecessary - # infinite recursions in the module system. - # Further checks of nested values should be performed by throwing in - # the merge function. - # Strict and deep type checking can be performed by calling lib.deepSeq on - # the merged value. - # - # See https://github.com/NixOS/nixpkgs/pull/6794 that introduced this change, - # https://github.com/NixOS/nixpkgs/pull/173568 and - # https://github.com/NixOS/nixpkgs/pull/168295 that attempted to revert this, - # https://github.com/NixOS/nixpkgs/issues/191124 and - # https://github.com/NixOS/nixos-search/issues/391 for what happens if you ignore - # this disclaimer. - check ? (x: true) - , # Merge a list of definitions together into a single value. - # This function is called with two arguments: the location of - # the option in the configuration as a list of strings - # (e.g. ["boot" "loader "grub" "enable"]), and a list of - # definition values and locations (e.g. [ { file = "/foo.nix"; - # value = 1; } { file = "/bar.nix"; value = 2 } ]). - merge ? mergeDefaultOption - , # Whether this type has a value representing nothingness. If it does, - # this should be a value of the form { value = ; } - # If it doesn't, this should be {} - # This may be used when a value is required for `mkIf false`. This allows the extra laziness in e.g. `lazyAttrsOf`. - emptyValue ? {} - , # Return a flat list of sub-options. Used to generate - # documentation. - getSubOptions ? prefix: {} - , # List of modules if any, or null if none. - getSubModules ? null - , # Function for building the same option type with a different list of - # modules. - substSubModules ? m: null - , # Function that merge type declarations. - # internal, takes a functor as argument and returns the merged type. - # returning null means the type is not mergeable - typeMerge ? defaultTypeMerge functor - , # The type functor. - # internal, representation of the type as an attribute set. - # name: name of the type - # type: type function. - # wrapped: the type wrapped in case of compound types. - # payload: values of the type, two payloads of the same type must be - # combinable with the binOp binary operation. - # binOp: binary operation that merge two payloads of the same type. - functor ? defaultFunctor name - , # The deprecation message to display when this type is used by an option - # If null, the type isn't deprecated - deprecationMessage ? null - , # The types that occur in the definition of this type. This is used to - # issue deprecation warnings recursively. Can also be used to reuse - # nested types - nestedTypes ? {} - }: - { _type = "option-type"; - inherit - name check merge emptyValue getSubOptions getSubModules substSubModules - typeMerge functor deprecationMessage nestedTypes descriptionClass; - description = if description == null then name else description; - }; - - # optionDescriptionPhrase :: (str -> bool) -> optionType -> str - # - # Helper function for producing unambiguous but readable natural language - # descriptions of types. - # - # Parameters - # - # optionDescriptionPhase unparenthesize optionType - # - # `unparenthesize`: A function from descriptionClass string to boolean. - # It must return true when the class of phrase will fit unambiguously into - # the description of the caller. - # - # `optionType`: The option type to parenthesize or not. - # The option whose description we're returning. - # - # Return value - # - # The description of the `optionType`, with parentheses if there may be an - # ambiguity. - optionDescriptionPhrase = unparenthesize: t: - if unparenthesize (t.descriptionClass or null) - then t.description - else "(${t.description})"; - - # When adding new types don't forget to document them in - # nixos/doc/manual/development/option-types.xml! - types = rec { - - raw = mkOptionType rec { - name = "raw"; - description = "raw value"; - descriptionClass = "noun"; - check = value: true; - merge = mergeOneOption; - }; - - anything = mkOptionType { - name = "anything"; - description = "anything"; - descriptionClass = "noun"; - check = value: true; - merge = loc: defs: - let - getType = value: - if isAttrs value && isStringLike value - then "stringCoercibleSet" - else builtins.typeOf value; - - # Returns the common type of all definitions, throws an error if they - # don't have the same type - commonType = foldl' (type: def: - if getType def.value == type - then type - else throw "The option `${showOption loc}' has conflicting option types in ${showFiles (getFiles defs)}" - ) (getType (head defs).value) defs; - - mergeFunction = { - # Recursively merge attribute sets - set = (attrsOf anything).merge; - # Safe and deterministic behavior for lists is to only accept one definition - # listOf only used to apply mkIf and co. - list = - if length defs > 1 - then throw "The option `${showOption loc}' has conflicting definitions, in ${showFiles (getFiles defs)}." - else (listOf anything).merge; - # This is the type of packages, only accept a single definition - stringCoercibleSet = mergeOneOption; - lambda = loc: defs: arg: anything.merge - (loc ++ [ "" ]) - (map (def: { - file = def.file; - value = def.value arg; - }) defs); - # Otherwise fall back to only allowing all equal definitions - }.${commonType} or mergeEqualOption; - in mergeFunction loc defs; - }; - - unspecified = mkOptionType { - name = "unspecified"; - description = "unspecified value"; - descriptionClass = "noun"; - }; - - bool = mkOptionType { - name = "bool"; - description = "boolean"; - descriptionClass = "noun"; - check = isBool; - merge = mergeEqualOption; - }; - - int = mkOptionType { - name = "int"; - description = "signed integer"; - descriptionClass = "noun"; - check = isInt; - merge = mergeEqualOption; - }; - - # Specialized subdomains of int - ints = - let - betweenDesc = lowest: highest: - "${toString lowest} and ${toString highest} (both inclusive)"; - between = lowest: highest: - assert lib.assertMsg (lowest <= highest) - "ints.between: lowest must be smaller than highest"; - addCheck int (x: x >= lowest && x <= highest) // { - name = "intBetween"; - description = "integer between ${betweenDesc lowest highest}"; - }; - ign = lowest: highest: name: docStart: - between lowest highest // { - inherit name; - description = docStart + "; between ${betweenDesc lowest highest}"; - }; - unsign = bit: range: ign 0 (range - 1) - "unsignedInt${toString bit}" "${toString bit} bit unsigned integer"; - sign = bit: range: ign (0 - (range / 2)) (range / 2 - 1) - "signedInt${toString bit}" "${toString bit} bit signed integer"; - - in { - /* An int with a fixed range. - * - * Example: - * (ints.between 0 100).check (-1) - * => false - * (ints.between 0 100).check (101) - * => false - * (ints.between 0 0).check 0 - * => true - */ - inherit between; - - unsigned = addCheck types.int (x: x >= 0) // { - name = "unsignedInt"; - description = "unsigned integer, meaning >=0"; - }; - positive = addCheck types.int (x: x > 0) // { - name = "positiveInt"; - description = "positive integer, meaning >0"; - }; - u8 = unsign 8 256; - u16 = unsign 16 65536; - # the biggest int Nix accepts is 2^63 - 1 (9223372036854775808) - # the smallest int Nix accepts is -2^63 (-9223372036854775807) - u32 = unsign 32 4294967296; - # u64 = unsign 64 18446744073709551616; - - s8 = sign 8 256; - s16 = sign 16 65536; - s32 = sign 32 4294967296; - }; - - # Alias of u16 for a port number - port = ints.u16; - - float = mkOptionType { - name = "float"; - description = "floating point number"; - descriptionClass = "noun"; - check = isFloat; - merge = mergeEqualOption; - }; - - number = either int float; - - numbers = let - betweenDesc = lowest: highest: - "${builtins.toJSON lowest} and ${builtins.toJSON highest} (both inclusive)"; - in { - between = lowest: highest: - assert lib.assertMsg (lowest <= highest) - "numbers.between: lowest must be smaller than highest"; - addCheck number (x: x >= lowest && x <= highest) // { - name = "numberBetween"; - description = "integer or floating point number between ${betweenDesc lowest highest}"; - }; - - nonnegative = addCheck number (x: x >= 0) // { - name = "numberNonnegative"; - description = "nonnegative integer or floating point number, meaning >=0"; - }; - positive = addCheck number (x: x > 0) // { - name = "numberPositive"; - description = "positive integer or floating point number, meaning >0"; - }; - }; - - str = mkOptionType { - name = "str"; - description = "string"; - descriptionClass = "noun"; - check = isString; - merge = mergeEqualOption; - }; - - nonEmptyStr = mkOptionType { - name = "nonEmptyStr"; - description = "non-empty string"; - descriptionClass = "noun"; - check = x: str.check x && builtins.match "[ \t\n]*" x == null; - inherit (str) merge; - }; - - # Allow a newline character at the end and trim it in the merge function. - singleLineStr = - let - inherit (strMatching "[^\n\r]*\n?") check merge; - in - mkOptionType { - name = "singleLineStr"; - description = "(optionally newline-terminated) single-line string"; - descriptionClass = "noun"; - inherit check; - merge = loc: defs: - lib.removeSuffix "\n" (merge loc defs); - }; - - strMatching = pattern: mkOptionType { - name = "strMatching ${escapeNixString pattern}"; - description = "string matching the pattern ${pattern}"; - descriptionClass = "noun"; - check = x: str.check x && builtins.match pattern x != null; - inherit (str) merge; - }; - - # Merge multiple definitions by concatenating them (with the given - # separator between the values). - separatedString = sep: mkOptionType rec { - name = "separatedString"; - description = if sep == "" - then "Concatenated string" # for types.string. - else "strings concatenated with ${builtins.toJSON sep}" - ; - descriptionClass = "noun"; - check = isString; - merge = loc: defs: concatStringsSep sep (getValues defs); - functor = (defaultFunctor name) // { - payload = sep; - binOp = sepLhs: sepRhs: - if sepLhs == sepRhs then sepLhs - else null; - }; - }; - - lines = separatedString "\n"; - commas = separatedString ","; - envVar = separatedString ":"; - - # Deprecated; should not be used because it quietly concatenates - # strings, which is usually not what you want. - string = separatedString "" // { - name = "string"; - deprecationMessage = "See https://github.com/NixOS/nixpkgs/pull/66346 for better alternative types."; - }; - - passwdEntry = entryType: addCheck entryType (str: !(hasInfix ":" str || hasInfix "\n" str)) // { - name = "passwdEntry ${entryType.name}"; - description = "${optionDescriptionPhrase (class: class == "noun") entryType}, not containing newlines or colons"; - }; - - attrs = mkOptionType { - name = "attrs"; - description = "attribute set"; - check = isAttrs; - merge = loc: foldl' (res: def: res // def.value) {}; - emptyValue = { value = {}; }; - }; - - # A package is a top-level store path (/nix/store/hash-name). This includes: - # - derivations - # - more generally, attribute sets with an `outPath` or `__toString` attribute - # pointing to a store path, e.g. flake inputs - # - strings with context, e.g. "${pkgs.foo}" or (toString pkgs.foo) - # - hardcoded store path literals (/nix/store/hash-foo) or strings without context - # ("/nix/store/hash-foo"). These get a context added to them using builtins.storePath. - package = mkOptionType { - name = "package"; - descriptionClass = "noun"; - check = x: isDerivation x || isStorePath x; - merge = loc: defs: - let res = mergeOneOption loc defs; - in if builtins.isPath res || (builtins.isString res && ! builtins.hasContext res) - then toDerivation res - else res; - }; - - shellPackage = package // { - check = x: isDerivation x && hasAttr "shellPath" x; - }; - - path = mkOptionType { - name = "path"; - descriptionClass = "noun"; - check = x: isStringLike x && builtins.substring 0 1 (toString x) == "/"; - merge = mergeEqualOption; - }; - - listOf = elemType: mkOptionType rec { - name = "listOf"; - description = "list of ${optionDescriptionPhrase (class: class == "noun" || class == "composite") elemType}"; - descriptionClass = "composite"; - check = isList; - merge = loc: defs: - map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def: - imap1 (m: def': - (mergeDefinitions - (loc ++ ["[definition ${toString n}-entry ${toString m}]"]) - elemType - [{ inherit (def) file; value = def'; }] - ).optionalValue - ) def.value - ) defs))); - emptyValue = { value = []; }; - getSubOptions = prefix: elemType.getSubOptions (prefix ++ ["*"]); - getSubModules = elemType.getSubModules; - substSubModules = m: listOf (elemType.substSubModules m); - functor = (defaultFunctor name) // { wrapped = elemType; }; - nestedTypes.elemType = elemType; - }; - - nonEmptyListOf = elemType: - let list = addCheck (types.listOf elemType) (l: l != []); - in list // { - description = "non-empty ${optionDescriptionPhrase (class: class == "noun") list}"; - emptyValue = { }; # no .value attr, meaning unset - }; - - attrsOf = elemType: mkOptionType rec { - name = "attrsOf"; - description = "attribute set of ${optionDescriptionPhrase (class: class == "noun" || class == "composite") elemType}"; - descriptionClass = "composite"; - check = isAttrs; - merge = loc: defs: - mapAttrs (n: v: v.value) (filterAttrs (n: v: v ? value) (zipAttrsWith (name: defs: - (mergeDefinitions (loc ++ [name]) elemType defs).optionalValue - ) - # Push down position info. - (map (def: mapAttrs (n: v: { inherit (def) file; value = v; }) def.value) defs))); - emptyValue = { value = {}; }; - getSubOptions = prefix: elemType.getSubOptions (prefix ++ [""]); - getSubModules = elemType.getSubModules; - substSubModules = m: attrsOf (elemType.substSubModules m); - functor = (defaultFunctor name) // { wrapped = elemType; }; - nestedTypes.elemType = elemType; - }; - - # A version of attrsOf that's lazy in its values at the expense of - # conditional definitions not working properly. E.g. defining a value with - # `foo.attr = mkIf false 10`, then `foo ? attr == true`, whereas with - # attrsOf it would correctly be `false`. Accessing `foo.attr` would throw an - # error that it's not defined. Use only if conditional definitions don't make sense. - lazyAttrsOf = elemType: mkOptionType rec { - name = "lazyAttrsOf"; - description = "lazy attribute set of ${optionDescriptionPhrase (class: class == "noun" || class == "composite") elemType}"; - descriptionClass = "composite"; - check = isAttrs; - merge = loc: defs: - zipAttrsWith (name: defs: - let merged = mergeDefinitions (loc ++ [name]) elemType defs; - # mergedValue will trigger an appropriate error when accessed - in merged.optionalValue.value or elemType.emptyValue.value or merged.mergedValue - ) - # Push down position info. - (map (def: mapAttrs (n: v: { inherit (def) file; value = v; }) def.value) defs); - emptyValue = { value = {}; }; - getSubOptions = prefix: elemType.getSubOptions (prefix ++ [""]); - getSubModules = elemType.getSubModules; - substSubModules = m: lazyAttrsOf (elemType.substSubModules m); - functor = (defaultFunctor name) // { wrapped = elemType; }; - nestedTypes.elemType = elemType; - }; - - # TODO: deprecate this in the future: - loaOf = elemType: types.attrsOf elemType // { - name = "loaOf"; - deprecationMessage = "Mixing lists with attribute values is no longer" - + " possible; please use `types.attrsOf` instead. See" - + " https://github.com/NixOS/nixpkgs/issues/1800 for the motivation."; - nestedTypes.elemType = elemType; - }; - - # Value of given type but with no merging (i.e. `uniq list`s are not concatenated). - uniq = elemType: mkOptionType rec { - name = "uniq"; - inherit (elemType) description descriptionClass check; - merge = mergeOneOption; - emptyValue = elemType.emptyValue; - getSubOptions = elemType.getSubOptions; - getSubModules = elemType.getSubModules; - substSubModules = m: uniq (elemType.substSubModules m); - functor = (defaultFunctor name) // { wrapped = elemType; }; - nestedTypes.elemType = elemType; - }; - - unique = { message }: type: mkOptionType rec { - name = "unique"; - inherit (type) description descriptionClass check; - merge = mergeUniqueOption { inherit message; }; - emptyValue = type.emptyValue; - getSubOptions = type.getSubOptions; - getSubModules = type.getSubModules; - substSubModules = m: uniq (type.substSubModules m); - functor = (defaultFunctor name) // { wrapped = type; }; - nestedTypes.elemType = type; - }; - - # Null or value of ... - nullOr = elemType: mkOptionType rec { - name = "nullOr"; - description = "null or ${optionDescriptionPhrase (class: class == "noun" || class == "conjunction") elemType}"; - descriptionClass = "conjunction"; - check = x: x == null || elemType.check x; - merge = loc: defs: - let nrNulls = count (def: def.value == null) defs; in - if nrNulls == length defs then null - else if nrNulls != 0 then - throw "The option `${showOption loc}` is defined both null and not null, in ${showFiles (getFiles defs)}." - else elemType.merge loc defs; - emptyValue = { value = null; }; - getSubOptions = elemType.getSubOptions; - getSubModules = elemType.getSubModules; - substSubModules = m: nullOr (elemType.substSubModules m); - functor = (defaultFunctor name) // { wrapped = elemType; }; - nestedTypes.elemType = elemType; - }; - - functionTo = elemType: mkOptionType { - name = "functionTo"; - description = "function that evaluates to a(n) ${optionDescriptionPhrase (class: class == "noun" || class == "composite") elemType}"; - descriptionClass = "composite"; - check = isFunction; - merge = loc: defs: - fnArgs: (mergeDefinitions (loc ++ [ "" ]) elemType (map (fn: { inherit (fn) file; value = fn.value fnArgs; }) defs)).mergedValue; - getSubOptions = prefix: elemType.getSubOptions (prefix ++ [ "" ]); - getSubModules = elemType.getSubModules; - substSubModules = m: functionTo (elemType.substSubModules m); - functor = (defaultFunctor "functionTo") // { wrapped = elemType; }; - nestedTypes.elemType = elemType; - }; - - # A submodule (like typed attribute set). See NixOS manual. - submodule = modules: submoduleWith { - shorthandOnlyDefinesConfig = true; - modules = toList modules; - }; - - # A module to be imported in some other part of the configuration. - deferredModule = deferredModuleWith { }; - - # A module to be imported in some other part of the configuration. - # `staticModules`' options will be added to the documentation, unlike - # options declared via `config`. - deferredModuleWith = attrs@{ staticModules ? [] }: mkOptionType { - name = "deferredModule"; - description = "module"; - descriptionClass = "noun"; - check = x: isAttrs x || isFunction x || path.check x; - merge = loc: defs: { - imports = staticModules ++ map (def: lib.setDefaultModuleLocation "${def.file}, via option ${showOption loc}" def.value) defs; - }; - inherit (submoduleWith { modules = staticModules; }) - getSubOptions - getSubModules; - substSubModules = m: deferredModuleWith (attrs // { - staticModules = m; - }); - functor = defaultFunctor "deferredModuleWith" // { - type = types.deferredModuleWith; - payload = { - inherit staticModules; - }; - binOp = lhs: rhs: { - staticModules = lhs.staticModules ++ rhs.staticModules; - }; - }; - }; - - # The type of a type! - optionType = mkOptionType { - name = "optionType"; - description = "optionType"; - descriptionClass = "noun"; - check = value: value._type or null == "option-type"; - merge = loc: defs: - if length defs == 1 - then (head defs).value - else let - # Prepares the type definitions for mergeOptionDecls, which - # annotates submodules types with file locations - optionModules = map ({ value, file }: - { - _file = file; - # There's no way to merge types directly from the module system, - # but we can cheat a bit by just declaring an option with the type - options = lib.mkOption { - type = value; - }; - } - ) defs; - # Merges all the types into a single one, including submodule merging. - # This also propagates file information to all submodules - mergedOption = fixupOptionType loc (mergeOptionDecls loc optionModules); - in mergedOption.type; - }; - - submoduleWith = - { modules - , specialArgs ? {} - , shorthandOnlyDefinesConfig ? false - , description ? null - }@attrs: - let - inherit (lib.modules) evalModules; - - allModules = defs: map ({ value, file }: - if isAttrs value && shorthandOnlyDefinesConfig - then { _file = file; config = value; } - else { _file = file; imports = [ value ]; } - ) defs; - - base = evalModules { - inherit specialArgs; - modules = [{ - # This is a work-around for the fact that some sub-modules, - # such as the one included in an attribute set, expects an "args" - # attribute to be given to the sub-module. As the option - # evaluation does not have any specific attribute name yet, we - # provide a default for the documentation and the freeform type. - # - # This is necessary as some option declaration might use the - # "name" attribute given as argument of the submodule and use it - # as the default of option declarations. - # - # We use lookalike unicode single angle quotation marks because - # of the docbook transformation the options receive. In all uses - # > and < wouldn't be encoded correctly so the encoded values - # would be used, and use of `<` and `>` would break the XML document. - # It shouldn't cause an issue since this is cosmetic for the manual. - _module.args.name = lib.mkOptionDefault "‹name›"; - }] ++ modules; - }; - - freeformType = base._module.freeformType; - - name = "submodule"; - - in - mkOptionType { - inherit name; - description = - if description != null then description - else freeformType.description or name; - check = x: isAttrs x || isFunction x || path.check x; - merge = loc: defs: - (base.extendModules { - modules = [ { _module.args.name = last loc; } ] ++ allModules defs; - prefix = loc; - }).config; - emptyValue = { value = {}; }; - getSubOptions = prefix: (base.extendModules - { inherit prefix; }).options // optionalAttrs (freeformType != null) { - # Expose the sub options of the freeform type. Note that the option - # discovery doesn't care about the attribute name used here, so this - # is just to avoid conflicts with potential options from the submodule - _freeformOptions = freeformType.getSubOptions prefix; - }; - getSubModules = modules; - substSubModules = m: submoduleWith (attrs // { - modules = m; - }); - nestedTypes = lib.optionalAttrs (freeformType != null) { - freeformType = freeformType; - }; - functor = defaultFunctor name // { - type = types.submoduleWith; - payload = { - inherit modules specialArgs shorthandOnlyDefinesConfig description; - }; - binOp = lhs: rhs: { - modules = lhs.modules ++ rhs.modules; - specialArgs = - let intersecting = builtins.intersectAttrs lhs.specialArgs rhs.specialArgs; - in if intersecting == {} - then lhs.specialArgs // rhs.specialArgs - else throw "A submoduleWith option is declared multiple times with the same specialArgs \"${toString (attrNames intersecting)}\""; - shorthandOnlyDefinesConfig = - if lhs.shorthandOnlyDefinesConfig == null - then rhs.shorthandOnlyDefinesConfig - else if rhs.shorthandOnlyDefinesConfig == null - then lhs.shorthandOnlyDefinesConfig - else if lhs.shorthandOnlyDefinesConfig == rhs.shorthandOnlyDefinesConfig - then lhs.shorthandOnlyDefinesConfig - else throw "A submoduleWith option is declared multiple times with conflicting shorthandOnlyDefinesConfig values"; - description = - if lhs.description == null - then rhs.description - else if rhs.description == null - then lhs.description - else if lhs.description == rhs.description - then lhs.description - else throw "A submoduleWith option is declared multiple times with conflicting descriptions"; - }; - }; - }; - - # A value from a set of allowed ones. - enum = values: - let - inherit (lib.lists) unique; - show = v: - if builtins.isString v then ''"${v}"'' - else if builtins.isInt v then builtins.toString v - else if builtins.isBool v then boolToString v - else ''<${builtins.typeOf v}>''; - in - mkOptionType rec { - name = "enum"; - description = - # Length 0 or 1 enums may occur in a design pattern with type merging - # where an "interface" module declares an empty enum and other modules - # provide implementations, each extending the enum with their own - # identifier. - if values == [] then - "impossible (empty enum)" - else if builtins.length values == 1 then - "value ${show (builtins.head values)} (singular enum)" - else - "one of ${concatMapStringsSep ", " show values}"; - descriptionClass = - if builtins.length values < 2 - then "noun" - else "conjunction"; - check = flip elem values; - merge = mergeEqualOption; - functor = (defaultFunctor name) // { payload = values; binOp = a: b: unique (a ++ b); }; - }; - - # Either value of type `t1` or `t2`. - either = t1: t2: mkOptionType rec { - name = "either"; - description = "${optionDescriptionPhrase (class: class == "noun" || class == "conjunction") t1} or ${optionDescriptionPhrase (class: class == "noun" || class == "conjunction" || class == "composite") t2}"; - descriptionClass = "conjunction"; - check = x: t1.check x || t2.check x; - merge = loc: defs: - let - defList = map (d: d.value) defs; - in - if all (x: t1.check x) defList - then t1.merge loc defs - else if all (x: t2.check x) defList - then t2.merge loc defs - else mergeOneOption loc defs; - typeMerge = f': - let mt1 = t1.typeMerge (elemAt f'.wrapped 0).functor; - mt2 = t2.typeMerge (elemAt f'.wrapped 1).functor; - in - if (name == f'.name) && (mt1 != null) && (mt2 != null) - then functor.type mt1 mt2 - else null; - functor = (defaultFunctor name) // { wrapped = [ t1 t2 ]; }; - nestedTypes.left = t1; - nestedTypes.right = t2; - }; - - # Any of the types in the given list - oneOf = ts: - let - head' = if ts == [] then throw "types.oneOf needs to get at least one type in its argument" else head ts; - tail' = tail ts; - in foldl' either head' tail'; - - # Either value of type `coercedType` or `finalType`, the former is - # converted to `finalType` using `coerceFunc`. - coercedTo = coercedType: coerceFunc: finalType: - assert lib.assertMsg (coercedType.getSubModules == null) - "coercedTo: coercedType must not have submodules (it’s a ${ - coercedType.description})"; - mkOptionType rec { - name = "coercedTo"; - description = "${optionDescriptionPhrase (class: class == "noun") finalType} or ${optionDescriptionPhrase (class: class == "noun") coercedType} convertible to it"; - check = x: (coercedType.check x && finalType.check (coerceFunc x)) || finalType.check x; - merge = loc: defs: - let - coerceVal = val: - if coercedType.check val then coerceFunc val - else val; - in finalType.merge loc (map (def: def // { value = coerceVal def.value; }) defs); - emptyValue = finalType.emptyValue; - getSubOptions = finalType.getSubOptions; - getSubModules = finalType.getSubModules; - substSubModules = m: coercedTo coercedType coerceFunc (finalType.substSubModules m); - typeMerge = t1: t2: null; - functor = (defaultFunctor name) // { wrapped = finalType; }; - nestedTypes.coercedType = coercedType; - nestedTypes.finalType = finalType; - }; - - # Augment the given type with an additional type check function. - addCheck = elemType: check: elemType // { check = x: elemType.check x && check x; }; - - }; -}; - -in outer_types // outer_types.types diff --git a/lib/versions.nix b/lib/versions.nix deleted file mode 100644 index 986e7e5f9b3..00000000000 --- a/lib/versions.nix +++ /dev/null @@ -1,64 +0,0 @@ -/* Version string functions. */ -{ lib }: - -rec { - - /* Break a version string into its component parts. - - Example: - splitVersion "1.2.3" - => ["1" "2" "3"] - */ - splitVersion = builtins.splitVersion or (lib.splitString "."); - - /* Get the major version string from a string. - - Example: - major "1.2.3" - => "1" - */ - major = v: builtins.elemAt (splitVersion v) 0; - - /* Get the minor version string from a string. - - Example: - minor "1.2.3" - => "2" - */ - minor = v: builtins.elemAt (splitVersion v) 1; - - /* Get the patch version string from a string. - - Example: - patch "1.2.3" - => "3" - */ - patch = v: builtins.elemAt (splitVersion v) 2; - - /* Get string of the first two parts (major and minor) - of a version string. - - Example: - majorMinor "1.2.3" - => "1.2" - */ - majorMinor = v: - builtins.concatStringsSep "." - (lib.take 2 (splitVersion v)); - - /* Pad a version string with zeros to match the given number of components. - - Example: - pad 3 "1.2" - => "1.2.0" - pad 3 "1.3-rc1" - => "1.3.0-rc1" - pad 3 "1.2.3.4" - => "1.2.3" - */ - pad = n: version: let - numericVersion = lib.head (lib.splitString "-" version); - versionSuffix = lib.removePrefix numericVersion version; - in lib.concatStringsSep "." (lib.take n (lib.splitVersion numericVersion ++ lib.genList (_: "0") n)) + versionSuffix; - -} diff --git a/lib/zip-int-bits.nix b/lib/zip-int-bits.nix deleted file mode 100644 index 53efd2bb0a0..00000000000 --- a/lib/zip-int-bits.nix +++ /dev/null @@ -1,39 +0,0 @@ -/* Helper function to implement a fallback for the bit operators - `bitAnd`, `bitOr` and `bitXor` on older nix version. - See ./trivial.nix -*/ -f: x: y: - let - # (intToBits 6) -> [ 0 1 1 ] - intToBits = x: - if x == 0 || x == -1 then - [] - else - let - headbit = if (x / 2) * 2 != x then 1 else 0; # x & 1 - tailbits = if x < 0 then ((x + 1) / 2) - 1 else x / 2; # x >> 1 - in - [headbit] ++ (intToBits tailbits); - - # (bitsToInt [ 0 1 1 ] 0) -> 6 - # (bitsToInt [ 0 1 0 ] 1) -> -6 - bitsToInt = l: signum: - if l == [] then - (if signum == 0 then 0 else -1) - else - (builtins.head l) + (2 * (bitsToInt (builtins.tail l) signum)); - - xsignum = if x < 0 then 1 else 0; - ysignum = if y < 0 then 1 else 0; - zipListsWith' = fst: snd: - if fst==[] && snd==[] then - [] - else if fst==[] then - [(f xsignum (builtins.head snd))] ++ (zipListsWith' [] (builtins.tail snd)) - else if snd==[] then - [(f (builtins.head fst) ysignum )] ++ (zipListsWith' (builtins.tail fst) [] ) - else - [(f (builtins.head fst) (builtins.head snd))] ++ (zipListsWith' (builtins.tail fst) (builtins.tail snd)); - in - assert (builtins.isInt x) && (builtins.isInt y); - bitsToInt (zipListsWith' (intToBits x) (intToBits y)) (f xsignum ysignum) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix deleted file mode 100644 index 4216fff9adb..00000000000 --- a/maintainers/maintainer-list.nix +++ /dev/null @@ -1,17518 +0,0 @@ -/* List of NixOS maintainers. - ```nix - handle = { - # Required - name = "Your name"; - - # Optional, but at least one of email, matrix or githubId must be given - email = "address@example.org"; - matrix = "@user:example.org"; - github = "GithubUsername"; - githubId = your-github-id; - - keys = [{ - fingerprint = "AAAA BBBB CCCC DDDD EEEE FFFF 0000 1111 2222 3333"; - }]; - }; - ``` - - where - - - `handle` is the handle you are going to use in nixpkgs expressions, - - `name` is your, preferably real, name, - - `email` is your maintainer email address, - - `matrix` is your Matrix user ID, - - `github` is your GitHub handle (as it appears in the URL of your profile page, `https://github.com/`), - - `githubId` is your GitHub user ID, which can be found at `https://api.github.com/users/`, - - `keys` is a list of your PGP/GPG key fingerprints. - - Specifying a GitHub account ensures that you automatically get a review request on - pull requests that modify a package for which you are a maintainer. - - `handle == github` is strongly preferred whenever `github` is an acceptable attribute name and is short and convenient. - - If `github` begins with a numeral, `handle` should be prefixed with an underscore. - ```nix - _1example = { - github = "1example"; - }; - ``` - - Add PGP/GPG keys only if you actually use them to sign commits and/or mail. - - To get the required PGP/GPG values for a key run - ```shell - gpg --fingerprint | head -n 2 - ``` - - !!! Note that PGP/GPG values stored here are for informational purposes only, don't use this file as a source of truth. - - More fields may be added in the future, however, in order to comply with GDPR this file should stay as minimal as possible. - - When editing this file: - * keep the list alphabetically sorted - * test the validity of the format with: - nix-build lib/tests/maintainers.nix - - See `./scripts/check-maintainer-github-handles.sh` for an example on how to work with this data. -*/ -{ - _0qq = { - email = "0qqw0qqw@gmail.com"; - github = "0qq"; - githubId = 64707304; - name = "Dmitry Kulikov"; - }; - _0x4A6F = { - email = "mail-maintainer@0x4A6F.dev"; - matrix = "@0x4a6f:matrix.org"; - name = "Joachim Ernst"; - github = "0x4A6F"; - githubId = 9675338; - keys = [{ - fingerprint = "F466 A548 AD3F C1F1 8C88 4576 8702 7528 B006 D66D"; - }]; - }; - _0xB10C = { - email = "nixpkgs@b10c.me"; - name = "0xB10C"; - github = "0xB10C"; - githubId = 19157360; - }; - _0xbe7a = { - email = "nix@be7a.de"; - name = "Bela Stoyan"; - github = "0xbe7a"; - githubId = 6232980; - keys = [{ - fingerprint = "2536 9E86 1AA5 9EB7 4C47 B138 6510 870A 77F4 9A99"; - }]; - }; - _0xC45 = { - email = "jason@0xc45.com"; - name = "Jason Vigil"; - github = "0xC45"; - githubId = 56617252; - matrix = "@oxc45:matrix.org"; - }; - _0xd61 = { - email = "dgl@degit.co"; - name = "Daniel Glinka"; - github = "0xd61"; - githubId = 8351869; - }; - _0xMRTT = { - email = "0xMRTT@proton.me"; - name = "0xMRTT"; - github = "0xMRTT"; - githubId = 105598867; - matrix = "@0xmrtt:envs.net"; - }; - _1000101 = { - email = "b1000101@pm.me"; - github = "1000101"; - githubId = 791309; - name = "Jan Hrnko"; - }; - _1000teslas = { - name = "Kevin Tran"; - github = "1000teslas"; - githubId = 47207223; - }; - _13r0ck = { - name = "Brock Szuszczewicz"; - email = "bnr@tuta.io"; - github = "13r0ck"; - githubId = 58987761; - }; - _2gn = { - name = "Hiram Tanner"; - github = "2gn"; - githubId = 101851090; - }; - _360ied = { - name = "Brian Zhu"; - email = "therealbarryplayer@gmail.com"; - github = "360ied"; - githubId = 19516527; - }; - _3699n = { - email = "nicholas@nvk.pm"; - github = "3699n"; - githubId = 7414843; - name = "Nicholas von Klitzing"; - }; - _3JlOy-PYCCKUi = { - name = "3JlOy-PYCCKUi"; - email = "3jl0y_pycckui@riseup.net"; - github = "3JlOy-PYCCKUi"; - githubId = 46464602; - }; - _3noch = { - email = "eacameron@gmail.com"; - github = "3noch"; - githubId = 882455; - name = "Elliot Cameron"; - }; - _414owen = { - email = "owen@owen.cafe"; - github = "414owen"; - githubId = 1714287; - name = "Owen Shepherd"; - }; - _4825764518 = { - email = "4825764518@purelymail.com"; - matrix = "@kenzie:matrix.kenzi.dev"; - github = "4825764518"; - githubId = 100122841; - name = "Kenzie"; - keys = [{ - fingerprint = "D292 365E 3C46 A5AA 75EE B30B 78DB 7EDE 3540 794B"; - }]; - }; - _6AA4FD = { - email = "f6442954@gmail.com"; - github = "6AA4FD"; - githubId = 12578560; - name = "Quinn Bohner"; - }; - _9999years = { - email = "rbt@fastmail.com"; - github = "9999years"; - githubId = 15312184; - name = "Rebecca Turner"; - }; - a1russell = { - email = "adamlr6+pub@gmail.com"; - github = "a1russell"; - githubId = 241628; - name = "Adam Russell"; - }; - aacebedo = { - email = "alexandre@acebedo.fr"; - github = "aacebedo"; - githubId = 1217680; - name = "Alexandre Acebedo"; - }; - aadibajpai = { - email = "hello@aadibajpai.com"; - github = "aadibajpai"; - githubId = 27063113; - name = "Aadi Bajpai"; - }; - aanderse = { - email = "aaron@fosslib.net"; - matrix = "@aanderse:nixos.dev"; - github = "aanderse"; - githubId = 7755101; - name = "Aaron Andersen"; - }; - aaqaishtyaq = { - email = "aaqaishtyaq@gmail.com"; - github = "aaqaishtyaq"; - githubId = 22131756; - name = "Aaqa Ishtyaq"; - }; - aaronarinder = { - email = "aaronarinder@gmail.com"; - github = "aaronArinder"; - githubId = 26738844; - name = "Aaron Arinder"; - }; - aaronjanse = { - email = "aaron@ajanse.me"; - matrix = "@aaronjanse:matrix.org"; - github = "aaronjanse"; - githubId = 16829510; - name = "Aaron Janse"; - }; - aaronjheng = { - email = "wentworth@outlook.com"; - github = "aaronjheng"; - githubId = 806876; - name = "Aaron Jheng"; - }; - aaronschif = { - email = "aaronschif@gmail.com"; - github = "aaronschif"; - githubId = 2258953; - name = "Aaron Schif"; - }; - aaschmid = { - email = "service@aaschmid.de"; - github = "aaschmid"; - githubId = 567653; - name = "Andreas Schmid"; - }; - abaldeau = { - email = "andreas@baldeau.net"; - github = "baldo"; - githubId = 178750; - name = "Andreas Baldeau"; - }; - abathur = { - email = "travis.a.everett+nixpkgs@gmail.com"; - github = "abathur"; - githubId = 2548365; - name = "Travis A. Everett"; - }; - abbe = { - email = "ashish.is@lostca.se"; - matrix = "@abbe:badti.me"; - github = "wahjava"; - githubId = 2255192; - name = "Ashish SHUKLA"; - keys = [{ - fingerprint = "F682 CDCC 39DC 0FEA E116 20B6 C746 CFA9 E74F A4B0"; - }]; - }; - abbradar = { - email = "ab@fmap.me"; - github = "abbradar"; - githubId = 1174810; - name = "Nikolay Amiantov"; - }; - abhi18av = { - email = "abhi18av@gmail.com"; - github = "abhi18av"; - githubId = 12799326; - name = "Abhinav Sharma"; - }; - abigailbuccaneer = { - email = "abigailbuccaneer@gmail.com"; - github = "AbigailBuccaneer"; - githubId = 908758; - name = "Abigail Bunyan"; - }; - aborsu = { - email = "a.borsu@gmail.com"; - github = "aborsu"; - githubId = 5033617; - name = "Augustin Borsu"; - }; - aboseley = { - email = "adam.boseley@gmail.com"; - github = "aboseley"; - githubId = 13504599; - name = "Adam Boseley"; - }; - abuibrahim = { - email = "ruslan@babayev.com"; - github = "abuibrahim"; - githubId = 2321000; - name = "Ruslan Babayev"; - }; - acairncross = { - email = "acairncross@gmail.com"; - github = "acairncross"; - githubId = 1517066; - name = "Aiken Cairncross"; - }; - aciceri = { - name = "Andrea Ciceri"; - email = "andrea.ciceri@autistici.org"; - github = "aciceri"; - githubId = 2318843; - }; - acowley = { - email = "acowley@gmail.com"; - github = "acowley"; - githubId = 124545; - name = "Anthony Cowley"; - }; - adamcstephens = { - email = "happy.plan4249@valkor.net"; - matrix = "@adam:valkor.net"; - github = "adamcstephens"; - githubId = 2071575; - name = "Adam C. Stephens"; - }; - adamlwgriffiths = { - email = "adam.lw.griffiths@gmail.com"; - github = "adamlwgriffiths"; - githubId = 1239156; - name = "Adam Griffiths"; - }; - adamt = { - email = "mail@adamtulinius.dk"; - github = "adamtulinius"; - githubId = 749381; - name = "Adam Tulinius"; - }; - addict3d = { - email = "nickbathum@gmail.com"; - matrix = "@nbathum:matrix.org"; - github = "addict3d"; - githubId = 49227; - name = "Nick Bathum"; - }; - adelbertc = { - email = "adelbertc@gmail.com"; - github = "adelbertc"; - githubId = 1332980; - name = "Adelbert Chang"; - }; - adev = { - email = "adev@adev.name"; - github = "adevress"; - githubId = 1773511; - name = "Adrien Devresse"; - }; - adisbladis = { - email = "adisbladis@gmail.com"; - matrix = "@adis:blad.is"; - github = "adisbladis"; - githubId = 63286; - name = "Adam Hose"; - }; - adjacentresearch = { - email = "nate@adjacentresearch.xyz"; - github = "0xperp"; - githubId = 96147421; - name = "0xperp"; - }; - Adjective-Object = { - email = "mhuan13@gmail.com"; - github = "Adjective-Object"; - githubId = 1174858; - name = "Maxwell Huang-Hobbs"; - }; - adnelson = { - email = "ithinkican@gmail.com"; - github = "adnelson"; - githubId = 5091511; - name = "Allen Nelson"; - }; - adolfogc = { - email = "adolfo.garcia.cr@gmail.com"; - github = "adolfogc"; - githubId = 1250775; - name = "Adolfo E. García Castro"; - }; - AdsonCicilioti = { - name = "Adson Cicilioti"; - email = "adson.cicilioti@live.com"; - github = "AdsonCicilioti"; - githubId = 6278398; - }; - adsr = { - email = "as@php.net"; - github = "adsr"; - githubId = 315003; - name = "Adam Saponara"; - }; - aerialx = { - email = "aaron+nixos@aaronlindsay.com"; - github = "AerialX"; - githubId = 117295; - name = "Aaron Lindsay"; - }; - aespinosa = { - email = "allan.espinosa@outlook.com"; - github = "aespinosa"; - githubId = 58771; - name = "Allan Espinosa"; - }; - aethelz = { - email = "aethelz@protonmail.com"; - github = "eugenezastrogin"; - githubId = 10677343; - name = "Eugene"; - }; - afh = { - email = "surryhill+nix@gmail.com"; - github = "afh"; - githubId = 16507; - name = "Alexis Hildebrandt"; - }; - aflatter = { - email = "flatter@fastmail.fm"; - github = "aflatter"; - githubId = 168; - name = "Alexander Flatter"; - }; - afldcr = { - email = "alex@fldcr.com"; - github = "afldcr"; - githubId = 335271; - name = "James Alexander Feldman-Crough"; - }; - afontain = { - email = "antoine.fontaine@epfl.ch"; - github = "necessarily-equal"; - githubId = 59283660; - name = "Antoine Fontaine"; - }; - aforemny = { - email = "aforemny@posteo.de"; - github = "aforemny"; - githubId = 610962; - name = "Alexander Foremny"; - }; - afranchuk = { - email = "alex.franchuk@gmail.com"; - github = "afranchuk"; - githubId = 4296804; - name = "Alex Franchuk"; - }; - agbrooks = { - email = "andrewgrantbrooks@gmail.com"; - github = "agbrooks"; - githubId = 19290901; - name = "Andrew Brooks"; - }; - aherrmann = { - email = "andreash87@gmx.ch"; - github = "aherrmann"; - githubId = 732652; - name = "Andreas Herrmann"; - }; - ahrzb = { - email = "ahrzb5@gmail.com"; - github = "ahrzb"; - githubId = 5220438; - name = "AmirHossein Roozbahani"; - }; - ahuzik = { - email = "ah1990au@gmail.com"; - github = "alesya-h"; - githubId = 209175; - name = "Alesya Huzik"; - }; - aidalgol = { - email = "aidalgol+nixpkgs@fastmail.net"; - github = "aidalgol"; - githubId = 2313201; - name = "Aidan Gauland"; - }; - aij = { - email = "aij+git@mrph.org"; - github = "aij"; - githubId = 4732885; - name = "Ivan Jager"; - }; - aiotter = { - email = "git@aiotter.com"; - github = "aiotter"; - githubId = 37664775; - name = "Yuto Oguchi"; - }; - airwoodix = { - email = "airwoodix@posteo.me"; - github = "airwoodix"; - githubId = 44871469; - name = "Etienne Wodey"; - }; - ajgrf = { - email = "a@ajgrf.com"; - github = "ajgrf"; - githubId = 10733175; - name = "Alex Griffin"; - }; - ajs124 = { - email = "nix@ajs124.de"; - matrix = "@andreas.schraegle:helsinki-systems.de"; - github = "ajs124"; - githubId = 1229027; - name = "Andreas Schrägle"; - }; - ak = { - email = "ak@formalprivacy.com"; - github = "alexanderkjeldaas"; - githubId = 339369; - name = "Alexander Kjeldaas"; - }; - akamaus = { - email = "dmitryvyal@gmail.com"; - github = "akamaus"; - githubId = 58955; - name = "Dmitry Vyal"; - }; - akavel = { - email = "czapkofan@gmail.com"; - github = "akavel"; - githubId = 273837; - name = "Mateusz Czapliński"; - }; - akaWolf = { - email = "akawolf0@gmail.com"; - github = "akaWolf"; - githubId = 5836586; - name = "Artjom Vejsel"; - }; - akc = { - email = "akc@akc.is"; - github = "akc"; - githubId = 1318982; - name = "Anders Claesson"; - }; - a-kenji = { - email = "aks.kenji@protonmail.com"; - github = "a-kenji"; - githubId = 65275785; - name = "Alexander Kenji Berthold"; - }; - akho = { - name = "Alexander Khodyrev"; - email = "a@akho.name"; - github = "akho"; - githubId = 104951; - }; - akkesm = { - name = "Alessandro Barenghi"; - email = "alessandro.barenghi@tuta.io"; - github = "akkesm"; - githubId = 56970006; - keys = [{ - fingerprint = "50E2 669C AB38 2F4A 5F72 1667 0D6B FC01 D45E DADD"; - }]; - }; - akru = { - email = "mail@akru.me"; - github = "akru"; - githubId = 786394; - name = "Alexander Krupenkin "; - }; - akshgpt7 = { - email = "akshgpt7@gmail.com"; - github = "akshgpt7"; - githubId = 20405311; - name = "Aksh Gupta"; - }; - alapshin = { - email = "alapshin@fastmail.com"; - github = "alapshin"; - githubId = 321946; - name = "Andrei Lapshin"; - }; - albakham = { - email = "dev@geber.ga"; - github = "albakham"; - githubId = 43479487; - name = "Titouan Biteau"; - }; - aleksana = { - email = "me@aleksana.moe"; - github = "Aleksanaa"; - githubId = 42209822; - name = "Aleksana QwQ"; - }; - alekseysidorov = { - email = "sauron1987@gmail.com"; - github = "alekseysidorov"; - githubId = 83360; - name = "Aleksey Sidorov"; - }; - alerque = { - email = "caleb@alerque.com"; - github = "alerque"; - githubId = 173595; - name = "Caleb Maclennan"; - }; - ALEX11BR = { - email = "alexioanpopa11@gmail.com"; - github = "ALEX11BR"; - githubId = 49609151; - name = "Popa Ioan Alexandru"; - }; - alexarice = { - email = "alexrice999@hotmail.co.uk"; - github = "alexarice"; - githubId = 17208985; - name = "Alex Rice"; - }; - alexbakker = { - email = "ab@alexbakker.me"; - github = "alexbakker"; - githubId = 2387841; - name = "Alexander Bakker"; - }; - alexbiehl = { - email = "alexbiehl@gmail.com"; - github = "alexbiehl"; - githubId = 1876617; - name = "Alex Biehl"; - }; - alexchapman = { - email = "alex@farfromthere.net"; - github = "AJChapman"; - githubId = 8316672; - name = "Alex Chapman"; - }; - alexeyre = { - email = "A.Eyre@sms.ed.ac.uk"; - github = "alexeyre"; - githubId = 38869148; - name = "Alex Eyre"; - }; - alexfmpe = { - email = "alexandre.fmp.esteves@gmail.com"; - github = "alexfmpe"; - githubId = 2335822; - name = "Alexandre Esteves"; - }; - alexnortung = { - name = "alexnortung"; - email = "alex_nortung@live.dk"; - github = "Alexnortung"; - githubId = 1552267; - }; - alexshpilkin = { - email = "ashpilkin@gmail.com"; - github = "alexshpilkin"; - githubId = 1010468; - keys = [{ - fingerprint = "B595 D74D 6615 C010 469F 5A13 73E9 AA11 4B3A 894B"; - }]; - matrix = "@alexshpilkin:matrix.org"; - name = "Alexander Shpilkin"; - }; - alexvorobiev = { - email = "alexander.vorobiev@gmail.com"; - github = "alexvorobiev"; - githubId = 782180; - name = "Alex Vorobiev"; - }; - alexwinter = { - email = "git@alexwinter.net"; - github = "lxwntr"; - githubId = 50754358; - name = "Alex Winter"; - }; - algram = { - email = "aliasgram@gmail.com"; - github = "Algram"; - githubId = 5053729; - name = "Alias Gram"; - }; - alibabzo = { - email = "alistair.bill@gmail.com"; - github = "alistairbill"; - githubId = 2822871; - name = "Alistair Bill"; - }; - alirezameskin = { - email = "alireza.meskin@gmail.com"; - github = "alirezameskin"; - githubId = 36147; - name = "Alireza Meskin"; - }; - alizter = { - email = "alizter@gmail.com"; - github = "Alizter"; - githubId = 8614547; - name = "Ali Caglayan"; - }; - alkasm = { - email = "alexreynolds00@gmail.com"; - github = "alkasm"; - githubId = 9651002; - name = "Alexander Reynolds"; - }; - alkeryn = { - email = "plbraundev@gmail.com"; - github = "alkeryn"; - githubId = 11599075; - name = "Pierre-Louis Braun"; - }; - allonsy = { - email = "linuxbash8@gmail.com"; - github = "allonsy"; - githubId = 5892756; - name = "Alec Snyder"; - }; - almac = { - email = "alma.cemerlic@gmail.com"; - github = "a1mac"; - githubId = 60479013; - name = "Alma Cemerlic"; - }; - Alper-Celik = { - email = "dev.alpercelik@gmail.com"; - name = "Alper Çelik"; - github = "Alper-Celik"; - githubId = 110625473; - keys = [{ - fingerprint = "6B69 19DD CEE0 FAF3 5C9F 2984 FA90 C0AB 738A B873"; - }]; - }; - alternateved = { - email = "alternateved@pm.me"; - github = "alternateved"; - githubId = 45176912; - name = "Tomasz Hołubowicz"; - }; - AluisioASG = { - name = "Aluísio Augusto Silva Gonçalves"; - email = "aluisio@aasg.name"; - github = "AluisioASG"; - githubId = 1904165; - keys = [{ - fingerprint = "7FDB 17B3 C29B 5BA6 E5A9 8BB2 9FAA 63E0 9750 6D9D"; - }]; - }; - alunduil = { - email = "alunduil@gmail.com"; - github = "alunduil"; - githubId = 169249; - name = "Alex Brandt"; - }; - alva = { - email = "alva@skogen.is"; - github = "illfygli"; - githubId = 42881386; - name = "Alva"; - keys = [{ - fingerprint = "B422 CFB1 C9EF 73F7 E1E2 698D F53E 3233 42F7 A6D3A"; - }]; - }; - alyaeanyx = { - email = "alyaeanyx@mailbox.org"; - github = "alyaeanyx"; - githubId = 74795488; - name = "alyaeanyx"; - keys = [{ - fingerprint = "1F73 8879 5E5A 3DFC E2B3 FA32 87D1 AADC D25B 8DEE"; - }]; - }; - amanjeev = { - email = "aj@amanjeev.com"; - github = "amanjeev"; - githubId = 160476; - name = "Amanjeev Sethi"; - }; - amar1729 = { - email = "amar.paul16@gmail.com"; - github = "Amar1729"; - githubId = 15623522; - name = "Amar Paul"; - }; - amarshall = { - email = "andrew@johnandrewmarshall.com"; - github = "amarshall"; - githubId = 153175; - name = "Andrew Marshall"; - }; - ambroisie = { - email = "bruno.nixpkgs@belanyi.fr"; - github = "ambroisie"; - githubId = 12465195; - name = "Bruno BELANYI"; - }; - ambrop72 = { - email = "ambrop7@gmail.com"; - github = "ambrop72"; - githubId = 2626481; - name = "Ambroz Bizjak"; - }; - ameer = { - name = "Ameer Taweel"; - email = "ameertaweel2002@gmail.com"; - github = "AmeerTaweel"; - githubId = 20538273; - }; - amesgen = { - email = "amesgen@amesgen.de"; - github = "amesgen"; - githubId = 15369874; - name = "Alexander Esgen"; - matrix = "@amesgen:amesgen.de"; - }; - ametrine = { - name = "Matilde Ametrine"; - email = "matilde@diffyq.xyz"; - github = "matilde-ametrine"; - githubId = 90799677; - keys = [{ - fingerprint = "7931 EB4E 4712 D7BE 04F8 6D34 07EE 1FFC A58A 11C5"; - }]; - }; - amfl = { - email = "amfl@none.none"; - github = "amfl"; - githubId = 382798; - name = "amfl"; - }; - amiddelk = { - email = "amiddelk@gmail.com"; - github = "amiddelk"; - githubId = 1358320; - name = "Arie Middelkoop"; - }; - amiloradovsky = { - email = "miloradovsky@gmail.com"; - github = "amiloradovsky"; - githubId = 20530052; - name = "Andrew Miloradovsky"; - }; - aminechikhaoui = { - email = "amine.chikhaoui91@gmail.com"; - github = "AmineChikhaoui"; - githubId = 5149377; - name = "Amine Chikhaoui"; - }; - amorsillo = { - email = "andrew.morsillo@gmail.com"; - github = "evelant"; - githubId = 858965; - name = "Andrew Morsillo"; - }; - amz-x = { - email = "mail@amz-x.com"; - github = "amz-x"; - githubId = 18249234; - name = "Christopher Crouse"; - }; - AnatolyPopov = { - email = "aipopov@live.ru"; - github = "AnatolyPopov"; - githubId = 2312534; - name = "Anatolii Popov"; - }; - andehen = { - email = "git@andehen.net"; - github = "andehen"; - githubId = 754494; - name = "Anders Asheim Hennum"; - }; - andersk = { - email = "andersk@mit.edu"; - github = "andersk"; - githubId = 26471; - name = "Anders Kaseorg"; - }; - anderslundstedt = { - email = "git@anderslundstedt.se"; - github = "anderslundstedt"; - githubId = 4514101; - name = "Anders Lundstedt"; - }; - AndersonTorres = { - email = "torres.anderson.85@protonmail.com"; - matrix = "@anderson_torres:matrix.org"; - github = "AndersonTorres"; - githubId = 5954806; - name = "Anderson Torres"; - }; - anderspapitto = { - email = "anderspapitto@gmail.com"; - github = "anderspapitto"; - githubId = 1388690; - name = "Anders Papitto"; - }; - andir = { - email = "andreas@rammhold.de"; - github = "andir"; - githubId = 638836; - name = "Andreas Rammhold"; - }; - andreasfelix = { - email = "fandreas@physik.hu-berlin.de"; - github = "andreasfelix"; - githubId = 24651767; - name = "Felix Andreas"; - }; - andres = { - email = "ksnixos@andres-loeh.de"; - github = "kosmikus"; - githubId = 293191; - name = "Andres Loeh"; - }; - andresilva = { - email = "andre.beat@gmail.com"; - github = "andresilva"; - githubId = 123550; - name = "André Silva"; - }; - andrestylianos = { - email = "andre.stylianos@gmail.com"; - github = "andrestylianos"; - githubId = 7112447; - name = "Andre S. Ramos"; - }; - andrevmatos = { - email = "andrevmatos@gmail.com"; - github = "andrevmatos"; - githubId = 587021; - name = "André V L Matos"; - }; - andrewchambers = { - email = "ac@acha.ninja"; - github = "andrewchambers"; - githubId = 962885; - name = "Andrew Chambers"; - }; - andrew-d = { - email = "andrew@du.nham.ca"; - github = "andrew-d"; - githubId = 1079173; - name = "Andrew Dunham"; - }; - andrewrk = { - email = "superjoe30@gmail.com"; - github = "andrewrk"; - githubId = 106511; - name = "Andrew Kelley"; - }; - andrewsmith = { - email = "andrew@velvet.software"; - github = "andrewsmith"; - githubId = 29887; - name = "Andrew Smith"; - }; - andsild = { - email = "andsild@gmail.com"; - github = "andsild"; - githubId = 3808928; - name = "Anders Sildnes"; - }; - andys8 = { - github = "andys8"; - githubId = 13085980; - name = "Andy"; - }; - aneeshusa = { - email = "aneeshusa@gmail.com"; - github = "aneeshusa"; - githubId = 2085567; - name = "Aneesh Agrawal"; - }; - an-empty-string = { - name = "Tris Emmy Wilson"; - email = "tris@tris.fyi"; - github = "an-empty-string"; - githubId = 681716; - }; - angristan = { - email = "angristan@pm.me"; - github = "angristan"; - githubId = 11699655; - name = "Stanislas Lange"; - }; - AngryAnt = { - name = "Emil Johansen"; - email = "git@eej.dk"; - matrix = "@angryant:envs.net"; - github = "AngryAnt"; - githubId = 102513; - keys = [{ - fingerprint = "B7B7 582E 564E 789B FCB8 71AB 0C6D FE2F B234 534A"; - }]; - }; - anhdle14 = { - name = "Le Anh Duc"; - email = "anhdle14@icloud.com"; - github = "anhdle14"; - githubId = 9645992; - keys = [{ - fingerprint = "AA4B 8EC3 F971 D350 482E 4E20 0299 AFF9 ECBB 5169"; - }]; - }; - anhduy = { - email = "vo@anhduy.io"; - github = "voanhduy1512"; - githubId = 1771266; - name = "Vo Anh Duy"; - }; - Anillc = { - name = "Anillc"; - email = "i@anillc.cn"; - github = "Anillc"; - githubId = 23411248; - keys = [{ - fingerprint = "6141 1E4F FE10 CE7B 2E14 CD76 0BE8 A88F 47B2 145C"; - }]; - }; - anirrudh = { - email = "anik597@gmail.com"; - github = "anirrudh"; - githubId = 6091755; - name = "Anirrudh Krishnan"; - }; - ankhers = { - email = "me@ankhers.dev"; - github = "ankhers"; - githubId = 750786; - name = "Justin Wood"; - }; - anmonteiro = { - email = "anmonteiro@gmail.com"; - github = "anmonteiro"; - githubId = 661909; - name = "Antonio Nuno Monteiro"; - }; - anna328p = { - email = "anna328p@gmail.com"; - github = "anna328p"; - githubId = 9790772; - name = "Anna"; - }; - annaaurora = { - email = "anna@annaaurora.eu"; - matrix = "@papojari:artemislena.eu"; - github = "auroraanna"; - githubId = 81317317; - name = "Anna Aurora"; - }; - anoa = { - matrix = "@andrewm:amorgan.xyz"; - email = "andrew@amorgan.xyz"; - github = "anoadragon453"; - githubId = 1342360; - name = "Andrew Morgan"; - }; - anpin = { - email = "pavel@anpin.fyi"; - github = "anpin"; - githubId = 6060545; - matrix = "@anpin:matrix.org"; - name = "Pavel Anpin"; - keys = [{ - fingerprint = "06E8 4FF6 0CCF 7AFD 5101 76C9 0FBC D3EE 6310 7407"; - }]; - }; - anpryl = { - email = "anpryl@gmail.com"; - github = "anpryl"; - githubId = 5327697; - name = "Anatolii Prylutskyi"; - }; - anselmschueler = { - email = "mail@anselmschueler.com"; - github = "schuelermine"; - githubId = 48802534; - name = "Anselm Schüler"; - matrix = "@schuelermine:matrix.org"; - }; - anthonyroussel = { - email = "anthony@roussel.dev"; - github = "anthonyroussel"; - githubId = 220084; - name = "Anthony Roussel"; - keys = [{ - fingerprint = "472D 368A F107 F443 F3A5 C712 9DC4 987B 1A55 E75E"; - }]; - }; - antoinerg = { - email = "roygobeil.antoine@gmail.com"; - github = "antoinerg"; - githubId = 301546; - name = "Antoine Roy-Gobeil"; - }; - anton-dessiatov = { - email = "anton.dessiatov@gmail.com"; - github = "anton-dessiatov"; - githubId = 2873280; - name = "Anton Desyatov"; - }; - Anton-Latukha = { - email = "anton.latuka+nixpkgs@gmail.com"; - github = "Anton-Latukha"; - githubId = 20933385; - name = "Anton Latukha"; - }; - antono = { - email = "self@antono.info"; - github = "antono"; - githubId = 7622; - name = "Antono Vasiljev"; - }; - antonxy = { - email = "anton.schirg@posteo.de"; - github = "antonxy"; - githubId = 4194320; - name = "Anton Schirg"; - }; - apeschar = { - email = "albert@peschar.net"; - github = "apeschar"; - githubId = 122977; - name = "Albert Peschar"; - }; - apeyroux = { - email = "alex@px.io"; - github = "apeyroux"; - githubId = 1078530; - name = "Alexandre Peyroux"; - }; - apfelkuchen6 = { - email = "apfelkuchen6@hrnz.li"; - github = "apfelkuchen6"; - githubId = 73002165; - name = "apfelkuchen6"; - }; - aplund = { - email = "austin.lund@gmail.com"; - matrix = "@aplund:matrix.org"; - github = "aplund"; - githubId = 1369436; - name = "Austin Lund"; - keys = [{ - fingerprint = "7083 E268 4BFD 845F 2B84 9E74 B695 8918 ED23 32CE"; - }]; - }; - applePrincess = { - email = "appleprincess@appleprincess.io"; - github = "applePrincess"; - githubId = 17154507; - name = "Lein Matsumaru"; - keys = [{ - fingerprint = "BF8B F725 DA30 E53E 7F11 4ED8 AAA5 0652 F047 9205"; - }]; - }; - apraga = { - email = "alexis.praga@proton.me"; - github = "apraga"; - githubId = 914687; - name = "Alexis Praga"; - }; - ar1a = { - email = "aria@ar1as.space"; - github = "ar1a"; - githubId = 8436007; - name = "Aria Edmonds"; - }; - arcadio = { - email = "arc@well.ox.ac.uk"; - github = "arcadio"; - githubId = 56009; - name = "Arcadio Rubio García"; - }; - archer-65 = { - email = "mario.liguori.056@gmail.com"; - github = "archer-65"; - githubId = 76066109; - name = "Mario Liguori"; - }; - archseer = { - email = "blaz@mxxn.io"; - github = "archseer"; - githubId = 1372918; - name = "Blaž Hrastnik"; - }; - arcnmx = { - github = "arcnmx"; - githubId = 13426784; - name = "arcnmx"; - }; - arcticlimer = { - email = "vinigm.nho@gmail.com"; - github = "viniciusmuller"; - githubId = 59743220; - name = "Vinícius Müller"; - }; - ardumont = { - email = "eniotna.t@gmail.com"; - github = "ardumont"; - githubId = 718812; - name = "Antoine R. Dumont"; - }; - arezvov = { - email = "alex@rezvov.ru"; - github = "arezvov"; - githubId = 58516559; - name = "Alexander Rezvov"; - }; - arian-d = { - email = "arianxdehghani@gmail.com"; - github = "arian-d"; - githubId = 40076285; - name = "Arian Dehghani"; - }; - arianvp = { - email = "arian.vanputten@gmail.com"; - github = "arianvp"; - githubId = 628387; - name = "Arian van Putten"; - }; - arikgrahl = { - email = "mail@arik-grahl.de"; - github = "arikgrahl"; - githubId = 8049011; - name = "Arik Grahl"; - }; - aristid = { - email = "aristidb@gmail.com"; - github = "aristidb"; - githubId = 30712; - name = "Aristid Breitkreuz"; - }; - ariutta = { - email = "anders.riutta@gmail.com"; - github = "ariutta"; - githubId = 1296771; - name = "Anders Riutta"; - }; - arjan-s = { - email = "github@anymore.nl"; - github = "arjan-s"; - githubId = 10400299; - name = "Arjan Schrijver"; - }; - arjix = { - email = "arjix@protonmail.com"; - github = "arjix"; - githubId = 62168569; - name = "arjix"; - }; - arkivm = { - email = "vikram186@gmail.com"; - github = "arkivm"; - githubId = 1118815; - name = "Vikram Narayanan"; - }; - armeenm = { - email = "mahdianarmeen@gmail.com"; - github = "armeenm"; - githubId = 29145250; - name = "Armeen Mahdian"; - }; - armijnhemel = { - email = "armijn@tjaldur.nl"; - github = "armijnhemel"; - githubId = 10587952; - name = "Armijn Hemel"; - }; - arnarg = { - email = "arnarg@fastmail.com"; - github = "arnarg"; - githubId = 1291396; - name = "Arnar Ingason"; - }; - arnoldfarkas = { - email = "arnold.farkas@gmail.com"; - github = "arnoldfarkas"; - githubId = 59696216; - name = "Arnold Farkas"; - }; - arnoutkroeze = { - email = "nixpkgs@arnoutkroeze.nl"; - github = "ArnoutKroeze"; - githubId = 37151054; - name = "Arnout Kroeze"; - }; - arobyn = { - email = "shados@shados.net"; - github = "Shados"; - githubId = 338268; - name = "Alexei Robyn"; - }; - artemist = { - email = "me@artem.ist"; - github = "artemist"; - githubId = 1226638; - name = "Artemis Tosini"; - keys = [{ - fingerprint = "3D2B B230 F9FA F0C5 1832 46DD 4FDC 96F1 61E7 BA8A"; - }]; - }; - arthur = { - email = "me@arthur.li"; - github = "arthurl"; - githubId = 3965744; - name = "Arthur Lee"; - }; - arthurteisseire = { - email = "arthurteisseire33@gmail.com"; - github = "arthurteisseire"; - githubId = 37193992; - name = "Arthur Teisseire"; - }; - artturin = { - email = "artturin@artturin.com"; - matrix = "@artturin:matrix.org"; - github = "Artturin"; - githubId = 56650223; - name = "Artturi N"; - }; - arturcygan = { - email = "arczicygan@gmail.com"; - github = "arcz"; - githubId = 4679721; - name = "Artur Cygan"; - }; - artuuge = { - email = "artuuge@gmail.com"; - github = "artuuge"; - githubId = 10285250; - name = "Artur E. Ruuge"; - }; - asbachb = { - email = "asbachb-nixpkgs-5c2a@impl.it"; - matrix = "@asbachb:matrix.org"; - github = "asbachb"; - githubId = 1482768; - name = "Benjamin Asbach"; - }; - ashalkhakov = { - email = "artyom.shalkhakov@gmail.com"; - github = "ashalkhakov"; - githubId = 1270502; - name = "Artyom Shalkhakov"; - }; - ashgillman = { - email = "gillmanash@gmail.com"; - github = "ashgillman"; - githubId = 816777; - name = "Ashley Gillman"; - }; - ashkitten = { - email = "ashlea@protonmail.com"; - github = "ashkitten"; - githubId = 9281956; - name = "ash lea"; - }; - ashley = { - email = "ashley@kira64.xyz"; - github = "kira64xyz"; - githubId = 84152630; - name = "Ashley Chiara"; - }; - ashleyghooper = { - email = "ashleyghooper@gmail.com"; - github = "ashleyghooper"; - githubId = 11037075; - name = "Ashley Hooper"; - }; - aske = { - email = "aske@fmap.me"; - github = "aske"; - githubId = 869771; - name = "Kirill Boltaev"; - }; - asppsa = { - email = "asppsa@gmail.com"; - github = "asppsa"; - githubId = 453170; - name = "Alastair Pharo"; - }; - astro = { - email = "astro@spaceboyz.net"; - github = "astro"; - githubId = 12923; - name = "Astro"; - }; - astrobeastie = { - email = "fischervincent98@gmail.com"; - github = "astrobeastie"; - githubId = 26362368; - name = "Vincent Fischer"; - keys = [{ - fingerprint = "BF47 81E1 F304 1ADF 18CE C401 DE16 C7D1 536D A72F"; - }]; - }; - astsmtl = { - email = "astsmtl@yandex.ru"; - github = "astsmtl"; - githubId = 2093941; - name = "Alexander Tsamutali"; - }; - asymmetric = { - email = "lorenzo@mailbox.org"; - github = "asymmetric"; - githubId = 101816; - name = "Lorenzo Manacorda"; - }; - aszlig = { - email = "aszlig@nix.build"; - github = "aszlig"; - githubId = 192147; - name = "aszlig"; - keys = [{ - fingerprint = "DD52 6BC7 767D BA28 16C0 95E5 6840 89CE 67EB B691"; - }]; - }; - ataraxiasjel = { - email = "nix@ataraxiadev.com"; - github = "AtaraxiaSjel"; - githubId = 5314145; - name = "Dmitriy"; - keys = [{ - fingerprint = "922D A6E7 58A0 FE4C FAB4 E4B2 FD26 6B81 0DF4 8DF2"; - }]; - }; - atemu = { - name = "Atemu"; - email = "atemu.main+nixpkgs@gmail.com"; - github = "Atemu"; - githubId = 18599032; - }; - athas = { - email = "athas@sigkill.dk"; - github = "athas"; - githubId = 55833; - name = "Troels Henriksen"; - }; - athre0z = { - email = "joel@zyantific.com"; - github = "athre0z"; - githubId = 6553158; - name = "Joel Höner"; - }; - atila = { - name = "Átila Saraiva"; - email = "atilasaraiva@gmail.com"; - github = "AtilaSaraiva"; - githubId = 29521461; - }; - atkinschang = { - email = "atkinschang+nixpkgs@gmail.com"; - github = "AtkinsChang"; - githubId = 5193600; - name = "Atkins Chang"; - }; - atkrad = { - name = "Mohammad Abdolirad"; - email = "m.abdolirad@gmail.com"; - github = "atkrad"; - githubId = 351364; - keys = [ - { - fingerprint = "0380 F2F8 DF7A BA1A E7DB D84A 1935 1496 62CA FDB8"; - } - ]; - }; - atnnn = { - email = "etienne@atnnn.com"; - github = "AtnNn"; - githubId = 706854; - name = "Etienne Laurin"; - }; - atry = { - name = "Bo Yang"; - email = "atry@fb.com"; - github = "Atry"; - githubId = 601530; - }; - attila-lendvai = { - name = "Attila Lendvai"; - email = "attila@lendvai.name"; - github = "attila-lendvai"; - githubId = 840345; - }; - auchter = { - name = "Michael Auchter"; - email = "a@phire.org"; - github = "auchter"; - githubId = 1190483; - }; - auntie = { - email = "auntieNeo@gmail.com"; - github = "auntieNeo"; - githubId = 574938; - name = "Jonathan Glines"; - }; - austin-artificial = { - email = "austin.platt@artificial.io"; - github = "austin-artificial"; - githubId = 126663376; - name = "Austin Platt"; - }; - austinbutler = { - email = "austinabutler@gmail.com"; - github = "austinbutler"; - githubId = 354741; - name = "Austin Butler"; - }; - autophagy = { - email = "mail@autophagy.io"; - github = "autophagy"; - githubId = 12958979; - name = "Mika Naylor"; - }; - autumnal = { - name = "Sven Friedrich"; - email = "sven@autumnal.de"; - github = "sevenautumns"; - githubId = 20627275; - keys = [{ - fingerprint = "6A2E 7FDD 1037 11A8 B996 E28E B051 064E 2FCA B71B"; - }]; - }; - avakhrenev = { - email = "avakhrenev@gmail.com"; - github = "avakhrenev"; - githubId = 1060224; - name = "Alexey Vakhrenev"; - }; - avaq = { - email = "nixpkgs@account.avaq.it"; - github = "Avaq"; - githubId = 1217745; - name = "Aldwin Vlasblom"; - }; - aveltras = { - email = "romain.viallard@outlook.fr"; - github = "aveltras"; - githubId = 790607; - name = "Romain Viallard"; - }; - averelld = { - email = "averell+nixos@rxd4.com"; - github = "averelld"; - githubId = 687218; - name = "averelld"; - }; - avery = { - email = "averyl+nixos@protonmail.com"; - github = "AveryLychee"; - githubId = 9147625; - name = "Avery Lychee"; - }; - avh4 = { - email = "gruen0aermel@gmail.com"; - github = "avh4"; - githubId = 1222; - name = "Aaron VonderHaar"; - }; - avitex = { - email = "theavitex@gmail.com"; - github = "avitex"; - githubId = 5110816; - name = "avitex"; - keys = [{ - fingerprint = "271E 136C 178E 06FA EA4E B854 8B36 6C44 3CAB E942"; - }]; - }; - avnik = { - email = "avn@avnik.info"; - github = "avnik"; - githubId = 153538; - name = "Alexander V. Nikolaev"; - }; - aw = { - email = "aw-nixos@meterriblecrew.net"; - github = "herrwiese"; - githubId = 206242; - name = "Andreas Wiese"; - }; - ayazhafiz = { - email = "ayaz.hafiz.1@gmail.com"; - github = "hafiz"; - githubId = 262763; - name = "Ayaz Hafiz"; - }; - aycanirican = { - email = "iricanaycan@gmail.com"; - github = "aycanirican"; - githubId = 135230; - name = "Aycan iRiCAN"; - }; - azahi = { - name = "Azat Bahawi"; - email = "azat@bahawi.net"; - matrix = "@azahi:azahi.cc"; - github = "azahi"; - githubId = 22211000; - keys = [{ - fingerprint = "2688 0377 C31D 9E81 9BDF 83A8 C8C6 BDDB 3847 F72B"; - }]; - }; - azuwis = { - email = "azuwis@gmail.com"; - github = "azuwis"; - githubId = 9315; - name = "Zhong Jianxin"; - }; - b4dm4n = { - email = "fabianm88@gmail.com"; - github = "B4dM4n"; - githubId = 448169; - name = "Fabian Möller"; - keys = [{ - fingerprint = "6309 E212 29D4 DA30 AF24 BDED 754B 5C09 63C4 2C50"; - }]; - }; - babariviere = { - email = "me@babariviere.com"; - github = "babariviere"; - githubId = 12128029; - name = "Bastien Rivière"; - keys = [{ - fingerprint = "74AA 9AB4 E6FF 872B 3C5A CB3E 3903 5CC0 B75D 1142"; - }]; - }; - babbaj = { - name = "babbaj"; - email = "babbaj45@gmail.com"; - github = "babbaj"; - githubId = 12820770; - keys = [{ - fingerprint = "6FBC A462 4EAF C69C A7C4 98C1 F044 3098 48A0 7CAC"; - }]; - }; - bachp = { - email = "pascal.bach@nextrem.ch"; - matrix = "@bachp:matrix.org"; - github = "bachp"; - githubId = 333807; - name = "Pascal Bach"; - }; - backuitist = { - email = "biethb@gmail.com"; - github = "backuitist"; - githubId = 1017537; - name = "Bruno Bieth"; - }; - badmutex = { - email = "github@badi.sh"; - github = "badmutex"; - githubId = 35324; - name = "Badi' Abdul-Wahid"; - }; - baduhai = { - email = "baduhai@pm.me"; - github = "baduhai"; - githubId = 31864305; - name = "William"; - }; - baitinq = { - email = "manuelpalenzuelamerino@gmail.com"; - name = "Baitinq"; - github = "Baitinq"; - githubId = 30861839; - }; - balodja = { - email = "balodja@gmail.com"; - github = "balodja"; - githubId = 294444; - name = "Vladimir Korolev"; - }; - baloo = { - email = "nixpkgs@superbaloo.net"; - github = "baloo"; - githubId = 59060; - name = "Arthur Gautier"; - }; - balsoft = { - email = "balsoft75@gmail.com"; - github = "balsoft"; - githubId = 18467667; - name = "Alexander Bantyev"; - }; - bandresen = { - email = "bandresen@gmail.com"; - github = "bennyandresen"; - githubId = 80325; - name = "Benjamin Andresen"; - }; - baracoder = { - email = "baracoder@googlemail.com"; - github = "baracoder"; - githubId = 127523; - name = "Herman Fries"; - }; - BarinovMaxim = { - name = "Barinov Maxim"; - email = "barinov274@gmail.com"; - github = "barinov274"; - githubId = 54442153; - }; - barrucadu = { - email = "mike@barrucadu.co.uk"; - github = "barrucadu"; - githubId = 75235; - name = "Michael Walker"; - }; - bartsch = { - email = "consume.noise@gmail.com"; - github = "bartsch"; - githubId = 3390885; - name = "Daniel Martin"; - }; - bartuka = { - email = "wand@hey.com"; - github = "wandersoncferreira"; - githubId = 17708295; - name = "Wanderson Ferreira"; - keys = [{ - fingerprint = "A3E1 C409 B705 50B3 BF41 492B 5684 0A61 4DBE 37AE"; - }]; - }; - basvandijk = { - email = "v.dijk.bas@gmail.com"; - github = "basvandijk"; - githubId = 576355; - name = "Bas van Dijk"; - }; - BattleCh1cken = { - email = "BattleCh1cken@larkov.de"; - github = "BattleCh1cken"; - githubId = 75806385; - name = "Felix Hass"; - }; - Baughn = { - email = "sveina@gmail.com"; - github = "Baughn"; - githubId = 45811; - name = "Svein Ove Aas"; - }; - Bauke = { - name = "Bauke"; - email = "me@bauke.xyz"; - matrix = "@baukexyz:matrix.org"; - github = "Bauke"; - githubId = 19501722; - keys = [{ - fingerprint = "C593 27B5 9D0F 2622 23F6 1D03 C1C0 F299 52BC F558"; - }]; - }; - bb010g = { - email = "me@bb010g.com"; - matrix = "@bb010g:matrix.org"; - github = "bb010g"; - githubId = 340132; - name = "Brayden Banks"; - }; - bb2020 = { - github = "bb2020"; - githubId = 19290397; - name = "Tunc Uzlu"; - }; - bbarker = { - email = "brandon.barker@gmail.com"; - github = "bbarker"; - githubId = 916366; - name = "Brandon Elam Barker"; - }; - bbenne10 = { - email = "Bryan.Bennett@protonmail.com"; - matrix = "@bryan.bennett:matrix.org"; - github = "bbenne10"; - githubId = 687376; - name = "Bryan Bennett"; - keys = [{ - # compare with https://keybase.io/bbenne10 - fingerprint = "41EA 00B4 00F9 6970 1CB2 D3AF EF90 E3E9 8B8F 5C0B"; - }]; - }; - bbenno = { - email = "nix@bbenno.com"; - github = "bbenno"; - githubId = 32938211; - name = "Benno Bielmeier"; - }; - bbigras = { - email = "bigras.bruno@gmail.com"; - github = "bbigras"; - githubId = 24027; - name = "Bruno Bigras"; - }; - bburdette = { - email = "bburdette@protonmail.com"; - github = "bburdette"; - githubId = 157330; - name = "Ben Burdette"; - }; - bcarrell = { - email = "brandoncarrell@gmail.com"; - github = "bcarrell"; - githubId = 1015044; - name = "Brandon Carrell"; - }; - bcc32 = { - email = "me@bcc32.com"; - github = "bcc32"; - githubId = 1239097; - name = "Aaron Zeng"; - }; - bcdarwin = { - email = "bcdarwin@gmail.com"; - github = "bcdarwin"; - githubId = 164148; - name = "Ben Darwin"; - }; - bdd = { - email = "bdd@mindcast.org"; - github = "bdd"; - githubId = 11135; - name = "Berk D. Demir"; - }; - bdesham = { - email = "benjamin@esham.io"; - github = "bdesham"; - githubId = 354230; - name = "Benjamin Esham"; - }; - bdimcheff = { - email = "brandon@dimcheff.com"; - github = "bdimcheff"; - githubId = 14111; - name = "Brandon Dimcheff"; - }; - beardhatcode = { - name = "Robbert Gurdeep Singh"; - email = "nixpkgs@beardhatcode.be"; - github = "beardhatcode"; - githubId = 662538; - }; - beezow = { - name = "beezow"; - email = "zbeezow@gmail.com"; - github = "beezow"; - githubId = 42082156; - }; - bendlas = { - email = "herwig@bendlas.net"; - matrix = "@bendlas:matrix.org"; - github = "bendlas"; - githubId = 214787; - name = "Herwig Hochleitner"; - }; - benediktbroich = { - name = "Benedikt Broich"; - email = "b.broich@posteo.de"; - github = "BenediktBroich"; - githubId = 32903896; - keys = [{ - fingerprint = "CB5C 7B3C 3E6F 2A59 A583 A90A 8A60 0376 7BE9 5976"; - }]; - }; - benesim = { - name = "Benjamin Isbarn"; - email = "benjamin.isbarn@gmail.com"; - github = "BeneSim"; - githubId = 29384538; - keys = [{ - fingerprint = "D35E C9CE E631 638F F1D8 B401 6F0E 410D C3EE D02"; - }]; - }; - benjaminedwardwebb = { - name = "Ben Webb"; - email = "benjaminedwardwebb@gmail.com"; - github = "benjaminedwardwebb"; - githubId = 7118777; - keys = [{ - fingerprint = "E9A3 7864 2165 28CE 507C CA82 72EA BF75 C331 CD25"; - }]; - }; - benkuhn = { - email = "ben@ben-kuhn.com"; - github = "ben-kuhn"; - githubId = 16821405; - name = "Ben Kuhn"; - }; - benley = { - email = "benley@gmail.com"; - github = "benley"; - githubId = 1432730; - name = "Benjamin Staffin"; - }; - benneti = { - name = "Benedikt Tissot"; - email = "benedikt.tissot@googlemail.com"; - github = "benneti"; - githubId = 11725645; - }; - bennofs = { - email = "benno.fuenfstueck@gmail.com"; - github = "bennofs"; - githubId = 3192959; - name = "Benno Fünfstück"; - }; - benpye = { - email = "ben@curlybracket.co.uk"; - github = "benpye"; - githubId = 442623; - name = "Ben Pye"; - }; - benwbooth = { - email = "benwboooth@gmail.com"; - github = "benwbooth"; - githubId = 75972; - name = "Ben Booth"; - }; - berberman = { - email = "berberman@yandex.com"; - matrix = "@berberman:mozilla.org"; - github = "berberman"; - githubId = 26041945; - name = "Potato Hatsue"; - }; - berbiche = { - name = "Nicolas Berbiche"; - email = "nicolas@normie.dev"; - github = "berbiche"; - githubId = 20448408; - keys = [{ - fingerprint = "D446 E58D 87A0 31C7 EC15 88D7 B461 2924 45C6 E696"; - }]; - }; - berce = { - email = "bert.moens@gmail.com"; - github = "berce"; - githubId = 10439709; - name = "Bert Moens"; - }; - berdario = { - email = "berdario@gmail.com"; - github = "berdario"; - githubId = 752835; - name = "Dario Bertini"; - }; - bergey = { - email = "bergey@teallabs.org"; - github = "bergey"; - githubId = 251106; - name = "Daniel Bergey"; - }; - bergkvist = { - email = "tobias@bergkv.ist"; - github = "bergkvist"; - githubId = 410028; - name = "Tobias Bergkvist"; - }; - berryp = { - email = "berryphillips@gmail.com"; - github = "berryp"; - githubId = 19911; - name = "Berry Phillips"; - }; - bertof = { - name = "Filippo Berto"; - email = "berto.f@protonmail.com"; - github = "bertof"; - githubId = 9915675; - keys = [{ - fingerprint = "17C5 1EF9 C0FE 2EB2 FE56 BB53 FE98 AE5E C52B 1056"; - }]; - }; - betaboon = { - email = "betaboon@0x80.ninja"; - github = "betaboon"; - githubId = 7346933; - name = "betaboon"; - }; - bew = { - email = "benoit.dechezelles@gmail.com"; - github = "bew"; - githubId = 9730330; - name = "Benoit de Chezelles"; - }; - bezmuth = { - email = "benkel97@protonmail.com"; - name = "Ben Kelly"; - github = "bezmuth"; - githubId = 31394095; - }; - bfortz = { - email = "bernard.fortz@gmail.com"; - github = "bfortz"; - githubId = 16426882; - name = "Bernard Fortz"; - }; - bgamari = { - email = "ben@smart-cactus.org"; - github = "bgamari"; - githubId = 1010174; - name = "Ben Gamari"; - }; - bhall = { - email = "brendan.j.hall@bath.edu"; - github = "brendan-hall"; - githubId = 34919100; - name = "Brendan Hall"; - }; - bhipple = { - email = "bhipple@protonmail.com"; - github = "bhipple"; - githubId = 2071583; - name = "Benjamin Hipple"; - }; - bhougland = { - email = "benjamin.hougland@gmail.com"; - github = "bhougland18"; - githubId = 28444296; - name = "Benjamin Hougland"; - }; - billewanick = { - email = "bill@ewanick.com"; - github = "billewanick"; - githubId = 13324165; - name = "Bill Ewanick"; - }; - billhuang = { - email = "bill.huang2001@gmail.com"; - github = "BillHuang2001"; - githubId = 11801831; - name = "Bill Huang"; - }; - binarin = { - email = "binarin@binarin.ru"; - github = "binarin"; - githubId = 185443; - name = "Alexey Lebedeff"; - }; - binsky = { - email = "timo@binsky.org"; - github = "binsky08"; - githubId = 30630233; - name = "Timo Triebensky"; - }; - bjornfor = { - email = "bjorn.forsman@gmail.com"; - github = "bjornfor"; - githubId = 133602; - name = "Bjørn Forsman"; - }; - bkchr = { - email = "nixos@kchr.de"; - github = "bkchr"; - githubId = 5718007; - name = "Bastian Köcher"; - }; - blaggacao = { - name = "David Arnold"; - email = "dar@xoe.solutions"; - github = "blaggacao"; - githubId = 7548295; - }; - blanky0230 = { - email = "blanky0230@gmail.com"; - github = "blanky0230"; - githubId = 5700358; - name = "Thomas Blank"; - }; - blitz = { - email = "js@alien8.de"; - matrix = "@js:ukvly.org"; - github = "blitz"; - githubId = 37907; - name = "Julian Stecklina"; - }; - bluescreen303 = { - email = "mathijs@bluescreen303.nl"; - github = "bluescreen303"; - githubId = 16330; - name = "Mathijs Kwik"; - }; - bmilanov = { - name = "Biser Milanov"; - email = "bmilanov11+nixpkgs@gmail.com"; - github = "bmilanov"; - githubId = 30090366; - }; - bmwalters = { - name = "Bradley Walters"; - email = "oss@walters.app"; - github = "bmwalters"; - githubId = 4380777; - }; - bobakker = { - email = "bobakk3r@gmail.com"; - github = "bobakker"; - githubId = 10221570; - name = "Bo Bakker"; - }; - bobby285271 = { - name = "Bobby Rong"; - email = "rjl931189261@126.com"; - matrix = "@bobby285271:matrix.org"; - github = "bobby285271"; - githubId = 20080233; - }; - bobvanderlinden = { - email = "bobvanderlinden@gmail.com"; - github = "bobvanderlinden"; - githubId = 6375609; - name = "Bob van der Linden"; - }; - bodil = { - email = "nix@bodil.org"; - github = "bodil"; - githubId = 17880; - name = "Bodil Stokke"; - }; - boj = { - email = "brian@uncannyworks.com"; - github = "boj"; - githubId = 50839; - name = "Brian Jones"; - }; - booklearner = { - name = "booklearner"; - email = "booklearner@proton.me"; - matrix = "@booklearner:matrix.org"; - github = "booklearner"; - githubId = 103979114; - keys = [{ - fingerprint = "17C7 95D4 871C 2F87 83C8 053D 0C61 C4E5 907F 76C8"; - }]; - }; - bootstrap-prime = { - email = "bootstrap.prime@gmail.com"; - github = "bootstrap-prime"; - githubId = 68566724; - name = "bootstrap-prime"; - }; - borisbabic = { - email = "boris.ivan.babic@gmail.com"; - github = "borisbabic"; - githubId = 1743184; - name = "Boris Babić"; - }; - borlaag = { - email = "borlaag@proton.me"; - github = "Borlaag"; - githubId = 114830266; - name = "Børlaag"; - }; - bosu = { - email = "boriss@gmail.com"; - github = "bosu"; - githubId = 3465841; - name = "Boris Sukholitko"; - }; - bouk = { - name = "Bouke van der Bijl"; - email = "i@bou.ke"; - github = "bouk"; - githubId = 97820; - }; - bpaulin = { - email = "brunopaulin@bpaulin.net"; - github = "bpaulin"; - githubId = 115711; - name = "bpaulin"; - }; - Br1ght0ne = { - email = "brightone@protonmail.com"; - github = "Br1ght0ne"; - githubId = 12615679; - name = "Oleksii Filonenko"; - keys = [{ - fingerprint = "F549 3B7F 9372 5578 FDD3 D0B8 A1BC 8428 323E CFE8"; - }]; - }; - bradediger = { - email = "brad@bradediger.com"; - github = "bradediger"; - githubId = 4621; - name = "Brad Ediger"; - }; - brainrape = { - email = "martonboros@gmail.com"; - github = "brainrake"; - githubId = 302429; - name = "Marton Boros"; - }; - bramd = { - email = "bram@bramd.nl"; - github = "bramd"; - githubId = 86652; - name = "Bram Duvigneau"; - }; - braydenjw = { - email = "nixpkgs@willenborg.ca"; - github = "braydenjw"; - githubId = 2506621; - name = "Brayden Willenborg"; - }; - breakds = { - email = "breakds@gmail.com"; - github = "breakds"; - githubId = 1111035; - name = "Break Yang"; - }; - brecht = { - email = "brecht.savelkoul@alumni.lse.ac.uk"; - github = "brechtcs"; - githubId = 6107054; - name = "Brecht Savelkoul"; - }; - brendanreis = { - email = "brendanreis@gmail.com"; - name = "Brendan Reis"; - github = "brendanreis"; - githubId = 10686906; - }; - brettlyons = { - email = "blyons@fastmail.com"; - github = "brettlyons"; - githubId = 3043718; - name = "Brett Lyons"; - }; - brian-dawn = { - email = "brian.t.dawn@gmail.com"; - github = "brian-dawn"; - githubId = 1274409; - name = "Brian Dawn"; - }; - brianhicks = { - email = "brian@brianthicks.com"; - github = "BrianHicks"; - githubId = 355401; - name = "Brian Hicks"; - }; - brianmcgee = { - name = "Brian McGee"; - email = "brian@41north.dev"; - github = "brianmcgee"; - githubId = 1173648; - }; - brodes = { - email = "me@brod.es"; - github = "brhoades"; - githubId = 4763746; - name = "Billy Rhoades"; - keys = [{ - fingerprint = "BF4FCB85C69989B4ED95BF938AE74787A4B7C07E"; - }]; - }; - broke = { - email = "broke@in-fucking.space"; - github = "broke"; - githubId = 1071610; - name = "Gunnar Nitsche"; - }; - bryanasdev000 = { - email = "bryanasdev000@gmail.com"; - matrix = "@bryanasdev000:matrix.org"; - github = "bryanasdev000"; - githubId = 53131727; - name = "Bryan Albuquerque"; - }; - bryanhonof = { - name = "Bryan Honof"; - email = "bryanhonof@gmail.com"; - github = "bryanhonof"; - githubId = 5932804; - }; - bsima = { - email = "ben@bsima.me"; - github = "bsima"; - githubId = 200617; - name = "Ben Sima"; - }; - bstrik = { - email = "dutchman55@gmx.com"; - github = "bstrik"; - githubId = 7716744; - name = "Berno Strik"; - }; - btlvr = { - email = "btlvr@protonmail.com"; - github = "btlvr"; - githubId = 32319131; - name = "Brett L"; - }; - buckley310 = { - email = "sean.bck@gmail.com"; - matrix = "@buckley310:matrix.org"; - github = "buckley310"; - githubId = 2379774; - name = "Sean Buckley"; - }; - buffet = { - email = "niclas@countingsort.com"; - github = "buffet"; - githubId = 33751841; - name = "Niclas Meyer"; - }; - bugworm = { - email = "bugworm@zoho.com"; - github = "bugworm"; - githubId = 7214361; - name = "Roman Gerasimenko"; - }; - builditluc = { - email = "builditluc@icloud.com"; - github = "Builditluc"; - githubId = 37375448; - name = "Buildit"; - }; - bwlang = { - email = "brad@langhorst.com"; - github = "bwlang"; - githubId = 61636; - name = "Brad Langhorst"; - }; - bzizou = { - email = "Bruno@bzizou.net"; - github = "bzizou"; - githubId = 2647566; - name = "Bruno Bzeznik"; - }; - c00w = { - email = "nix@daedrum.net"; - github = "c00w"; - githubId = 486199; - name = "Colin"; - }; - c0bw3b = { - email = "c0bw3b@gmail.com"; - github = "c0bw3b"; - githubId = 24417923; - name = "Renaud"; - }; - c0deaddict = { - email = "josvanbakel@protonmail.com"; - github = "c0deaddict"; - githubId = 510553; - name = "Jos van Bakel"; - }; - c4605 = { - email = "bolasblack@gmail.com"; - github = "bolasblack"; - githubId = 382011; - name = "c4605"; - }; - caadar = { - email = "v88m@posteo.net"; - github = "caadar"; - githubId = 15320726; - name = "Car Cdr"; - }; - caarlos0 = { - name = "Carlos A Becker"; - email = "carlos@becker.software"; - github = "caarlos0"; - githubId = 245435; - }; - cab404 = { - email = "cab404@mailbox.org"; - github = "cab404"; - githubId = 6453661; - name = "Vladimir Serov"; - keys = [ - # compare with https://keybase.io/cab404 - { - fingerprint = "1BB96810926F4E715DEF567E6BA7C26C3FDF7BB3"; - } - { - fingerprint = "1EBC648C64D6045463013B3EB7EFFC271D55DB8A"; - } - ]; - }; - CactiChameleon9 = { - email = "h19xjkkp@duck.com"; - github = "CactiChameleon9"; - githubId = 51231053; - name = "Daniel"; - }; - cafkafk = { - email = "christina@cafkafk.com"; - matrix = "@cafkafk:matrix.cafkafk.com"; - name = "Christina Sørensen"; - github = "cafkafk"; - githubId = 89321978; - keys = [ - { - fingerprint = "7B9E E848 D074 AE03 7A0C 651A 8ED4 DEF7 375A 30C8"; - } - { - fingerprint = "208A 2A66 8A2F CDE7 B5D3 8F64 CDDC 792F 6552 51ED"; - } - ]; - }; - calavera = { - email = "david.calavera@gmail.com"; - github = "calavera"; - githubId = 1050; - matrix = "@davidcalavera:matrix.org"; - name = "David Calavera"; - }; - calbrecht = { - email = "christian.albrecht@mayflower.de"; - github = "calbrecht"; - githubId = 1516457; - name = "Christian Albrecht"; - }; - callahad = { - email = "dan.callahan@gmail.com"; - github = "callahad"; - githubId = 24193; - name = "Dan Callahan"; - }; - calvertvl = { - email = "calvertvl@gmail.com"; - github = "calvertvl"; - githubId = 7435854; - name = "Victor Calvert"; - }; - cameronfyfe = { - email = "cameron.j.fyfe@gmail.com"; - github = "cameronfyfe"; - githubId = 21013281; - name = "Cameron Fyfe"; - }; - cameronnemo = { - email = "cnemo@tutanota.com"; - github = "CameronNemo"; - githubId = 3212452; - name = "Cameron Nemo"; - }; - camillemndn = { - email = "camillemondon@free.fr"; - github = "camillemndn"; - githubId = 26444818; - name = "Camille M."; - }; - campadrenalin = { - email = "campadrenalin@gmail.com"; - github = "campadrenalin"; - githubId = 289492; - name = "Philip Horger"; - }; - candeira = { - email = "javier@candeira.com"; - github = "candeira"; - githubId = 91694; - name = "Javier Candeira"; - }; - canndrew = { - email = "shum@canndrew.org"; - github = "canndrew"; - githubId = 5555066; - name = "Andrew Cann"; - }; - cap = { - name = "cap"; - email = "nixos_xasenw9@digitalpostkasten.de"; - github = "scaredmushroom"; - githubId = 45340040; - }; - CaptainJawZ = { - email = "CaptainJawZ@outlook.com"; - name = "Danilo Reyes"; - github = "CaptainJawZ"; - githubId = 43111068; - }; - CardboardTurkey = { - name = "Kiran Ostrolenk"; - email = "kostrolenk@gmail.com"; - github = "CardboardTurkey"; - githubId = 34030186; - }; - carlosdagos = { - email = "m@cdagostino.io"; - github = "carlosdagos"; - githubId = 686190; - name = "Carlos D'Agostino"; - }; - carlsverre = { - email = "accounts@carlsverre.com"; - github = "carlsverre"; - githubId = 82591; - name = "Carl Sverre"; - }; - carpinchomug = { - email = "aki.suda@protonmail.com"; - github = "carpinchomug"; - githubId = 101536256; - name = "Akiyoshi Suda"; - }; - cartr = { - email = "carter.sande@duodecima.technology"; - github = "cartr"; - githubId = 5241813; - name = "Carter Sande"; - }; - casey = { - email = "casey@rodarmor.net"; - github = "casey"; - githubId = 1945; - name = "Casey Rodarmor"; - }; - catap = { - email = "kirill@korins.ky"; - github = "catap"; - githubId = 37775; - name = "Kirill A. Korinsky"; - }; - catern = { - email = "sbaugh@catern.com"; - github = "catern"; - githubId = 5394722; - name = "Spencer Baugh"; - }; - cathalmullan = { - email = "contact@cathal.dev"; - github = "CathalMullan"; - githubId = 37139470; - name = "Cathal Mullan"; - }; - catouc = { - email = "catouc@philipp.boeschen.me"; - github = "catouc"; - githubId = 25623213; - name = "Philipp Böschen"; - }; - caugner = { - email = "nixos@caugner.de"; - github = "caugner"; - githubId = 495429; - name = "Claas Augner"; - }; - cawilliamson = { - email = "home@chrisaw.com"; - github = "cawilliamson"; - githubId = 1141769; - matrix = "@cawilliamson:nixos.dev"; - name = "Christopher A. Williamson"; - }; - cbleslie = { - email = "cameronleslie@gmail.com"; - github = "cbleslie"; - githubId = 500963; - name = "C.B.Leslie"; - }; - cbley = { - email = "claudio.bley@gmail.com"; - github = "avdv"; - githubId = 3471749; - name = "Claudio Bley"; - }; - cbrewster = { - email = "cbrewster@hey.com"; - github = "cbrewster"; - githubId = 9086315; - name = "Connor Brewster"; - }; - cburstedde = { - email = "burstedde@ins.uni-bonn.de"; - github = "cburstedde"; - githubId = 109908; - name = "Carsten Burstedde"; - keys = [{ - fingerprint = "1127 A432 6524 BF02 737B 544E 0704 CD9E 550A 6BCD"; - }]; - }; - ccellado = { - email = "annplague@gmail.com"; - github = "ccellado"; - githubId = 44584960; - name = "Denis Khalmatov"; - }; - cdepillabout = { - email = "cdep.illabout@gmail.com"; - matrix = "@cdepillabout:matrix.org"; - github = "cdepillabout"; - githubId = 64804; - name = "Dennis Gosnell"; - }; - ceedubs = { - email = "ceedubs@gmail.com"; - github = "ceedubs"; - githubId = 977929; - name = "Cody Allen"; - }; - centromere = { - email = "nix@centromere.net"; - github = "centromere"; - githubId = 543423; - name = "Alex Wied"; - }; - cfhammill = { - email = "cfhammill@gmail.com"; - github = "cfhammill"; - githubId = 7467038; - name = "Chris Hammill"; - }; - cfouche = { - email = "chaddai.fouche@gmail.com"; - github = "Chaddai"; - githubId = 5771456; - name = "Chaddaï Fouché"; - }; - cfsmp3 = { - email = "carlos@sanz.dev"; - github = "cfsmp3"; - githubId = 5949913; - name = "Carlos Fernandez Sanz"; - }; - cge = { - email = "cevans@evanslabs.org"; - github = "cgevans"; - githubId = 2054509; - name = "Constantine Evans"; - keys = [ - { - fingerprint = "32B1 6EE7 DBA5 16DE 526E 4C5A B67D B1D2 0A93 A9F9"; - } - { - fingerprint = "669C 1D24 5A87 DB34 6BE4 3216 1A1D 58B8 6AE2 AABD"; - } - ]; - }; - chaduffy = { - email = "charles@dyfis.net"; - github = "charles-dyfis-net"; - githubId = 22370; - name = "Charles Duffy"; - }; - changlinli = { - email = "mail@changlinli.com"; - github = "changlinli"; - githubId = 1762540; - name = "Changlin Li"; - }; - chanley = { - email = "charlieshanley@gmail.com"; - github = "charlieshanley"; - githubId = 8228888; - name = "Charlie Hanley"; - }; - chaoflow = { - email = "flo@chaoflow.net"; - github = "chaoflow"; - githubId = 89596; - name = "Florian Friesdorf"; - }; - ChaosAttractor = { - email = "lostattractor@gmail.com"; - github = "LostAttractor"; - githubId = 46527539; - name = "ChaosAttractor"; - }; - charlesbaynham = { - email = "charlesbaynham@gmail.com"; - github = "charlesbaynham"; - githubId = 4397637; - name = "Charles Baynham"; - }; - CharlesHD = { - email = "charleshdespointes@gmail.com"; - github = "CharlesHD"; - githubId = 6608071; - name = "Charles Huyghues-Despointes"; - }; - chekoopa = { - email = "chekoopa@mail.ru"; - github = "chekoopa"; - githubId = 1689801; - name = "Mikhail Chekan"; - }; - ChengCat = { - email = "yu@cheng.cat"; - github = "ChengCat"; - githubId = 33503784; - name = "Yucheng Zhang"; - }; - cheriimoya = { - email = "github@hausch.xyz"; - github = "cheriimoya"; - githubId = 28303440; - name = "Max Hausch"; - }; - chessai = { - email = "chessai1996@gmail.com"; - github = "chessai"; - githubId = 18648043; - name = "Daniel Cartwright"; - }; - Chili-Man = { - email = "dr.elhombrechile@gmail.com"; - name = "Diego Rodriguez"; - github = "Chili-Man"; - githubId = 631802; - keys = [{ - fingerprint = "099E 3F97 FA08 3D47 8C75 EBEC E0EB AD78 F019 0BD9"; - }]; - }; - chiroptical = { - email = "chiroptical@gmail.com"; - github = "chiroptical"; - githubId = 3086255; - name = "Barry Moore II"; - }; - chisui = { - email = "chisui.pd@gmail.com"; - github = "chisui"; - githubId = 4526429; - name = "Philipp Dargel"; - }; - chivay = { - email = "hubert.jasudowicz@gmail.com"; - github = "chivay"; - githubId = 14790226; - name = "Hubert Jasudowicz"; - }; - chkno = { - email = "chuck@intelligence.org"; - github = "chkno"; - githubId = 1118859; - name = "Scott Worley"; - }; - choochootrain = { - email = "hurshal@imap.cc"; - github = "choochootrain"; - githubId = 803961; - name = "Hurshal Patel"; - }; - chpatrick = { - email = "chpatrick@gmail.com"; - github = "chpatrick"; - githubId = 832719; - name = "Patrick Chilton"; - }; - chreekat = { - email = "b@chreekat.net"; - github = "chreekat"; - githubId = 538538; - name = "Bryan Richter"; - }; - chrisjefferson = { - email = "chris@bubblescope.net"; - github = "ChrisJefferson"; - githubId = 811527; - name = "Christopher Jefferson"; - }; - chris-martin = { - email = "ch.martin@gmail.com"; - github = "chris-martin"; - githubId = 399718; - name = "Chris Martin"; - }; - chrispattison = { - email = "chpattison@gmail.com"; - github = "ChrisPattison"; - githubId = 641627; - name = "Chris Pattison"; - }; - chrispickard = { - email = "chrispickard9@gmail.com"; - github = "chrispickard"; - githubId = 1438690; - name = "Chris Pickard"; - }; - chrisrosset = { - email = "chris@rosset.org.uk"; - github = "chrisrosset"; - githubId = 1103294; - name = "Christopher Rosset"; - }; - christianharke = { - email = "christian@harke.ch"; - github = "christianharke"; - githubId = 13007345; - name = "Christian Harke"; - keys = [{ - fingerprint = "4EBB 30F1 E89A 541A A7F2 52BE 830A 9728 6309 66F4"; - }]; - }; - christophcharles = { - github = "christophcharles"; - githubId = 23055925; - name = "Christoph Charles"; - }; - christopherpoole = { - email = "mail@christopherpoole.net"; - github = "christopherpoole"; - githubId = 2245737; - name = "Christopher Mark Poole"; - }; - christoph-heiss = { - email = "christoph@c8h4.io"; - github = "christoph-heiss"; - githubId = 7571069; - name = "Christoph Heiss"; - keys = [{ - fingerprint = "9C56 1D64 30B2 8D6B DCBC 9CEB 73D5 E7FD EE3D E49A"; - }]; - }; - chuahou = { - email = "human+github@chuahou.dev"; - github = "chuahou"; - githubId = 12386805; - name = "Chua Hou"; - }; - chuangzhu = { - name = "Chuang Zhu"; - email = "chuang@melty.land"; - matrix = "@chuangzhu:matrix.org"; - github = "chuangzhu"; - githubId = 31200881; - keys = [{ - fingerprint = "5D03 A5E6 0754 A3E3 CA57 5037 E838 CED8 1CFF D3F9"; - }]; - }; - chvp = { - email = "nixpkgs@cvpetegem.be"; - matrix = "@charlotte:vanpetegem.me"; - github = "chvp"; - githubId = 42220376; - name = "Charlotte Van Petegem"; - }; - ciferkey = { - name = "Matthew Brunelle"; - email = "ciferkey@gmail.com"; - github = "ciferkey"; - githubId = 101422; - }; - cigrainger = { - name = "Christopher Grainger"; - email = "chris@amplified.ai"; - github = "cigrainger"; - githubId = 3984794; - }; - ciil = { - email = "simon@lackerbauer.com"; - github = "ciil"; - githubId = 3956062; - name = "Simon Lackerbauer"; - }; - cimm = { - email = "8k9ft8m5gv@astil.be"; - github = "cimm"; - githubId = 68112; - name = "Simon"; - }; - cirno-999 = { - email = "reverene@protonmail.com"; - github = "cirno-999"; - githubId = 73712874; - name = "cirno-999"; - }; - citadelcore = { - email = "alex@arctarus.co.uk"; - github = "CitadelCore"; - githubId = 5567402; - name = "Alex Zero"; - keys = [{ - fingerprint = "A0AA 4646 B8F6 9D45 4553 5A88 A515 50ED B450 302C"; - }]; - }; - cizra = { - email = "todurov+nix@gmail.com"; - github = "cizra"; - githubId = 2131991; - name = "Elmo Todurov"; - }; - cjab = { - email = "chad+nixpkgs@jablonski.xyz"; - github = "cjab"; - githubId = 136485; - name = "Chad Jablonski"; - }; - ck3d = { - email = "ck3d@gmx.de"; - github = "ck3d"; - githubId = 25088352; - name = "Christian Kögler"; - }; - ckauhaus = { - email = "kc@flyingcircus.io"; - github = "ckauhaus"; - githubId = 1448923; - name = "Christian Kauhaus"; - }; - ckie = { - email = "nixpkgs-0efe364@ckie.dev"; - github = "ckiee"; - githubId = 25263210; - keys = [{ - fingerprint = "539F 0655 4D35 38A5 429A E253 13E7 9449 C052 5215"; - }]; - name = "ckie"; - matrix = "@ckie:ckie.dev"; - }; - cko = { - email = "christine.koppelt@gmail.com"; - github = "cko"; - githubId = 68239; - name = "Christine Koppelt"; - }; - clacke = { - email = "claes.wallin@greatsinodevelopment.com"; - github = "clacke"; - githubId = 199180; - name = "Claes Wallin"; - }; - cleeyv = { - email = "cleeyv@riseup.net"; - github = "cleeyv"; - githubId = 71959829; - name = "Cleeyv"; - }; - clerie = { - email = "nix@clerie.de"; - github = "clerie"; - githubId = 9381848; - name = "clerie"; - }; - cleverca22 = { - email = "cleverca22@gmail.com"; - matrix = "@cleverca22:matrix.org"; - github = "cleverca22"; - githubId = 848609; - name = "Michael Bishop"; - }; - clkamp = { - email = "c@lkamp.de"; - github = "clkamp"; - githubId = 46303707; - name = "Christian Lütke-Stetzkamp"; - }; - cmacrae = { - email = "hi@cmacr.ae"; - github = "cmacrae"; - githubId = 3392199; - name = "Calum MacRae"; - }; - cmars = { - email = "nix@cmars.tech"; - github = "cmars"; - githubId = 23741; - name = "Casey Marshall"; - keys = [{ - fingerprint = "6B78 7E5F B493 FA4F D009 5D10 6DEC 2758 ACD5 A973"; - }]; - }; - cmcdragonkai = { - email = "roger.qiu@matrix.ai"; - github = "CMCDragonkai"; - githubId = 640797; - name = "Roger Qiu"; - }; - cmfwyp = { - email = "cmfwyp@riseup.net"; - github = "cmfwyp"; - githubId = 20808761; - name = "cmfwyp"; - }; - cmm = { - email = "repo@cmm.kakpryg.net"; - github = "cmm"; - githubId = 718298; - name = "Michael Livshin"; - }; - CobaltCause = { - name = "Charles Hall"; - email = "charles@computer.surgery"; - github = "CobaltCause"; - githubId = 7003738; - matrix = "@charles:computer.surgery"; - }; - cobbal = { - email = "andrew.cobb@gmail.com"; - github = "cobbal"; - githubId = 180339; - name = "Andrew Cobb"; - }; - coconnor = { - email = "coreyoconnor@gmail.com"; - github = "coreyoconnor"; - githubId = 34317; - name = "Corey O'Connor"; - }; - CodeLongAndProsper90 = { - github = "CodeLongAndProsper90"; - githubId = 50145141; - email = "jupiter@m.rdis.dev"; - name = "Scott Little"; - }; - codsl = { - email = "codsl@riseup.net"; - github = "codsl"; - githubId = 6402559; - name = "codsl"; - }; - codyopel = { - email = "codyopel@gmail.com"; - github = "codyopel"; - githubId = 5561189; - name = "Cody Opel"; - }; - cofob = { - name = "Egor Ternovoy"; - email = "cofob@riseup.net"; - matrix = "@cofob:matrix.org"; - github = "cofob"; - githubId = 49928332; - keys = [{ - fingerprint = "5F3D 9D3D ECE0 8651 DE14 D29F ACAD 4265 E193 794D"; - }]; - }; - Cogitri = { - email = "oss@cogitri.dev"; - github = "Cogitri"; - githubId = 8766773; - matrix = "@cogitri:cogitri.dev"; - name = "Rasmus Thomsen"; - }; - cohei = { - email = "a.d.xvii.kal.mai@gmail.com"; - github = "cohei"; - githubId = 3477497; - name = "TANIGUCHI Kohei"; - }; - cohencyril = { - email = "cyril.cohen@inria.fr"; - github = "CohenCyril"; - githubId = 298705; - name = "Cyril Cohen"; - }; - colamaroro = { - name = "Corentin Rondier"; - email = "github@rondier.io"; - github = "colamaroro"; - githubId = 12484955; - matrix = "@colamaroro:lovelyrad.io"; - }; - cole-h = { - name = "Cole Helbling"; - email = "cole.e.helbling@outlook.com"; - matrix = "@cole-h:matrix.org"; - github = "cole-h"; - githubId = 28582702; - keys = [{ - fingerprint = "68B8 0D57 B2E5 4AC3 EC1F 49B0 B37E 0F23 7101 6A4C"; - }]; - }; - colemickens = { - email = "cole.mickens@gmail.com"; - matrix = "@colemickens:matrix.org"; - github = "colemickens"; - githubId = 327028; - name = "Cole Mickens"; - }; - colescott = { - email = "colescottsf@gmail.com"; - github = "colescott"; - githubId = 5684605; - name = "Cole Scott"; - }; - colinsane = { - name = "Colin Sane"; - email = "colin@uninsane.org"; - matrix = "@colin:uninsane.org"; - github = "uninsane"; - githubId = 106709944; - }; - collares = { - email = "mauricio@collares.org"; - github = "collares"; - githubId = 244239; - name = "Mauricio Collares"; - }; - commandodev = { - email = "ben@perurbis.com"; - github = "commandodev"; - githubId = 87764; - name = "Ben Ford"; - }; - CompEng0001 = { - email = "sb1501@canterbury.ac.uk"; - github = "CompEng0001"; - githubId = 40290417; - name = "Seb Blair"; - }; - confus = { - email = "con-f-use@gmx.net"; - github = "con-f-use"; - githubId = 11145016; - name = "J.C."; - }; - congee = { - email = "changshengwu@pm.me"; - matrix = "@congeec:matrix.org"; - github = "Congee"; - name = "Changsheng Wu"; - githubId = 2083950; - }; - connorbaker = { - email = "connor.baker@tweag.io"; - matrix = "@connorbaker:matrix.org"; - github = "connorbaker"; - name = "Connor Baker"; - githubId = 3880346; - }; - conradmearns = { - email = "conradmearns+github@pm.me"; - github = "ConradMearns"; - githubId = 5510514; - name = "Conrad Mearns"; - }; - considerate = { - email = "viktor.kronvall@gmail.com"; - github = "considerate"; - githubId = 217918; - name = "Viktor Kronvall"; - }; - contrun = { - email = "uuuuuu@protonmail.com"; - github = "contrun"; - githubId = 32609395; - name = "B YI"; - }; - copumpkin = { - email = "pumpkingod@gmail.com"; - github = "copumpkin"; - githubId = 2623; - name = "Dan Peebles"; - }; - corbanr = { - email = "corban@raunco.co"; - github = "CorbanR"; - githubId = 1918683; - matrix = "@corbansolo:matrix.org"; - name = "Corban Raun"; - keys = [ - { - fingerprint = "6607 0B24 8CE5 64ED 22CE 0950 A697 A56F 1F15 1189"; - } - { - fingerprint = "D8CB 816A B678 A4E6 1EC7 5325 230F 4AC1 53F9 0F29"; - } - ]; - }; - corngood = { - email = "corngood@gmail.com"; - github = "corngood"; - githubId = 3077118; - name = "David McFarland"; - }; - coroa = { - email = "jonas@chaoflow.net"; - github = "coroa"; - githubId = 2552981; - name = "Jonas Hörsch"; - }; - costrouc = { - email = "chris.ostrouchov@gmail.com"; - github = "costrouc"; - githubId = 1740337; - name = "Chris Ostrouchov"; - }; - couchemar = { - email = "couchemar@yandex.ru"; - github = "couchemar"; - githubId = 1573344; - name = "Andrey Pavlov"; - }; - cpages = { - email = "page@ruiec.cat"; - github = "cpages"; - githubId = 411324; - name = "Carles Pagès"; - }; - cpcloud = { - name = "Phillip Cloud"; - github = "cpcloud"; - githubId = 417981; - }; - cpu = { - email = "daniel@binaryparadox.net"; - github = "cpu"; - githubId = 292650; - name = "Daniel McCarney"; - keys = [{ - fingerprint = "8026 D24A A966 BF9C D3CD CB3C 08FB 2BFC 470E 75B4"; - }]; - }; - Crafter = { - email = "crafter@crafter.rocks"; - github = "Craftzman7"; - githubId = 70068692; - name = "Crafter"; - }; - craigem = { - email = "craige@mcwhirter.io"; - github = "craigem"; - githubId = 6470493; - name = "Craige McWhirter"; - }; - cransom = { - email = "cransom@hubns.net"; - github = "cransom"; - githubId = 1957293; - name = "Casey Ransom"; - }; - CrazedProgrammer = { - email = "crazedprogrammer@gmail.com"; - github = "CrazedProgrammer"; - githubId = 12202789; - name = "CrazedProgrammer"; - }; - creator54 = { - email = "hi.creator54@gmail.com"; - github = "Creator54"; - githubId = 34543609; - name = "creator54"; - }; - crinklywrappr = { - email = "crinklywrappr@pm.me"; - name = "Daniel Fitzpatrick"; - github = "crinklywrappr"; - githubId = 56522; - }; - cript0nauta = { - email = "shareman1204@gmail.com"; - github = "cript0nauta"; - githubId = 1222362; - name = "Matías Lang"; - }; - CRTified = { - email = "carl.schneider+nixos@rub.de"; - matrix = "@schnecfk:ruhr-uni-bochum.de"; - github = "CRTified"; - githubId = 2440581; - name = "Carl Richard Theodor Schneider"; - keys = [{ - fingerprint = "2017 E152 BB81 5C16 955C E612 45BC C1E2 709B 1788"; - }]; - }; - cryptix = { - email = "cryptix@riseup.net"; - github = "cryptix"; - githubId = 111202; - name = "Henry Bubert"; - }; - CrystalGamma = { - email = "nixos@crystalgamma.de"; - github = "CrystalGamma"; - githubId = 6297001; - name = "Jona Stubbe"; - }; - csingley = { - email = "csingley@gmail.com"; - github = "csingley"; - githubId = 398996; - name = "Christopher Singley"; - }; - cstrahan = { - email = "charles@cstrahan.com"; - github = "cstrahan"; - githubId = 143982; - name = "Charles Strahan"; - }; - cswank = { - email = "craigswank@gmail.com"; - github = "cswank"; - githubId = 490965; - name = "Craig Swank"; - }; - cust0dian = { - email = "serg@effectful.software"; - github = "cust0dian"; - githubId = 119854490; - name = "Serg Nesterov"; - keys = [{ - fingerprint = "6E7D BA30 DB5D BA60 693C 3BE3 1512 F6EB 84AE CC8C"; - }]; - }; - cwoac = { - email = "oliver@codersoffortune.net"; - github = "cwoac"; - githubId = 1382175; - name = "Oliver Matthews"; - }; - cwyc = { - email = "hello@cwyc.page"; - github = "cwyc"; - githubId = 16950437; - name = "cwyc"; - }; - cynerd = { - name = "Karel Kočí"; - email = "cynerd@email.cz"; - github = "Cynerd"; - githubId = 3811900; - keys = [{ - fingerprint = "2B1F 70F9 5F1B 48DA 2265 A7FA A6BC 8B8C EB31 659B"; - }]; - }; - cyntheticfox = { - email = "cyntheticfox@gh0st.sh"; - github = "cyntheticfox"; - githubId = 17628961; - keys = [{ - fingerprint = "73C1 C5DF 51E7 BB92 85E9 A262 5960 278C E235 F821"; - }]; - matrix = "@houstdav000:gh0st.ems.host"; - name = "Cynthia Fox"; - }; - cyounkins = { - name = "Craig Younkins"; - email = "cyounkins@gmail.com"; - github = "cyounkins"; - githubId = 346185; - }; - cypherpunk2140 = { - email = "stefan.mihaila@pm.me"; - github = "stefan-mihaila"; - githubId = 2217136; - name = "Ștefan D. Mihăilă"; - keys = [ - { - fingerprint = "CBC9 C7CC 51F0 4A61 3901 C723 6E68 A39B F16A 3ECB"; - } - { - fingerprint = "7EAB 1447 5BBA 7DDE 7092 7276 6220 AD78 4622 0A52"; - } - ]; - }; - cyplo = { - email = "nixos@cyplo.dev"; - matrix = "@cyplo:cyplo.dev"; - github = "cyplo"; - githubId = 217899; - name = "Cyryl Płotnicki"; - }; - dadada = { - name = "dadada"; - email = "dadada@dadada.li"; - github = "dadada"; - githubId = 7216772; - keys = [{ - fingerprint = "D68C 8469 5C08 7E0F 733A 28D0 EEB8 D1CE 62C4 DFEA"; - }]; - }; - dalance = { - email = "dalance@gmail.com"; - github = "dalance"; - githubId = 4331004; - name = "Naoya Hatta"; - }; - dalpd = { - email = "denizalpd@ogr.iu.edu.tr"; - github = "dalpd"; - githubId = 16895361; - name = "Deniz Alp Durmaz"; - }; - DAlperin = { - email = "git@dov.dev"; - github = "DAlperin"; - githubId = 16063713; - name = "Dov Alperin"; - keys = [{ - fingerprint = "4EED 5096 B925 86FA 1101 6673 7F2C 07B9 1B52 BB61"; - }]; - }; - DamienCassou = { - email = "damien@cassou.me"; - github = "DamienCassou"; - githubId = 217543; - name = "Damien Cassou"; - }; - dan4ik605743 = { - email = "6057430gu@gmail.com"; - github = "dan4ik605743"; - githubId = 86075850; - name = "Danil Danevich"; - }; - danbst = { - email = "abcz2.uprola@gmail.com"; - github = "danbst"; - githubId = 743057; - name = "Danylo Hlynskyi"; - }; - danc86 = { - name = "Dan Callaghan"; - email = "djc@djc.id.au"; - github = "danc86"; - githubId = 398575; - keys = [{ - fingerprint = "1C56 01F1 D70A B56F EABB 6BC0 26B5 AA2F DAF2 F30A"; - }]; - }; - dancek = { - email = "hannu.hartikainen@gmail.com"; - github = "dancek"; - githubId = 245394; - name = "Hannu Hartikainen"; - }; - dandellion = { - email = "daniel@dodsorf.as"; - matrix = "@dandellion:dodsorf.as"; - github = "dali99"; - githubId = 990767; - name = "Daniel Olsen"; - }; - danderson = { - email = "dave@natulte.net"; - github = "danderson"; - githubId = 1918; - name = "David Anderson"; - }; - daneads = { - email = "me@daneads.com"; - github = "daneads"; - githubId = 24708079; - name = "Dan Eads"; - }; - danielbarter = { - email = "danielbarter@gmail.com"; - github = "danielbarter"; - githubId = 8081722; - name = "Daniel Barter"; - }; - danieldk = { - email = "me@danieldk.eu"; - github = "danieldk"; - githubId = 49398; - name = "Daniël de Kok"; - }; - danielfullmer = { - email = "danielrf12@gmail.com"; - github = "danielfullmer"; - githubId = 1298344; - name = "Daniel Fullmer"; - }; - dansbandit = { - github = "dansbandit"; - githubId = 4530687; - name = "dansbandit"; - }; - danth = { - name = "Daniel Thwaites"; - email = "danthwaites30@btinternet.com"; - matrix = "@danth:danth.me"; - github = "danth"; - githubId = 28959268; - keys = [{ - fingerprint = "4779 D1D5 3C97 2EAE 34A5 ED3D D8AF C4BF 0567 0F9D"; - }]; - }; - darkonion0 = { - name = "Alexandre Peruggia"; - email = "darkgenius1@protonmail.com"; - matrix = "@alexoo:matrix.org"; - github = "DarkOnion0"; - githubId = 68606322; - }; - das-g = { - email = "nixpkgs@raphael.dasgupta.ch"; - github = "das-g"; - githubId = 97746; - name = "Raphael Das Gupta"; - }; - dasisdormax = { - email = "dasisdormax@mailbox.org"; - github = "dasisdormax"; - githubId = 3714905; - keys = [{ - fingerprint = "E59B A198 61B0 A9ED C1FA 3FB2 02BA 0D44 80CA 6C44"; - }]; - name = "Maximilian Wende"; - }; - das_j = { - email = "janne@hess.ooo"; - matrix = "@janne.hess:helsinki-systems.de"; - github = "dasJ"; - githubId = 4971975; - name = "Janne Heß"; - }; - dasj19 = { - email = "daniel@serbanescu.dk"; - github = "dasj19"; - githubId = 7589338; - name = "Daniel Șerbănescu"; - }; - datafoo = { - github = "datafoo"; - githubId = 34766150; - name = "datafoo"; - }; - davegallant = { - name = "Dave Gallant"; - email = "davegallant@gmail.com"; - github = "davegallant"; - githubId = 4519234; - }; - davhau = { - email = "d.hauer.it@gmail.com"; - name = "David Hauer"; - github = "DavHau"; - githubId = 42246742; - }; - david50407 = { - email = "me@davy.tw"; - github = "david50407"; - githubId = 841969; - name = "David Kuo"; - }; - davidak = { - email = "post@davidak.de"; - matrix = "@davidak:matrix.org"; - github = "davidak"; - githubId = 91113; - name = "David Kleuker"; - }; - davidarmstronglewis = { - email = "davidlewis@mac.com"; - github = "davidarmstronglewis"; - githubId = 6754950; - name = "David Armstrong Lewis"; - }; - davidcromp = { - email = "davidcrompton1192@gmail.com"; - github = "CyborgPotato"; - githubId = 10701143; - name = "David Crompton"; - }; - david-hamelin = { - email = "david.hamelin@outlook.fr"; - github = "HamelinDavid"; - githubId = 118536343; - name = "David Hamelin"; - }; - davidrusu = { - email = "davidrusu.me@gmail.com"; - github = "davidrusu"; - githubId = 1832378; - name = "David Rusu"; - }; - david-sawatzke = { - email = "d-nix@sawatzke.dev"; - github = "david-sawatzke"; - githubId = 11035569; - name = "David Sawatzke"; - }; - davidtwco = { - email = "david@davidtw.co"; - github = "davidtwco"; - githubId = 1295100; - name = "David Wood"; - keys = [{ - fingerprint = "5B08 313C 6853 E5BF FA91 A817 0176 0B4F 9F53 F154"; - }]; - }; - davisrichard437 = { - email = "davisrichard437@gmail.com"; - github = "davisrichard437"; - githubId = 85075437; - name = "Richard Davis"; - }; - davorb = { - email = "davor@davor.se"; - github = "davorb"; - githubId = 798427; - name = "Davor Babic"; - }; - davsanchez = { - email = "davidslt+nixpkgs@pm.me"; - github = "DavSanchez"; - githubId = 11422515; - name = "David Sánchez"; - }; - dawidsowa = { - email = "dawid_sowa@posteo.net"; - github = "dawidsowa"; - githubId = 49904992; - name = "Dawid Sowa"; - }; - dbeckwith = { - email = "djbsnx@gmail.com"; - github = "dbeckwith"; - githubId = 1279939; - name = "Daniel Beckwith"; - }; - dbirks = { - email = "david@birks.dev"; - github = "dbirks"; - githubId = 7545665; - name = "David Birks"; - keys = [{ - fingerprint = "B26F 9AD8 DA20 3392 EF87 C61A BB99 9F83 D9A1 9A36"; - }]; - }; - dbohdan = { - email = "dbohdan@dbohdan.com"; - github = "dbohdan"; - githubId = 3179832; - name = "D. Bohdan"; - }; - dbrock = { - email = "daniel@brockman.se"; - github = "dbrock"; - githubId = 14032; - name = "Daniel Brockman"; - }; - ddelabru = { - email = "ddelabru@redhat.com"; - github = "ddelabru"; - githubId = 39909293; - name = "Dominic Delabruere"; - }; - dduan = { - email = "daniel@duan.ca"; - github = "dduan"; - githubId = 75067; - name = "Daniel Duan"; - }; - dearrude = { - name = "Ebrahim Nejati"; - email = "dearrude@tfwno.gf"; - github = "DearRude"; - githubId = 30749142; - keys = [{ - fingerprint = "4E35 F2E5 2132 D654 E815 A672 DB2C BC24 2868 6000"; - }]; - }; - deejayem = { - email = "nixpkgs.bu5hq@simplelogin.com"; - github = "deejayem"; - githubId = 2564003; - name = "David Morgan"; - keys = [{ - fingerprint = "9B43 6B14 77A8 79C2 6CDB 6604 C171 2510 02C2 00F2"; - }]; - }; - deepfire = { - email = "_deepfire@feelingofgreen.ru"; - github = "deepfire"; - githubId = 452652; - name = "Kosyrev Serge"; - }; - DeeUnderscore = { - email = "d.anzorge@gmail.com"; - github = "DeeUnderscore"; - githubId = 156239; - name = "D Anzorge"; - }; - deifactor = { - name = "Ash Zahlen"; - email = "ext0l@riseup.net"; - github = "deifactor"; - githubId = 30192992; - }; - deinferno = { - name = "deinferno"; - github = "deinferno"; - githubId = 14363193; - }; - delan = { - name = "Delan Azabani"; - email = "delan@azabani.com"; - github = "delan"; - githubId = 465303; - }; - delehef = { - name = "Franklin Delehelle"; - email = "nix@odena.eu"; - github = "delehef"; - githubId = 1153808; - }; - deliciouslytyped = { - github = "deliciouslytyped"; - githubId = 47436522; - name = "deliciouslytyped"; - }; - delroth = { - email = "delroth@gmail.com"; - github = "delroth"; - githubId = 202798; - name = "Pierre Bourdon"; - }; - delta = { - email = "d4delta@outlook.fr"; - github = "D4Delta"; - githubId = 12224254; - name = "Delta"; - }; - deltadelta = { - email = "contact@libellules.eu"; - name = "Dara Ly"; - github = "tournemire"; - githubId = 20159432; - }; - deltaevo = { - email = "deltaduartedavid@gmail.com"; - github = "DeltaEvo"; - githubId = 8864716; - name = "Duarte David"; - }; - demin-dmitriy = { - email = "demindf@gmail.com"; - github = "demin-dmitriy"; - githubId = 5503422; - name = "Dmitriy Demin"; - }; - demize = { - email = "johannes@kyriasis.com"; - github = "kyrias"; - githubId = 2285387; - name = "Johannes Löthberg"; - }; - demyanrogozhin = { - email = "demyan.rogozhin@gmail.com"; - github = "demyanrogozhin"; - githubId = 62989; - name = "Demyan Rogozhin"; - }; - dennajort = { - email = "gosselinjb@gmail.com"; - matrix = "@dennajort:matrix.org"; - github = "dennajort"; - githubId = 1536838; - name = "Jean-Baptiste Gosselin"; - }; - derchris = { - email = "derchris@me.com"; - github = "derchrisuk"; - githubId = 706758; - name = "Christian Gerbrandt"; - }; - derdennisop = { - email = "dennish@wuitz.de"; - github = "derdennisop"; - githubId = 52411861; - name = "Dennis"; - }; - derekcollison = { - email = "derek@nats.io"; - github = "derekcollison"; - githubId = 90097; - name = "Derek Collison"; - }; - DerGuteMoritz = { - email = "moritz@twoticketsplease.de"; - github = "DerGuteMoritz"; - githubId = 19733; - name = "Moritz Heidkamp"; - }; - DerickEddington = { - email = "derick.eddington@pm.me"; - github = "DerickEddington"; - githubId = 4731128; - name = "Derick Eddington"; - }; - dermetfan = { - email = "serverkorken@gmail.com"; - github = "dermetfan"; - githubId = 4956158; - name = "Robin Stumm"; - }; - DerTim1 = { - email = "tim.digel@active-group.de"; - github = "DerTim1"; - githubId = 21953890; - name = "Tim Digel"; - }; - desiderius = { - email = "didier@devroye.name"; - github = "desiderius"; - githubId = 1311761; - name = "Didier J. Devroye"; - }; - desttinghim = { - email = "opensource@louispearson.work"; - matrix = "@desttinghim:matrix.org"; - github = "desttinghim"; - githubId = 10042482; - name = "Louis Pearson"; - }; - detegr = { - name = "Antti Keränen"; - email = "detegr@rbx.email"; - github = "Detegr"; - githubId = 724433; - }; - Dettorer = { - name = "Paul Hervot"; - email = "paul.hervot@dettorer.net"; - matrix = "@dettorer:matrix.org"; - github = "Dettorer"; - githubId = 2761682; - }; - developer-guy = { - name = "Batuhan Apaydın"; - email = "developerguyn@gmail.com"; - github = "developer-guy"; - githubId = 16693043; - }; - devhell = { - email = ''"^"@regexmail.net''; - github = "devhell"; - githubId = 896182; - name = "devhell"; - }; - devins2518 = { - email = "drsingh2518@icloud.com"; - github = "devins2518"; - githubId = 17111639; - name = "Devin Singh"; - }; - devusb = { - email = "mhelton@devusb.us"; - github = "devusb"; - githubId = 4951663; - name = "Morgan Helton"; - }; - dezgeg = { - email = "tuomas.tynkkynen@iki.fi"; - github = "dezgeg"; - githubId = 579369; - name = "Tuomas Tynkkynen"; - }; - dfithian = { - email = "daniel.m.fithian@gmail.com"; - name = "Daniel Fithian"; - github = "dfithian"; - githubId = 8409320; - }; - dfordivam = { - email = "dfordivam+nixpkgs@gmail.com"; - github = "dfordivam"; - githubId = 681060; - name = "Divam"; - }; - dfoxfranke = { - email = "dfoxfranke@gmail.com"; - github = "dfoxfranke"; - githubId = 4708206; - name = "Daniel Fox Franke"; - }; - dgliwka = { - email = "dawid.gliwka@gmail.com"; - github = "dgliwka"; - githubId = 33262214; - name = "Dawid Gliwka"; - }; - d-goldin = { - email = "dgoldin+github@protonmail.ch"; - github = "d-goldin"; - githubId = 43349662; - name = "Dima"; - keys = [{ - fingerprint = "1C4E F4FE 7F8E D8B7 1E88 CCDF BAB1 D15F B7B4 D4CE"; - }]; - }; - dgonyeo = { - email = "derek@gonyeo.com"; - github = "dgonyeo"; - githubId = 2439413; - name = "Derek Gonyeo"; - }; - dguenther = { - email = "dguenther9@gmail.com"; - github = "dguenther"; - githubId = 767083; - name = "Derek Guenther"; - }; - dhkl = { - email = "david@davidslab.com"; - github = "dhl"; - githubId = 265220; - name = "David Leung"; - }; - DianaOlympos = { - github = "DianaOlympos"; - githubId = 15774340; - name = "Thomas Depierre"; - }; - diegolelis = { - email = "diego.o.lelis@gmail.com"; - github = "DiegoLelis"; - githubId = 8404455; - name = "Diego Lelis"; - }; - DieracDelta = { - email = "justin@restivo.me"; - github = "DieracDelta"; - githubId = 13730968; - name = "Justin Restivo"; - }; - diffumist = { - email = "git@diffumist.me"; - github = "Diffumist"; - githubId = 32810399; - name = "Diffumist"; - }; - diogox = { - name = "Diogo Xavier"; - github = "diogox"; - githubId = 13244408; - }; - dipinhora = { - email = "dipinhora+github@gmail.com"; - github = "dipinhora"; - githubId = 11946442; - name = "Dipin Hora"; - }; - dirkx = { - email = "dirkx@webweaving.org"; - github = "dirkx"; - githubId = 392583; - name = "Dirk-Willem van Gulik"; - }; - disassembler = { - email = "disasm@gmail.com"; - github = "disassembler"; - githubId = 651205; - name = "Samuel Leathers"; - }; - disserman = { - email = "disserman@gmail.com"; - github = "divi255"; - githubId = 40633781; - name = "Sergei S."; - }; - dit7ya = { - email = "7rat13@gmail.com"; - github = "dit7ya"; - githubId = 14034137; - name = "Mostly Void"; - }; - djacu = { - email = "daniel.n.baker@gmail.com"; - github = "djacu"; - githubId = 7043297; - name = "Daniel Baker"; - }; - djanatyn = { - email = "djanatyn@gmail.com"; - github = "djanatyn"; - githubId = 523628; - name = "Jonathan Strickland"; - }; - Dje4321 = { - email = "dje4321@gmail.com"; - github = "dje4321"; - githubId = 10913120; - name = "Dje4321"; - }; - djwf = { - email = "dave@weller-fahy.com"; - github = "djwf"; - githubId = 73162; - name = "David J. Weller-Fahy"; - }; - dkabot = { - email = "dkabot@dkabot.com"; - github = "dkabot"; - githubId = 1316469; - name = "Naomi Morse"; - }; - dlesl = { - email = "dlesl@dlesl.com"; - github = "dlesl"; - githubId = 28980797; - name = "David Leslie"; - }; - dlip = { - email = "dane@lipscombe.com.au"; - github = "dlip"; - githubId = 283316; - name = "Dane Lipscombe"; - }; - dmalikov = { - email = "malikov.d.y@gmail.com"; - github = "dmalikov"; - githubId = 997543; - name = "Dmitry Malikov"; - }; - DmitryTsygankov = { - email = "dmitry.tsygankov@gmail.com"; - github = "DmitryTsygankov"; - githubId = 425354; - name = "Dmitry Tsygankov"; - }; - dmjio = { - email = "djohnson.m@gmail.com"; - github = "dmjio"; - githubId = 875324; - name = "David Johnson"; - }; - dmrauh = { - email = "dmrauh@posteo.de"; - github = "dmrauh"; - githubId = 37698547; - name = "Dominik Michael Rauh"; - }; - dmvianna = { - email = "dmlvianna@gmail.com"; - github = "dmvianna"; - githubId = 1708810; - name = "Daniel Vianna"; - }; - dnr = { - email = "dnr@dnr.im"; - github = "dnr"; - githubId = 466723; - name = "David Reiss"; - }; - dochang = { - email = "dochang@gmail.com"; - github = "dochang"; - githubId = 129093; - name = "Desmond O. Chang"; - }; - domenkozar = { - email = "domen@dev.si"; - github = "domenkozar"; - githubId = 126339; - name = "Domen Kozar"; - }; - DomesticMoth = { - name = "Andrew"; - email = "silkmoth@protonmail.com"; - github = "DomesticMoth"; - githubId = 91414737; - keys = [{ - fingerprint = "7D6B AE0A A98A FDE9 3396 E721 F87E 15B8 3AA7 3087"; - }]; - }; - dominikh = { - email = "dominik@honnef.co"; - github = "dominikh"; - githubId = 39825; - name = "Dominik Honnef"; - }; - doriath = { - email = "tomasz.zurkowski@gmail.com"; - github = "doriath"; - githubId = 150959; - name = "Tomasz Zurkowski"; - }; - doronbehar = { - email = "me@doronbehar.com"; - github = "doronbehar"; - githubId = 10998835; - name = "Doron Behar"; - }; - dotlambda = { - email = "rschuetz17@gmail.com"; - matrix = "@robert:funklause.de"; - github = "dotlambda"; - githubId = 6806011; - name = "Robert Schütz"; - }; - dottedmag = { - email = "dottedmag@dottedmag.net"; - github = "dottedmag"; - githubId = 16120; - name = "Misha Gusarov"; - keys = [{ - fingerprint = "A8DF 1326 9E5D 9A38 E57C FAC2 9D20 F650 3E33 8888"; - }]; - }; - dpaetzel = { - email = "david.paetzel@posteo.de"; - github = "dpaetzel"; - githubId = 974130; - name = "David Pätzel"; - }; - dpausp = { - email = "dpausp@posteo.de"; - github = "dpausp"; - githubId = 1965950; - name = "Tobias Stenzel"; - keys = [{ - fingerprint = "4749 0887 CF3B 85A1 6355 C671 78C7 DD40 DF23 FB16"; - }]; - }; - DPDmancul = { - name = "Davide Peressoni"; - email = "davide.peressoni@tuta.io"; - matrix = "@dpd-:matrix.org"; - github = "DPDmancul"; - githubId = 3186857; - }; - dpercy = { - email = "dpercy@dpercy.dev"; - github = "dpercy"; - githubId = 349909; - name = "David Percy"; - }; - dpflug = { - email = "david@pflug.email"; - github = "dpflug"; - githubId = 108501; - name = "David Pflug"; - }; - dr460nf1r3 = { - email = "root@dr460nf1r3.org"; - github = "dr460nf1r3"; - githubId = 12834713; - name = "Nico Jensch"; - keys = [{ - fingerprint = "D245 D484 F357 8CB1 7FD6 DA6B 67DB 29BF F3C9 6757"; - }]; - }; - dramaturg = { - email = "seb@ds.ag"; - github = "dramaturg"; - githubId = 472846; - name = "Sebastian Krohn"; - }; - drets = { - email = "dmitryrets@gmail.com"; - github = "drets"; - githubId = 6199462; - name = "Dmytro Rets"; - }; - drewrisinger = { - email = "drisinger+nixpkgs@gmail.com"; - github = "drewrisinger"; - githubId = 10198051; - name = "Drew Risinger"; - }; - dritter = { - email = "dritter03@googlemail.com"; - github = "dritter"; - githubId = 1544760; - name = "Dominik Ritter"; - }; - drperceptron = { - github = "drperceptron"; - githubId = 92106371; - name = "Dr Perceptron"; - keys = [{ - fingerprint = "7E38 89D9 B1A8 B381 C8DE A15F 95EB 6DFF 26D1 CEB0"; - }]; - }; - drupol = { - name = "Pol Dellaiera"; - email = "pol.dellaiera@protonmail.com"; - matrix = "@drupol:matrix.org"; - github = "drupol"; - githubId = 252042; - keys = [{ - fingerprint = "85F3 72DF 4AF3 EF13 ED34 72A3 0AAF 2901 E804 0715"; - }]; - }; - dsalaza4 = { - email = "podany270895@gmail.com"; - github = "dsalaza4"; - githubId = 11205987; - name = "Daniel Salazar"; - }; - dschrempf = { - name = "Dominik Schrempf"; - email = "dominik.schrempf@gmail.com"; - github = "dschrempf"; - githubId = 5596239; - keys = [{ - fingerprint = "62BC E2BD 49DF ECC7 35C7 E153 875F 2BCF 163F 1B29"; - }]; - }; - dsferruzza = { - email = "david.sferruzza@gmail.com"; - github = "dsferruzza"; - githubId = 1931963; - name = "David Sferruzza"; - }; - dsuetin = { - name = "Danil Suetin"; - email = "suetin085@gmail.com"; - matrix = "@dani0854:matrix.org"; - github = "dani0854"; - githubId = 32674935; - keys = [{ - fingerprint = "6CC2 D713 6703 0D86 CA29 C71F 23B5 AA6F A374 F2FE"; - }]; - }; - dsymbol = { - name = "dsymbol"; - github = "dsymbol"; - githubId = 88138099; - }; - dtzWill = { - email = "w@wdtz.org"; - github = "dtzWill"; - githubId = 817330; - name = "Will Dietz"; - keys = [{ - fingerprint = "389A 78CB CD88 5E0C 4701 DEB9 FD42 C7D0 D414 94C8"; - }]; - }; - dukc = { - email = "ajieskola@gmail.com"; - github = "dukc"; - githubId = 24233408; - name = "Ate Eskola"; - }; - dump_stack = { - email = "root@dumpstack.io"; - github = "jollheef"; - githubId = 1749762; - name = "Mikhail Klementev"; - keys = [{ - fingerprint = "5DD7 C6F6 0630 F08E DAE7 4711 1525 585D 1B43 C62A"; - }]; - }; - dwarfmaster = { - email = "nixpkgs@dwarfmaster.net"; - github = "dwarfmaster"; - githubId = 2025623; - name = "Luc Chabassier"; - }; - dxf = { - email = "dingxiangfei2009@gmail.com"; - github = "dingxiangfei2009"; - githubId = 6884440; - name = "Ding Xiang Fei"; - }; - d-xo = { - email = "hi@d-xo.org"; - github = "d-xo"; - githubId = 6689924; - name = "David Terry"; - }; - dylanmtaylor = { - email = "dylan@dylanmtaylor.com"; - github = "dylanmtaylor"; - githubId = 277927; - name = "Dylan Taylor"; - }; - dysinger = { - email = "tim@dysinger.net"; - github = "dysinger"; - githubId = 447; - name = "Tim Dysinger"; - }; - dywedir = { - email = "dywedir@gra.red"; - matrix = "@dywedir:matrix.org"; - github = "dywedir"; - githubId = 399312; - name = "Vladyslav M."; - }; - dzabraev = { - email = "dzabraew@gmail.com"; - github = "dzabraev"; - githubId = 15128988; - name = "Maksim Dzabraev"; - }; - e1mo = { - email = "nixpkgs@e1mo.de"; - matrix = "@e1mo:chaos.jetzt"; - github = "e1mo"; - githubId = 61651268; - name = "Moritz Fromm"; - keys = [{ - fingerprint = "67BE E563 43B6 420D 550E DF2A 6D61 7FD0 A85B AADA"; - }]; - }; - eadwu = { - email = "edmund.wu@protonmail.com"; - github = "eadwu"; - githubId = 22758444; - name = "Edmund Wu"; - }; - ealasu = { - email = "emanuel.alasu@gmail.com"; - github = "ealasu"; - githubId = 1362096; - name = "Emanuel Alasu"; - }; - eamsden = { - email = "edward@blackriversoft.com"; - github = "eamsden"; - githubId = 54573; - name = "Edward Amsden"; - }; - earldouglas = { - email = "james@earldouglas.com"; - github = "earldouglas"; - githubId = 424946; - name = "James Earl Douglas"; - }; - ebbertd = { - email = "daniel@ebbert.nrw"; - github = "ebbertd"; - githubId = 20522234; - name = "Daniel Ebbert"; - keys = [{ - fingerprint = "E765 FCA3 D9BF 7FDB 856E AD73 47BC 1559 27CB B9C7"; - }]; - }; - ebzzry = { - email = "ebzzry@ebzzry.io"; - github = "ebzzry"; - githubId = 7875; - name = "Rommel Martinez"; - }; - edanaher = { - email = "nixos@edanaher.net"; - github = "edanaher"; - githubId = 984691; - name = "Evan Danaher"; - }; - edbentley = { - email = "hello@edbentley.dev"; - github = "edbentley"; - githubId = 15923595; - name = "Ed Bentley"; - }; - edcragg = { - email = "ed.cragg@eipi.xyz"; - github = "nuxeh"; - githubId = 1516017; - name = "Ed Cragg"; - }; - edef = { - email = "edef@edef.eu"; - github = "edef1c"; - githubId = 50854; - name = "edef"; - }; - ederoyd46 = { - email = "matt@ederoyd.co.uk"; - github = "ederoyd46"; - githubId = 119483; - name = "Matthew Brown"; - }; - edlimerkaj = { - name = "Edli Merkaj"; - email = "edli.merkaj@identinet.io"; - github = "edlimerkaj"; - githubId = 71988351; - }; - edrex = { - email = "ericdrex@gmail.com"; - github = "edrex"; - githubId = 14615; - keys = [{ - fingerprint = "AC47 2CCC 9867 4644 A9CF EB28 1C5C 1ED0 9F66 6824"; - }]; - matrix = "@edrex:matrix.org"; - name = "Eric Drechsel"; - }; - eduarrrd = { - email = "e.bachmakov@gmail.com"; - github = "eduarrrd"; - githubId = 1181393; - name = "Eduard Bachmakov"; - }; - edude03 = { - email = "michael@melenion.com"; - github = "edude03"; - githubId = 494483; - name = "Michael Francis"; - }; - edwtjo = { - email = "ed@cflags.cc"; - github = "edwtjo"; - githubId = 54799; - name = "Edward Tjörnhammar"; - }; - eelco = { - email = "edolstra+nixpkgs@gmail.com"; - github = "edolstra"; - githubId = 1148549; - name = "Eelco Dolstra"; - }; - ehegnes = { - email = "eric.hegnes@gmail.com"; - github = "ehegnes"; - githubId = 884970; - name = "Eric Hegnes"; - }; - ehllie = { - email = "me@ehllie.xyz"; - github = "ehllie"; - githubId = 20847625; - name = "Elizabeth Paź"; - }; - ehmry = { - email = "ehmry@posteo.net"; - github = "ehmry"; - githubId = 537775; - name = "Emery Hemingway"; - }; - eigengrau = { - email = "seb@schattenkopie.de"; - name = "Sebastian Reuße"; - github = "eigengrau"; - githubId = 4939947; - }; - eikek = { - email = "eike.kettner@posteo.de"; - github = "eikek"; - githubId = 701128; - name = "Eike Kettner"; - }; - eken = { - email = "edvin.kallstrom@protonmail.com"; - github = "Eken-beep"; - name = "Edvin Källström"; - githubId = 84442052; - }; - ekleog = { - email = "leo@gaspard.io"; - matrix = "@leo:gaspard.ninja"; - github = "Ekleog"; - githubId = 411447; - name = "Leo Gaspard"; - }; - elasticdog = { - email = "aaron@elasticdog.com"; - github = "elasticdog"; - githubId = 4742; - name = "Aaron Bull Schaefer"; - }; - elatov = { - email = "elatov@gmail.com"; - github = "elatov"; - githubId = 7494394; - name = "Karim Elatov"; - }; - eleanor = { - email = "dejan@proteansec.com"; - github = "proteansec"; - githubId = 1753498; - name = "Dejan Lukan"; - }; - electrified = { - email = "ed@maidavale.org"; - github = "electrified"; - githubId = 103082; - name = "Ed Brindley"; - }; - elesiuta = { - email = "elesiuta@gmail.com"; - github = "elesiuta"; - githubId = 8146662; - name = "Eric Lesiuta"; - }; - eliandoran = { - email = "contact@eliandoran.me"; - name = "Elian Doran"; - github = "eliandoran"; - githubId = 21236836; - }; - eliasp = { - email = "mail@eliasprobst.eu"; - matrix = "@eliasp:kde.org"; - github = "eliasp"; - githubId = 48491; - name = "Elias Probst"; - }; - elijahcaine = { - email = "elijahcainemv@gmail.com"; - github = "pop"; - githubId = 1897147; - name = "Elijah Caine"; - }; - Elinvention = { - email = "elia@elinvention.ovh"; - github = "Elinvention"; - githubId = 5737945; - name = "Elia Argentieri"; - }; - elitak = { - email = "elitak@gmail.com"; - github = "elitak"; - githubId = 769073; - name = "Eric Litak"; - }; - elizagamedev = { - email = "eliza@eliza.sh"; - github = "elizagamedev"; - githubId = 4576666; - name = "Eliza Velasquez"; - }; - elkowar = { - email = "thereal.elkowar@gmail.com"; - github = "elkowar"; - githubId = 5300871; - name = "Leon Kowarschick"; - }; - elliot = { - email = "hack00mind@gmail.com"; - github = "Eliot00"; - githubId = 18375468; - name = "Elliot Xu"; - }; - elliottslaughter = { - name = "Elliott Slaughter"; - email = "elliottslaughter@gmail.com"; - github = "elliottslaughter"; - githubId = 3129; - }; - elliottvillars = { - email = "elliottvillars@gmail.com"; - github = "elliottvillars"; - githubId = 48104179; - name = "Elliott Villars"; - }; - ellis = { - email = "nixos@ellisw.net"; - github = "ellis"; - githubId = 97852; - name = "Ellis Whitehead"; - }; - elnudev = { - email = "elnu@elnu.com"; - github = "ElnuDev"; - githubId = 9874955; - name = "Elnu"; - }; - elohmeier = { - email = "elo-nixos@nerdworks.de"; - github = "elohmeier"; - githubId = 2536303; - name = "Enno Lohmeier"; - }; - elvishjerricco = { - email = "elvishjerricco@gmail.com"; - matrix = "@elvishjerricco:matrix.org"; - github = "ElvishJerricco"; - githubId = 1365692; - name = "Will Fancher"; - }; - emantor = { - email = "rouven+nixos@czerwinskis.de"; - github = "Emantor"; - githubId = 934284; - name = "Rouven Czerwinski"; - }; - emattiza = { - email = "nix@mattiza.dev"; - github = "emattiza"; - githubId = 11719476; - name = "Evan Mattiza"; - }; - embr = { - email = "hi@liclac.eu"; - github = "liclac"; - githubId = 428026; - name = "embr"; - }; - emily = { - email = "nixpkgs@emily.moe"; - github = "emilazy"; - githubId = 18535642; - name = "Emily"; - }; - emilytrau = { - name = "Emily Trau"; - email = "nix@angus.ws"; - github = "emilytrau"; - githubId = 13267947; - }; - emmabastas = { - email = "emma.bastas@protonmail.com"; - matrix = "@emmabastas:matrix.org"; - github = "emmabastas"; - githubId = 22533224; - name = "Emma Bastås"; - }; - emmanuelrosa = { - email = "emmanuelrosa@protonmail.com"; - matrix = "@emmanuelrosa:matrix.org"; - github = "emmanuelrosa"; - githubId = 13485450; - name = "Emmanuel Rosa"; - }; - emptyflask = { - email = "jon@emptyflask.dev"; - github = "emptyflask"; - githubId = 28287; - name = "Jon Roberts"; - }; - enderger = { - email = "endergeryt@gmail.com"; - github = "enderger"; - githubId = 36283171; - name = "Daniel"; - }; - endgame = { - email = "jack@jackkelly.name"; - github = "endgame"; - githubId = 231483; - name = "Jack Kelly"; - }; - endocrimes = { - email = "dani@builds.terrible.systems"; - github = "endocrimes"; - githubId = 1330683; - name = "Danielle Lancashire"; - }; - enorris = { - name = "Eric Norris"; - email = "erictnorris@gmail.com"; - github = "ericnorris"; - githubId = 1906605; - }; - Enteee = { - email = "nix@duckpond.ch"; - github = "Enteee"; - githubId = 5493775; - name = "Ente"; - }; - Enzime = { - github = "Enzime"; - githubId = 10492681; - name = "Michael Hoang"; - }; - eonpatapon = { - email = "eon@patapon.info"; - github = "eonpatapon"; - githubId = 418227; - name = "Jean-Philippe Braun"; - }; - eperuffo = { - email = "info@emanueleperuffo.com"; - github = "emanueleperuffo"; - githubId = 5085029; - name = "Emanuele Peruffo"; - }; - equirosa = { - email = "eduardo@eduardoquiros.com"; - github = "equirosa"; - githubId = 39096810; - name = "Eduardo Quiros"; - }; - eqyiel = { - email = "ruben@maher.fyi"; - github = "eqyiel"; - githubId = 3422442; - name = "Ruben Maher"; - }; - eraserhd = { - email = "jason.m.felice@gmail.com"; - github = "eraserhd"; - githubId = 147284; - name = "Jason Felice"; - }; - ercao = { - email = "vip@ercao.cn"; - github = "ercao"; - githubId = 51725284; - name = "ercao"; - keys = [{ - fingerprint = "F3B0 36F7 B0CB 0964 3C12 D3C7 FFAB D125 7ECF 0889"; - }]; - }; - erdnaxe = { - email = "erdnaxe@crans.org"; - github = "erdnaxe"; - githubId = 2663216; - name = "Alexandre Iooss"; - keys = [{ - fingerprint = "2D37 1AD2 7E2B BC77 97E1 B759 6C79 278F 3FCD CC02"; - }]; - }; - ereslibre = { - email = "ereslibre@ereslibre.es"; - matrix = "@ereslibre:matrix.org"; - github = "ereslibre"; - githubId = 8706; - name = "Rafael Fernández López"; - }; - ericbmerritt = { - email = "eric@afiniate.com"; - github = "ericbmerritt"; - githubId = 4828; - name = "Eric Merritt"; - }; - ericdallo = { - email = "ercdll1337@gmail.com"; - github = "ericdallo"; - githubId = 7820865; - name = "Eric Dallo"; - }; - ericsagnes = { - email = "eric.sagnes@gmail.com"; - github = "ericsagnes"; - githubId = 367880; - name = "Eric Sagnes"; - }; - ericson2314 = { - email = "John.Ericson@Obsidian.Systems"; - matrix = "@ericson2314:matrix.org"; - github = "Ericson2314"; - githubId = 1055245; - name = "John Ericson"; - }; - erictapen = { - email = "kerstin@erictapen.name"; - github = "erictapen"; - githubId = 11532355; - name = "Kerstin Humm"; - keys = [{ - fingerprint = "F178 B4B4 6165 6D1B 7C15 B55D 4029 3358 C7B9 326B"; - }]; - }; - erikarvstedt = { - email = "erik.arvstedt@gmail.com"; - matrix = "@erikarvstedt:matrix.org"; - github = "erikarvstedt"; - githubId = 36110478; - name = "Erik Arvstedt"; - }; - erikbackman = { - email = "contact@ebackman.net"; - github = "erikbackman"; - githubId = 46724898; - name = "Erik Backman"; - }; - erikryb = { - email = "erik.rybakken@math.ntnu.no"; - github = "erikryb"; - githubId = 3787281; - name = "Erik Rybakken"; - }; - erin = { - name = "Erin van der Veen"; - email = "erin@erinvanderveen.nl"; - github = "ErinvanderVeen"; - githubId = 10973664; - }; - erosennin = { - email = "ag@sologoc.com"; - github = "erosennin"; - githubId = 1583484; - name = "Andrey Golovizin"; - }; - ersin = { - email = "me@ersinakinci.com"; - github = "ersinakinci"; - githubId = 5427394; - name = "Ersin Akinci"; - }; - ertes = { - email = "esz@posteo.de"; - github = "ertes"; - githubId = 1855930; - name = "Ertugrul Söylemez"; - }; - esclear = { - github = "esclear"; - githubId = 7432848; - name = "Daniel Albert"; - }; - eskytthe = { - email = "eskytthe@gmail.com"; - github = "eskytthe"; - githubId = 2544204; - name = "Erik Skytthe"; - }; - ethancedwards8 = { - email = "ethan@ethancedwards.com"; - github = "ethancedwards8"; - githubId = 60861925; - name = "Ethan Carter Edwards"; - keys = [{ - fingerprint = "0E69 0F46 3457 D812 3387 C978 F93D DAFA 26EF 2458"; - }]; - }; - ethercrow = { - email = "ethercrow@gmail.com"; - github = "ethercrow"; - githubId = 222467; - name = "Dmitry Ivanov"; - }; - ethindp = { - name = "Ethin Probst"; - email = "harlydavidsen@gmail.com"; - matrix = "@ethindp:the-gdn.net"; - github = "ethindp"; - githubId = 8030501; - }; - ethinx = { - email = "eth2net@gmail.com"; - github = "ethinx"; - githubId = 965612; - name = "York Wong"; - }; - Etjean = { - email = "et.jean@outlook.fr"; - github = "Etjean"; - githubId = 32169529; - name = "Etienne Jean"; - }; - ettom = { - email = "ettom22@hotmail.com"; - github = "ettom"; - githubId = 36895504; - name = "ettom"; - }; - etu = { - email = "elis@hirwing.se"; - matrix = "@etu:semi.social"; - github = "etu"; - githubId = 461970; - name = "Elis Hirwing"; - keys = [{ - fingerprint = "67FE 98F2 8C44 CF22 1828 E12F D57E FA62 5C9A 925F"; - }]; - }; - euank = { - email = "euank-nixpkg@euank.com"; - github = "euank"; - githubId = 2147649; - name = "Euan Kemp"; - }; - evalexpr = { - name = "Jonathan Wilkins"; - email = "nixos@wilkins.tech"; - matrix = "@evalexpr:matrix.org"; - github = "evalexpr"; - githubId = 23485511; - keys = [{ - fingerprint = "8129 5B85 9C5A F703 C2F4 1E29 2D1D 402E 1776 3DD6"; - }]; - }; - evan-goode = { - email = "mail@evangoo.de"; - name = "Evan Goode"; - github = "evan-goode"; - githubId = 7495216; - matrix = "@goode:matrix.org"; - }; - evanjs = { - email = "evanjsx@gmail.com"; - github = "evanjs"; - githubId = 1847524; - name = "Evan Stoll"; - }; - evax = { - email = "nixos@evax.fr"; - github = "evax"; - githubId = 599997; - name = "evax"; - }; - evck = { - email = "eric@evenchick.com"; - github = "ericevenchick"; - githubId = 195032; - name = "Eric Evenchick"; - }; - evenbrenden = { - email = "packages@anythingexternal.com"; - github = "evenbrenden"; - githubId = 2512008; - name = "Even Brenden"; - }; - evils = { - email = "evils.devils@protonmail.com"; - matrix = "@evils:nixos.dev"; - github = "evils"; - githubId = 30512529; - name = "Evils"; - }; - ewok = { - email = "ewok@ewok.ru"; - github = "ewok-old"; - githubId = 454695; - name = "Artur Taranchiev"; - }; - exarkun = { - email = "exarkun@twistedmatrix.com"; - github = "exarkun"; - githubId = 254565; - name = "Jean-Paul Calderone"; - }; - exfalso = { - email = "0slemi0@gmail.com"; - github = "exFalso"; - githubId = 1042674; - name = "Andras Slemmer"; - }; - exi = { - email = "nixos@reckling.org"; - github = "exi"; - githubId = 449463; - name = "Reno Reckling"; - }; - exlevan = { - email = "exlevan@gmail.com"; - github = "exlevan"; - githubId = 873530; - name = "Alexey Levan"; - }; - expipiplus1 = { - email = "nix@monoid.al"; - matrix = "@ellie:monoid.al"; - github = "expipiplus1"; - githubId = 857308; - name = "Ellie Hermaszewska"; - keys = [{ - fingerprint = "FC1D 3E4F CBCA 80DF E870 6397 C811 6E3A 0C1C A76A"; - }]; - }; - extends = { - email = "sharosari@gmail.com"; - github = "ImExtends"; - githubId = 55919390; - name = "Vincent VILLIAUMEY"; - }; - eyjhb = { - email = "eyjhbb@gmail.com"; - matrix = "@eyjhb:eyjhb.dk"; - github = "eyJhb"; - githubId = 25955146; - name = "eyJhb"; - }; - f4814n = { - email = "me@f4814n.de"; - github = "f4814"; - githubId = 11909469; - name = "Fabian Geiselhart"; - }; - fab = { - email = "mail@fabian-affolter.ch"; - matrix = "@fabaff:matrix.org"; - name = "Fabian Affolter"; - github = "fabaff"; - githubId = 116184; - keys = [{ - fingerprint = "2F6C 930F D3C4 7E38 6AFA 4EB4 E23C D2DD 36A4 397F"; - }]; - }; - fabiangd = { - email = "fabian.g.droege@gmail.com"; - name = "Fabian G. Dröge"; - github = "FabianGD"; - githubId = 40316600; - }; - fabianhauser = { - email = "fabian.nixos@fh2.ch"; - github = "fabianhauser"; - githubId = 368799; - name = "Fabian Hauser"; - keys = [{ - fingerprint = "50B7 11F4 3DFD 2018 DCE6 E8D0 8A52 A140 BEBF 7D2C"; - }]; - }; - fabianhjr = { - email = "fabianhjr@protonmail.com"; - github = "fabianhjr"; - githubId = 303897; - name = "Fabián Heredia Montiel"; - }; - fadenb = { - email = "tristan.helmich+nixos@gmail.com"; - github = "fadenb"; - githubId = 878822; - name = "Tristan Helmich"; - }; - falsifian = { - email = "james.cook@utoronto.ca"; - github = "falsifian"; - githubId = 225893; - name = "James Cook"; - }; - farcaller = { - name = "Vladimir Pouzanov"; - email = "farcaller@gmail.com"; - github = "farcaller"; - githubId = 693; - }; - fare = { - email = "fahree@gmail.com"; - github = "fare"; - githubId = 8073; - name = "Francois-Rene Rideau"; - }; - farlion = { - email = "florian.peter@gmx.at"; - github = "workflow"; - githubId = 1276854; - name = "Florian Peter"; - }; - farnoy = { - email = "jakub@okonski.org"; - github = "farnoy"; - githubId = 345808; - name = "Jakub Okoński"; - }; - fbeffa = { - email = "beffa@fbengineering.ch"; - github = "fedeinthemix"; - githubId = 7670450; - name = "Federico Beffa"; - }; - fbergroth = { - email = "fbergroth@gmail.com"; - github = "fbergroth"; - githubId = 1211003; - name = "Fredrik Bergroth"; - }; - fbrs = { - email = "yuuki@protonmail.com"; - github = "cideM"; - githubId = 4246921; - name = "Florian Beeres"; - }; - fdns = { - email = "fdns02@gmail.com"; - github = "fdns"; - githubId = 541748; - name = "Felipe Espinoza"; - }; - federicoschonborn = { - name = "Federico Damián Schonborn"; - email = "fdschonborn@gmail.com"; - github = "FedericoSchonborn"; - githubId = 62166915; - matrix = "@FedericoDSchonborn:matrix.org"; - keys = [ - { fingerprint = "517A 8A6A 09CA A11C 9667 CEE3 193F 70F1 5C9A B0A0"; } - ]; - }; - fedx-sudo = { - email = "fedx-sudo@pm.me"; - github = "FedX-sudo"; - githubId = 66258975; - name = "Fedx sudo"; - matrix = "fedx:matrix.org"; - }; - fee1-dead = { - email = "ent3rm4n@gmail.com"; - github = "fee1-dead"; - githubId = 43851243; - name = "Deadbeef"; - }; - fehnomenal = { - email = "fehnomenal@fehn.systems"; - github = "fehnomenal"; - githubId = 9959940; - name = "Andreas Fehn"; - }; - felipeqq2 = { - name = "Felipe Silva"; - email = "nixpkgs@felipeqq2.rocks"; - github = "felipeqq2"; - githubId = 71830138; - keys = [{ fingerprint = "7391 BF2D A2C3 B2C9 BE25 ACA9 C7A7 4616 F302 5DF4"; }]; - matrix = "@felipeqq2:pub.solar"; - }; - felixalbrigtsen = { - email = "felixalbrigtsen@gmail.com"; - github = "felixalbrigtsen"; - githubId = 64613093; - name = "Felix Albrigtsen"; - matrix = "@felixalb:pvv.ntnu.no"; - }; - felixscheinost = { - name = "Felix Scheinost"; - email = "felix.scheinost@posteo.de"; - github = "felixscheinost"; - githubId = 31761492; - }; - felixsinger = { - email = "felixsinger@posteo.net"; - github = "felixsinger"; - githubId = 628359; - name = "Felix Singer"; - }; - felschr = { - email = "dev@felschr.com"; - matrix = "@felschr:matrix.org"; - github = "felschr"; - githubId = 3314323; - name = "Felix Schröter"; - keys = [ - { - # historical - fingerprint = "6AB3 7A28 5420 9A41 82D9 0068 910A CB9F 6BD2 6F58"; - } - { - fingerprint = "7E08 6842 0934 AA1D 6821 1F2A 671E 39E6 744C 807D"; - } - ]; - }; - ffinkdevs = { - email = "fink@h0st.space"; - github = "ffinkdevs"; - githubId = 45924649; - name = "Fabian Fink"; - }; - fgaz = { - email = "fgaz@fgaz.me"; - matrix = "@fgaz:matrix.org"; - github = "fgaz"; - githubId = 8182846; - name = "Francesco Gazzetta"; - }; - figsoda = { - email = "figsoda@pm.me"; - matrix = "@figsoda:matrix.org"; - github = "figsoda"; - githubId = 40620903; - name = "figsoda"; - }; - fionera = { - email = "nix@fionera.de"; - github = "fionera"; - githubId = 5741401; - name = "Tim Windelschmidt"; - }; - firefly-cpp = { - email = "iztok@iztok-jr-fister.eu"; - github = "firefly-cpp"; - githubId = 1633361; - name = "Iztok Fister Jr."; - }; - FireyFly = { - email = "nix@firefly.nu"; - github = "FireyFly"; - githubId = 415760; - name = "Jonas Höglund"; - }; - fishi0x01 = { - email = "fishi0x01@gmail.com"; - github = "fishi0x01"; - githubId = 10799507; - name = "Karl Fischer"; - }; - fitzgibbon = { - name = "Niall FitzGibbon"; - email = "fitzgibbon.niall@gmail.com"; - github = "fitzgibbon"; - githubId = 617048; - }; - fkautz = { - name = "Frederick F. Kautz IV"; - email = "fkautz@alumni.cmu.edu"; - github = "fkautz"; - githubId = 135706; - }; - FlafyDev = { - name = "Flafy Arazi"; - email = "flafyarazi@gmail.com"; - github = "FlafyDev"; - githubId = 44374434; - }; - Flakebi = { - email = "flakebi@t-online.de"; - github = "Flakebi"; - githubId = 6499211; - name = "Sebastian Neubauer"; - keys = [{ - fingerprint = "2F93 661D AC17 EA98 A104 F780 ECC7 55EE 583C 1672"; - }]; - }; - fleaz = { - email = "mail@felixbreidenstein.de"; - matrix = "@fleaz:rainbownerds.de"; - github = "fleaz"; - githubId = 2489598; - name = "Felix Breidenstein"; - }; - flexagoon = { - email = "flexagoon@pm.me"; - github = "flexagoon"; - githubId = 66178592; - name = "Pavel Zolotarevskiy"; - }; - flexiondotorg = { - name = "Martin Wimpress"; - email = "martin@wimpress.org"; - matrix = "@wimpress:matrix.org"; - github = "flexiondotorg"; - githubId = 304639; - }; - fliegendewurst = { - email = "arne.keller@posteo.de"; - github = "FliegendeWurst"; - githubId = 12560461; - name = "Arne Keller"; - }; - flokli = { - email = "flokli@flokli.de"; - github = "flokli"; - githubId = 183879; - name = "Florian Klink"; - }; - florentc = { - github = "florentc"; - githubId = 1149048; - name = "Florent Ch."; - }; - FlorianFranzen = { - email = "Florian.Franzen@gmail.com"; - github = "FlorianFranzen"; - githubId = 781077; - name = "Florian Franzen"; - }; - florianjacob = { - email = "projects+nixos@florianjacob.de"; - github = "florianjacob"; - githubId = 1109959; - name = "Florian Jacob"; - }; - flosse = { - email = "mail@markus-kohlhase.de"; - github = "flosse"; - githubId = 276043; - name = "Markus Kohlhase"; - }; - fluffynukeit = { - email = "dan@fluffynukeit.com"; - github = "fluffynukeit"; - githubId = 844574; - name = "Daniel Austin"; - }; - flyfloh = { - email = "nix@halbmastwurf.de"; - github = "flyfloh"; - githubId = 74379; - name = "Florian Pester"; - }; - fmoda3 = { - email = "fmoda3@mac.com"; - github = "fmoda3"; - githubId = 1746471; - name = "Frank Moda III"; - }; - fmthoma = { - email = "f.m.thoma@googlemail.com"; - github = "fmthoma"; - githubId = 5918766; - name = "Franz Thoma"; - }; - foo-dogsquared = { - email = "foo.dogsquared@gmail.com"; - github = "foo-dogsquared"; - githubId = 34962634; - name = "Gabriel Arazas"; - }; - fooker = { - email = "fooker@lab.sh"; - github = "fooker"; - githubId = 405105; - name = "Dustin Frisch"; - }; - foolnotion = { - email = "bogdan.burlacu@pm.me"; - github = "foolnotion"; - githubId = 844222; - name = "Bogdan Burlacu"; - keys = [{ - fingerprint = "B722 6464 838F 8BDB 2BEA C8C8 5B0E FDDF BA81 6105"; - }]; - }; - forkk = { - email = "forkk@forkk.net"; - github = "Forkk"; - githubId = 1300078; - name = "Andrew Okin"; - }; - fornever = { - email = "friedrich@fornever.me"; - github = "ForNeVeR"; - githubId = 92793; - name = "Friedrich von Never"; - }; - fortuneteller2k = { - email = "lythe1107@gmail.com"; - matrix = "@fortuneteller2k:matrix.org"; - github = "fortuneteller2k"; - githubId = 20619776; - name = "fortuneteller2k"; - }; - fpletz = { - email = "fpletz@fnordicwalking.de"; - github = "fpletz"; - githubId = 114159; - name = "Franz Pletz"; - keys = [{ - fingerprint = "8A39 615D CE78 AF08 2E23 F303 846F DED7 7926 17B4"; - }]; - }; - fps = { - email = "mista.tapas@gmx.net"; - github = "fps"; - githubId = 84968; - name = "Florian Paul Schmidt"; - }; - fragamus = { - email = "innovative.engineer@gmail.com"; - github = "fragamus"; - githubId = 119691; - name = "Michael Gough"; - }; - franzmondlichtmann = { - name = "Franz Schroepf"; - email = "franz-schroepf@t-online.de"; - github = "franzmondlichtmann"; - githubId = 105480088; - }; - freax13 = { - email = "erbse.13@gmx.de"; - github = "Freax13"; - githubId = 14952658; - name = "Tom Dohrmann"; - }; - fredeb = { - email = "im@fredeb.dev"; - github = "FredeEB"; - githubId = 7551358; - name = "Frede Emil"; - }; - freezeboy = { - github = "freezeboy"; - githubId = 13279982; - name = "freezeboy"; - }; - Fresheyeball = { - email = "fresheyeball@gmail.com"; - github = "Fresheyeball"; - githubId = 609279; - name = "Isaac Shapira"; - }; - fridh = { - email = "fridh@fridh.nl"; - github = "FRidh"; - githubId = 2129135; - name = "Frederik Rietdijk"; - }; - friedelino = { - email = "friede.mann@posteo.de"; - github = "friedelino"; - githubId = 46672819; - name = "Frido Friedemann"; - }; - frlan = { - email = "frank@frank.uvena.de"; - github = "frlan"; - githubId = 1010248; - name = "Frank Lanitz"; - }; - frogamic = { - email = "frogamic@protonmail.com"; - github = "frogamic"; - githubId = 10263813; - name = "Dominic Shelton"; - }; - frontsideair = { - email = "photonia@gmail.com"; - github = "frontsideair"; - githubId = 868283; - name = "Fatih Altinok"; - }; - fro_ozen = { - email = "fro_ozen@gmx.de"; - github = "froozen"; - githubId = 1943632; - name = "fro_ozen"; - }; - Frostman = { - email = "me@slukjanov.name"; - github = "Frostman"; - githubId = 134872; - name = "Sergei Lukianov"; - }; - fstamour = { - email = "fr.st-amour@gmail.com"; - github = "fstamour"; - githubId = 2881922; - name = "Francis St-Amour"; - }; - f--t = { - email = "git@f-t.me"; - github = "f--t"; - githubId = 2817965; - name = "f--t"; - }; - ftrvxmtrx = { - email = "ftrvxmtrx@gmail.com"; - github = "ftrvxmtrx"; - githubId = 248148; - name = "Sigrid Solveig Haflínudóttir"; - }; - fuerbringer = { - email = "severin@fuerbringer.info"; - github = "fuerbringer"; - githubId = 10528737; - name = "Severin Fürbringer"; - }; - fufexan = { - email = "fufexan@protonmail.com"; - github = "fufexan"; - githubId = 36706276; - name = "Fufezan Mihai"; - }; - fugi = { - email = "me@fugi.dev"; - github = "FugiMuffi"; - githubId = 21362942; - name = "Fugi"; - }; - fusion809 = { - email = "brentonhorne77@gmail.com"; - github = "fusion809"; - githubId = 4717341; - name = "Brenton Horne"; - }; - fuuzetsu = { - email = "fuuzetsu@fuuzetsu.co.uk"; - github = "Fuuzetsu"; - githubId = 893115; - name = "Mateusz Kowalczyk"; - }; - fuzen = { - email = "me@fuzen.cafe"; - github = "Fuzen-py"; - githubId = 17859309; - name = "Fuzen"; - }; - fxfactorial = { - email = "edgar.factorial@gmail.com"; - github = "fxfactorial"; - githubId = 3036816; - name = "Edgar Aroutiounian"; - }; - fxttr = { - name = "Florian Büstgens"; - email = "fb@fx-ttr.de"; - github = "fxttr"; - githubId = 16306293; - }; - fzakaria = { - name = "Farid Zakaria"; - email = "farid.m.zakaria@gmail.com"; - matrix = "@fzakaria:matrix.org"; - github = "fzakaria"; - githubId = 605070; - }; - gabesoft = { - email = "gabesoft@gmail.com"; - github = "gabesoft"; - githubId = 606000; - name = "Gabriel Adomnicai"; - }; - Gabriel439 = { - email = "Gabriel439@gmail.com"; - github = "Gabriella439"; - githubId = 1313787; - name = "Gabriel Gonzalez"; - }; - GabrielDougherty = { - email = "contact@gabrieldougherty.com"; - github = "GabrielDougherty"; - githubId = 10541219; - name = "Gabriel Dougherty"; - }; - gador = { - email = "florian.brandes@posteo.de"; - github = "gador"; - githubId = 1883533; - name = "Florian Brandes"; - keys = [{ - fingerprint = "0200 3EF8 8D2B CF2D 8F00 FFDC BBB3 E40E 5379 7FD9"; - }]; - }; - GaetanLepage = { - email = "gaetan@glepage.com"; - github = "GaetanLepage"; - githubId = 33058747; - name = "Gaetan Lepage"; - }; - galagora = { - email = "lightningstrikeiv@gmail.com"; - github = "Galagora"; - githubId = 45048741; - name = "Alwanga Oyango"; - }; - gal_bolle = { - email = "florent.becker@ens-lyon.org"; - github = "FlorentBecker"; - githubId = 7047019; - name = "Florent Becker"; - }; - gamb = { - email = "adam.gamble@pm.me"; - github = "gamb"; - githubId = 293586; - name = "Adam Gamble"; - }; - garaiza-93 = { - email = "araizagustavo93@gmail.com"; - github = "garaiza-93"; - githubId = 57430880; - name = "Gustavo Araiza"; - }; - garbas = { - email = "rok@garbas.si"; - github = "garbas"; - githubId = 20208; - name = "Rok Garbas"; - }; - gardspirito = { - name = "gardspirito"; - email = "nyxoroso@gmail.com"; - github = "gardspirito"; - githubId = 29687558; - }; - garrison = { - email = "jim@garrison.cc"; - github = "garrison"; - githubId = 91987; - name = "Jim Garrison"; - }; - gavin = { - email = "gavin.rogers@holo.host"; - github = "gavinrogers"; - githubId = 2430469; - name = "Gavin Rogers"; - }; - gaykitty = { - github = "gaykitty"; - githubId = 126119280; - name = "Kitty Pride"; - }; - gazally = { - email = "gazally@runbox.com"; - github = "gazally"; - githubId = 16470252; - name = "Gemini Lasswell"; - }; - gbpdt = { - email = "nix@pdtpartners.com"; - github = "gbpdt"; - githubId = 25106405; - name = "Graham Bennett"; - }; - gbtb = { - email = "goodbetterthebeast3@gmail.com"; - github = "gbtb"; - githubId = 37017396; - name = "gbtb"; - }; - gdamjan = { - email = "gdamjan@gmail.com"; - matrix = "@gdamjan:spodeli.org"; - github = "gdamjan"; - githubId = 81654; - name = "Damjan Georgievski"; - }; - gdinh = { - email = "nix@contact.dinh.ai"; - github = "gdinh"; - githubId = 34658064; - name = "Grace Dinh"; - }; - gebner = { - email = "gebner@gebner.org"; - github = "gebner"; - githubId = 313929; - name = "Gabriel Ebner"; - }; - genericnerdyusername = { - name = "GenericNerdyUsername"; - email = "genericnerdyusername@proton.me"; - github = "GenericNerdyUsername"; - githubId = 111183546; - keys = [{ - fingerprint = "58CE D4BE 6B10 149E DA80 A990 2F48 6356 A4CB 30F3"; - }]; - }; - genofire = { - name = "genofire"; - email = "geno+dev@fireorbit.de"; - github = "genofire"; - githubId = 6905586; - keys = [{ - fingerprint = "386E D1BF 848A BB4A 6B4A 3C45 FC83 907C 125B C2BC"; - }]; - }; - georgesalkhouri = { - name = "Georges Alkhouri"; - email = "incense.stitch_0w@icloud.com"; - github = "GeorgesAlkhouri"; - githubId = 6077574; - keys = [{ - fingerprint = "1608 9E8D 7C59 54F2 6A7A 7BD0 8BD2 09DC C54F D339"; - }]; - }; - georgewhewell = { - email = "georgerw@gmail.com"; - github = "georgewhewell"; - githubId = 1176131; - name = "George Whewell"; - }; - georgyo = { - email = "george@shamm.as"; - github = "georgyo"; - githubId = 19374; - name = "George Shammas"; - keys = [{ - fingerprint = "D0CF 440A A703 E0F9 73CB A078 82BB 70D5 41AE 2DB4"; - }]; - }; - geri1701 = { - email = "geri@sdf.org"; - github = "geri1701"; - githubId = 67984144; - name = "Gerhard Schwanzer"; - }; - gerschtli = { - email = "tobias.happ@gmx.de"; - github = "Gerschtli"; - githubId = 10353047; - name = "Tobias Happ"; - }; - gfrascadorio = { - email = "gfrascadorio@tutanota.com"; - github = "gfrascadorio"; - githubId = 37602871; - name = "Galois"; - }; - ggpeti = { - email = "ggpeti@gmail.com"; - matrix = "@ggpeti:ggpeti.com"; - github = "ggPeti"; - githubId = 3217744; - name = "Peter Ferenczy"; - }; - ggwpaiushtha = { - name = "Ivan"; - email = "ggwpaiushtha@gmail.com"; - github = "GGwpAiushtha"; - githubId = 6987136; - keys = [{ - fingerprint = "2C6D 37D4 6AA1 DCDA BE8D F346 43E2 CF4C 01B9 4940"; - }]; - }; - ghostbuster91 = { - name = "Kasper Kondzielski"; - email = "kghost0@gmail.com"; - github = "ghostbuster91"; - githubId = 5662622; - }; - ghuntley = { - email = "ghuntley@ghuntley.com"; - github = "ghuntley"; - githubId = 127353; - name = "Geoffrey Huntley"; - }; - gila = { - email = "jeffry.molanus@gmail.com"; - github = "gila"; - githubId = 15957973; - name = "Jeffry Molanus"; - }; - gilice = { - email = "gilice@proton.me"; - github = "gilice"; - githubId = 104317939; - name = "gilice"; - }; - gilligan = { - email = "tobias.pflug@gmail.com"; - github = "gilligan"; - githubId = 27668; - name = "Tobias Pflug"; - }; - gin66 = { - email = "jochen@kiemes.de"; - github = "gin66"; - githubId = 5549373; - name = "Jochen Kiemes"; - }; - giogadi = { - email = "lgtorres42@gmail.com"; - github = "giogadi"; - githubId = 1713676; - name = "Luis G. Torres"; - }; - GKasparov = { - email = "mizozahr@gmail.com"; - github = "GKasparov"; - githubId = 60962839; - name = "Mazen Zahr"; - }; - gkleen = { - name = "Gregor Kleen"; - email = "xpnfr@bouncy.email"; - github = "gkleen"; - githubId = 20089782; - }; - gleber = { - email = "gleber.p@gmail.com"; - github = "gleber"; - githubId = 33185; - name = "Gleb Peregud"; - }; - glenns = { - email = "glenn.searby@gmail.com"; - github = "GlennS"; - githubId = 615606; - name = "Glenn Searby"; - }; - glittershark = { - name = "Griffin Smith"; - email = "root@gws.fyi"; - github = "glittershark"; - githubId = 1481027; - keys = [{ - fingerprint = "0F11 A989 879E 8BBB FDC1 E236 44EF 5B5E 861C 09A7"; - }]; - }; - gloaming = { - email = "ch9871@gmail.com"; - github = "gloaming"; - githubId = 10156748; - name = "Craig Hall"; - }; - globin = { - email = "mail@glob.in"; - github = "globin"; - githubId = 1447245; - name = "Robin Gloster"; - }; - gnxlxnxx = { - email = "gnxlxnxx@web.de"; - github = "gnxlxnxx"; - githubId = 25820499; - name = "Roman Kretschmer"; - }; - goertzenator = { - email = "daniel.goertzen@gmail.com"; - github = "goertzenator"; - githubId = 605072; - name = "Daniel Goertzen"; - }; - goibhniu = { - email = "cillian.deroiste@gmail.com"; - github = "cillianderoiste"; - githubId = 643494; - name = "Cillian de Róiste"; - }; - GoldsteinE = { - email = "root@goldstein.rs"; - github = "GoldsteinE"; - githubId = 12019211; - name = "Maximilian Siling"; - keys = [{ - fingerprint = "0BAF 2D87 CB43 746F 6237 2D78 DE60 31AB A0BB 269A"; - }]; - }; - Gonzih = { - email = "gonzih@gmail.com"; - github = "Gonzih"; - githubId = 266275; - name = "Max Gonzih"; - }; - goodrone = { - email = "goodrone@gmail.com"; - github = "goodrone"; - githubId = 1621335; - name = "Andrew Trachenko"; - }; - gordias = { - name = "Gordias"; - email = "gordias@disroot.org"; - github = "gordiasdot"; - githubId = 94724133; - keys = [{ - fingerprint = "C006 B8A0 0618 F3B6 E0E4 2ECD 5D47 2848 30FA A4FA"; - }]; - }; - gotcha = { - email = "gotcha@bubblenet.be"; - github = "gotcha"; - githubId = 105204; - name = "Godefroid Chapelle"; - }; - govanify = { - name = "Gauvain 'GovanifY' Roussel-Tarbouriech"; - email = "gauvain@govanify.com"; - github = "GovanifY"; - githubId = 6375438; - keys = [{ - fingerprint = "5214 2D39 A7CE F8FA 872B CA7F DE62 E1E2 A614 5556"; - }]; - }; - gp2112 = { - email = "me@guip.dev"; - github = "gp2112"; - githubId = 26512375; - name = "Guilherme Paixão"; - keys = [{ - fingerprint = "4382 7E28 86E5 C34F 38D5 7753 8C81 4D62 5FBD 99D1"; - }]; - }; - gpanders = { - name = "Gregory Anders"; - email = "greg@gpanders.com"; - github = "gpanders"; - githubId = 8965202; - keys = [{ - fingerprint = "B9D5 0EDF E95E ECD0 C135 00A9 56E9 3C2F B6B0 8BDB"; - }]; - }; - gpl = { - email = "nixos-6c64ce18-bbbc-414f-8dcb-f9b6b47fe2bc@isopleth.org"; - github = "gpl"; - githubId = 39648069; - name = "isogram"; - }; - gpyh = { - email = "yacine.hmito@gmail.com"; - github = "yacinehmito"; - githubId = 6893840; - name = "Yacine Hmito"; - }; - graham33 = { - email = "graham@grahambennett.org"; - github = "graham33"; - githubId = 10908649; - name = "Graham Bennett"; - }; - grahamc = { - email = "graham@grahamc.com"; - github = "grahamc"; - githubId = 76716; - name = "Graham Christensen"; - }; - gravndal = { - email = "gaute.ravndal+nixos@gmail.com"; - github = "gravndal"; - githubId = 4656860; - name = "Gaute Ravndal"; - }; - graysonhead = { - email = "grayson@graysonhead.net"; - github = "graysonhead"; - githubId = 6179496; - name = "Grayson Head"; - }; - grburst = { - email = "GRBurst@protonmail.com"; - github = "GRBurst"; - githubId = 4647221; - name = "GRBurst"; - keys = [{ - fingerprint = "7FC7 98AB 390E 1646 ED4D 8F1F 797F 6238 68CD 00C2"; - }]; - }; - greizgh = { - email = "greizgh@ephax.org"; - github = "greizgh"; - githubId = 1313624; - name = "greizgh"; - }; - greydot = { - email = "lanablack@amok.cc"; - github = "greydot"; - githubId = 7385287; - name = "Lana Black"; - }; - gridaphobe = { - email = "eric@seidel.io"; - github = "gridaphobe"; - githubId = 201997; - name = "Eric Seidel"; - }; - grindhold = { - name = "grindhold"; - email = "grindhold+nix@skarphed.org"; - github = "grindhold"; - githubId = 2592640; - }; - grnnja = { - email = "grnnja@gmail.com"; - github = "grnnja"; - githubId = 31556469; - name = "Prem Netsuwan"; - }; - groodt = { - email = "groodt@gmail.com"; - github = "groodt"; - githubId = 343415; - name = "Greg Roodt"; - }; - gruve-p = { - email = "groestlcoin@gmail.com"; - github = "gruve-p"; - githubId = 11212268; - name = "gruve-p"; - }; - gschwartz = { - email = "gsch@pennmedicine.upenn.edu"; - github = "GregorySchwartz"; - githubId = 2490088; - name = "Gregory Schwartz"; - }; - gspia = { - email = "iahogsp@gmail.com"; - github = "gspia"; - githubId = 3320792; - name = "gspia"; - }; - gtrunsec = { - email = "gtrunsec@hardenedlinux.org"; - github = "GTrunSec"; - githubId = 21156405; - name = "GuangTao Zhang"; - }; - guibert = { - email = "david.guibert@gmail.com"; - github = "dguibert"; - githubId = 1178864; - name = "David Guibert"; - }; - guibou = { - email = "guillaum.bouchard@gmail.com"; - github = "guibou"; - githubId = 9705357; - name = "Guillaume Bouchard"; - }; - GuillaumeDesforges = { - email = "aceus02@gmail.com"; - github = "GuillaumeDesforges"; - githubId = 1882000; - name = "Guillaume Desforges"; - }; - guillaumekoenig = { - email = "guillaume.edward.koenig@gmail.com"; - github = "guillaumekoenig"; - githubId = 10654650; - name = "Guillaume Koenig"; - }; - guserav = { - github = "guserav"; - githubId = 28863828; - name = "guserav"; - }; - guyonvarch = { - email = "joris@guyonvarch.me"; - github = "guyonvarch"; - githubId = 6768842; - name = "Joris Guyonvarch"; - }; - gvolpe = { - email = "volpegabriel@gmail.com"; - github = "gvolpe"; - githubId = 443978; - name = "Gabriel Volpe"; - }; - gytis-ivaskevicius = { - name = "Gytis Ivaskevicius"; - email = "me@gytis.io"; - matrix = "@gytis-ivaskevicius:matrix.org"; - github = "gytis-ivaskevicius"; - githubId = 23264966; - }; - h7x4 = { - name = "h7x4"; - email = "h7x4@nani.wtf"; - matrix = "@h7x4:nani.wtf"; - github = "h7x4"; - githubId = 14929991; - keys = [{ - fingerprint = "F7D3 7890 228A 9074 40E1 FD48 46B9 228E 814A 2AAC"; - }]; - }; - hacker1024 = { - name = "hacker1024"; - email = "hacker1024@users.sourceforge.net"; - github = "hacker1024"; - githubId = 20849728; - }; - hagl = { - email = "harald@glie.be"; - github = "hagl"; - githubId = 1162118; - name = "Harald Gliebe"; - }; - hakuch = { - email = "hakuch@gmail.com"; - github = "hakuch"; - githubId = 1498782; - name = "Jesse Haber-Kucharsky"; - }; - hamburger1984 = { - email = "hamburger1984@gmail.com"; - github = "hamburger1984"; - githubId = 438976; - name = "Andreas Krohn"; - }; - hamhut1066 = { - email = "github@hamhut1066.com"; - github = "moredhel"; - githubId = 1742172; - name = "Hamish Hutchings"; - }; - hanemile = { - email = "mail@emile.space"; - github = "HanEmile"; - githubId = 22756350; - name = "Emile Hansmaennel"; - }; - hansjoergschurr = { - email = "commits@schurr.at"; - github = "hansjoergschurr"; - githubId = 9850776; - name = "Hans-Jörg Schurr"; - }; - HaoZeke = { - email = "r95g10@gmail.com"; - github = "HaoZeke"; - githubId = 4336207; - name = "Rohit Goswami"; - keys = [{ - fingerprint = "74B1 F67D 8E43 A94A 7554 0768 9CCC E364 02CB 49A6"; - }]; - }; - happyalu = { - email = "alok@parlikar.com"; - github = "happyalu"; - githubId = 231523; - name = "Alok Parlikar"; - }; - happy-river = { - email = "happyriver93@runbox.com"; - github = "happy-river"; - githubId = 54728477; - name = "Happy River"; - }; - happysalada = { - email = "raphael@megzari.com"; - matrix = "@happysalada:matrix.org"; - github = "happysalada"; - githubId = 5317234; - name = "Raphael Megzari"; - }; - hardselius = { - email = "martin@hardselius.dev"; - github = "hardselius"; - githubId = 1422583; - name = "Martin Hardselius"; - keys = [{ - fingerprint = "3F35 E4CA CBF4 2DE1 2E90 53E5 03A6 E6F7 8693 6619"; - }]; - }; - harrisonthorne = { - email = "harrisonthorne@proton.me"; - github = "muni-corn"; - githubId = 33523827; - name = "Harrison Thorne"; - }; - harvidsen = { - email = "harvidsen@gmail.com"; - github = "harvidsen"; - githubId = 62279738; - name = "Håkon Arvidsen"; - }; - haslersn = { - email = "haslersn@fius.informatik.uni-stuttgart.de"; - github = "haslersn"; - githubId = 33969028; - name = "Sebastian Hasler"; - }; - havvy = { - email = "ryan.havvy@gmail.com"; - github = "Havvy"; - githubId = 731722; - name = "Ryan Scheel"; - }; - hawkw = { - email = "eliza@elizas.website"; - github = "hawkw"; - githubId = 2796466; - name = "Eliza Weisman"; - }; - hax404 = { - email = "hax404foogit@hax404.de"; - matrix = "@hax404:hax404.de"; - github = "hax404"; - githubId = 1379411; - name = "Georg Haas"; - }; - hbunke = { - email = "bunke.hendrik@gmail.com"; - github = "hbunke"; - githubId = 1768793; - name = "Hendrik Bunke"; - }; - hce = { - email = "hc@hcesperer.org"; - github = "hce"; - githubId = 147689; - name = "Hans-Christian Esperer"; - }; - hdhog = { - name = "Serg Larchenko"; - email = "hdhog@hdhog.ru"; - github = "hdhog"; - githubId = 386666; - keys = [{ - fingerprint = "A25F 6321 AAB4 4151 4085 9924 952E ACB7 6703 BA63"; - }]; - }; - hectorj = { - email = "hector.jusforgues+nixos@gmail.com"; - github = "hectorj"; - githubId = 2427959; - name = "Hector Jusforgues"; - }; - hedning = { - email = "torhedinbronner@gmail.com"; - github = "hedning"; - githubId = 71978; - name = "Tor Hedin Brønner"; - }; - heel = { - email = "parizhskiy@gmail.com"; - github = "HeeL"; - githubId = 287769; - name = "Sergii Paryzhskyi"; - }; - helium = { - email = "helium.dev@tuta.io"; - github = "helium18"; - githubId = 86223025; - name = "helium"; - }; - helkafen = { - email = "arnaudpourseb@gmail.com"; - github = "Helkafen"; - githubId = 2405974; - name = "Sébastian Méric de Bellefon"; - }; - hellwolf = { - email = "zhicheng.miao@gmail.com"; - github = "hellwolf"; - githubId = 186660; - name = "Miao, ZhiCheng"; - }; - henkery = { - email = "jim@reupload.nl"; - github = "henkery"; - githubId = 1923309; - name = "Jim van Abkoude"; - }; - henkkalkwater = { - email = "chris+nixpkgs@netsoj.nl"; - github = "HenkKalkwater"; - githubId = 4262067; - matrix = "@chris:netsoj.nl"; - name = "Chris Josten"; - }; - henrikolsson = { - email = "henrik@fixme.se"; - github = "henrikolsson"; - githubId = 982322; - name = "Henrik Olsson"; - }; - henrytill = { - email = "henrytill@gmail.com"; - github = "henrytill"; - githubId = 6430643; - name = "Henry Till"; - }; - heph2 = { - email = "srht@mrkeebs.eu"; - github = "heph2"; - githubId = 87579883; - name = "Marco"; - }; - herberteuler = { - email = "herberteuler@gmail.com"; - github = "herberteuler"; - githubId = 1401179; - name = "Guanpeng Xu"; - }; - hexa = { - email = "hexa@darmstadt.ccc.de"; - matrix = "@hexa:lossy.network"; - github = "mweinelt"; - githubId = 131599; - name = "Martin Weinelt"; - }; - hexagonal-sun = { - email = "dev@mattleach.net"; - github = "hexagonal-sun"; - githubId = 222664; - name = "Matthew Leach"; - }; - hexchen = { - email = "nix@lilwit.ch"; - github = "hexchen"; - githubId = 41522204; - name = "hexchen"; - }; - heyimnova = { - email = "git@heyimnova.dev"; - github = "heyimnova"; - githubId = 115728866; - name = "Nova Witterick"; - keys = [{ - fingerprint = "4304 6B43 8D83 078E 3DF7 10D6 DEB0 E15C 6D2A 5A7C"; - }]; - }; - hh = { - email = "hh@m-labs.hk"; - github = "HarryMakes"; - githubId = 66358631; - name = "Harry Ho"; - }; - hhm = { - email = "heehooman+nixpkgs@gmail.com"; - github = "hhm0"; - githubId = 3656888; - name = "hhm"; - }; - hhydraa = { - email = "hcurfman@keemail.me"; - github = "hhydraa"; - githubId = 58676303; - name = "hhydraa"; - }; - higebu = { - name = "Yuya Kusakabe"; - email = "yuya.kusakabe@gmail.com"; - github = "higebu"; - githubId = 733288; - }; - hiljusti = { - name = "J.R. Hill"; - email = "hiljusti@so.dang.cool"; - github = "hiljusti"; - githubId = 17605298; - }; - hirenashah = { - email = "hiren@hiren.io"; - github = "hirenashah"; - githubId = 19825977; - name = "Hiren Shah"; - }; - hiro98 = { - email = "hiro@protagon.space"; - github = "vale981"; - githubId = 4025991; - name = "Valentin Boettcher"; - keys = [{ - fingerprint = "45A9 9917 578C D629 9F5F B5B4 C22D 4DE4 D7B3 2D19"; - }]; - }; - hjones2199 = { - email = "hjones2199@gmail.com"; - github = "hjones2199"; - githubId = 5525217; - name = "Hunter Jones"; - }; - hkjn = { - email = "me@hkjn.me"; - name = "Henrik Jonsson"; - github = "hkjn"; - githubId = 287215; - keys = [{ - fingerprint = "D618 7A03 A40A 3D56 62F5 4B46 03EF BF83 9A5F DC15"; - }]; - }; - hleboulanger = { - email = "hleboulanger@protonmail.com"; - name = "Harold Leboulanger"; - github = "thbkrshw"; - githubId = 33122; - }; - hloeffler = { - name = "Hauke Löffler"; - email = "nix@hauke-loeffler.de"; - github = "hloeffler"; - githubId = 6627191; - }; - hlolli = { - email = "hlolli@gmail.com"; - github = "hlolli"; - githubId = 6074754; - name = "Hlodver Sigurdsson"; - }; - hmenke = { - name = "Henri Menke"; - email = "henri@henrimenke.de"; - matrix = "@hmenke:matrix.org"; - github = "hmenke"; - githubId = 1903556; - keys = [{ - fingerprint = "F1C5 760E 45B9 9A44 72E9 6BFB D65C 9AFB 4C22 4DA3"; - }]; - }; - hodapp = { - email = "hodapp87@gmail.com"; - github = "Hodapp87"; - githubId = 896431; - name = "Chris Hodapp"; - }; - holgerpeters = { - name = "Holger Peters"; - email = "holger.peters@posteo.de"; - github = "HolgerPeters"; - githubId = 4097049; - }; - hollowman6 = { - email = "hollowman@hollowman.ml"; - github = "HollowMan6"; - githubId = 43995067; - name = "Songlin Jiang"; - }; - holymonson = { - email = "holymonson@gmail.com"; - github = "holymonson"; - githubId = 902012; - name = "Monson Shao"; - }; - hongchangwu = { - email = "wuhc85@gmail.com"; - github = "hongchangwu"; - githubId = 362833; - name = "Hongchang Wu"; - }; - hoppla20 = { - email = "privat@vincentcui.de"; - github = "hoppla20"; - githubId = 25618740; - name = "Vincent Cui"; - }; - hoverbear = { - email = "operator+nix@hoverbear.org"; - matrix = "@hoverbear:matrix.org"; - github = "Hoverbear"; - githubId = 130903; - name = "Ana Hobden"; - }; - hqurve = { - email = "hqurve@outlook.com"; - github = "hqurve"; - githubId = 53281855; - name = "hqurve"; - }; - hraban = { - email = "hraban@0brg.net"; - github = "hraban"; - githubId = 137852; - name = "Hraban Luyat"; - }; - hrdinka = { - email = "c.nix@hrdinka.at"; - github = "hrdinka"; - githubId = 1436960; - name = "Christoph Hrdinka"; - }; - hrhino = { - email = "hora.rhino@gmail.com"; - github = "hrhino"; - githubId = 28076058; - name = "Harrison Houghton"; - }; - hschaeidt = { - email = "he.schaeidt@gmail.com"; - github = "hschaeidt"; - githubId = 1614615; - name = "Hendrik Schaeidt"; - }; - htr = { - email = "hugo@linux.com"; - github = "htr"; - githubId = 39689; - name = "Hugo Tavares Reis"; - }; - huantian = { - name = "David Li"; - email = "davidtianli@gmail.com"; - matrix = "@huantian:huantian.dev"; - github = "huantianad"; - githubId = 20760920; - keys = [{ - fingerprint = "731A 7A05 AD8B 3AE5 956A C227 4A03 18E0 4E55 5DE5"; - }]; - }; - hufman = { - email = "hufman@gmail.com"; - github = "hufman"; - githubId = 1592375; - name = "Walter Huf"; - }; - hughobrien = { - email = "github@hughobrien.ie"; - github = "hughobrien"; - githubId = 3400690; - name = "Hugh O'Brien"; - }; - hugolgst = { - email = "hugo.lageneste@pm.me"; - github = "hugolgst"; - githubId = 15371828; - name = "Hugo Lageneste"; - }; - hugoreeves = { - email = "hugo@hugoreeves.com"; - github = "HugoReeves"; - githubId = 20039091; - name = "Hugo Reeves"; - keys = [{ - fingerprint = "78C2 E81C 828A 420B 269A EBC1 49FA 39F8 A7F7 35F9"; - }]; - }; - humancalico = { - email = "humancalico@disroot.org"; - github = "humancalico"; - githubId = 51334444; - name = "Akshat Agarwal"; - }; - huyngo = { - email = "huyngo@disroot.org"; - github = "Huy-Ngo"; - name = "Ngô Ngọc Đức Huy"; - githubId = 19296926; - keys = [{ - fingerprint = "DF12 23B1 A9FD C5BE 3DA5 B6F7 904A F1C7 CDF6 95C3"; - }]; - }; - hypersw = { - email = "baltic@hypersw.net"; - github = "hypersw"; - githubId = 2332070; - name = "Serge Baltic"; - }; - hyphon81 = { - email = "zero812n@gmail.com"; - github = "hyphon81"; - githubId = 12491746; - name = "Masato Yonekawa"; - }; - hyshka = { - name = "Bryan Hyshka"; - email = "bryan@hyshka.com"; - github = "hyshka"; - githubId = 2090758; - keys = [{ - fingerprint = "24F4 1925 28C4 8797 E539 F247 DB2D 93D1 BFAA A6EA"; - }]; - }; - hyzual = { - email = "hyzual@gmail.com"; - github = "Hyzual"; - githubId = 2051507; - name = "Joris Masson"; - }; - hzeller = { - email = "h.zeller@acm.org"; - github = "hzeller"; - githubId = 140937; - name = "Henner Zeller"; - }; - i077 = { - email = "nixpkgs@imranhossa.in"; - github = "i077"; - githubId = 2789926; - name = "Imran Hossain"; - }; - iagoq = { - github = "iagocq"; - githubId = 18238046; - name = "Iago Manoel Brito"; - keys = [{ - fingerprint = "DF90 9D58 BEE4 E73A 1B8C 5AF3 35D3 9F9A 9A1B C8DA"; - }]; - }; - iammrinal0 = { - email = "nixpkgs@mrinalpurohit.in"; - matrix = "@iammrinal0:nixos.dev"; - github = "iAmMrinal0"; - githubId = 890062; - name = "Mrinal"; - }; - iand675 = { - email = "ian@iankduncan.com"; - github = "iand675"; - githubId = 69209; - name = "Ian Duncan"; - }; - ianmjones = { - email = "ian@ianmjones.com"; - github = "ianmjones"; - githubId = 4710; - name = "Ian M. Jones"; - }; - ianwookim = { - email = "ianwookim@gmail.com"; - github = "wavewave"; - githubId = 1031119; - name = "Ian-Woo Kim"; - }; - ibizaman = { - email = "ibizapeanut@gmail.com"; - github = "ibizaman"; - githubId = 1044950; - name = "Pierre Penninckx"; - keys = [{ - fingerprint = "A01F 10C6 7176 B2AE 2A34 1A56 D4C5 C37E 6031 A3FE"; - }]; - }; - iblech = { - email = "iblech@speicherleck.de"; - github = "iblech"; - githubId = 3661115; - name = "Ingo Blechschmidt"; - }; - icewind1991 = { - name = "Robin Appelman"; - email = "robin@icewind.nl"; - github = "icewind1991"; - githubId = 1283854; - }; - icyrockcom = { - github = "icyrockcom"; - githubId = 785140; - name = "icyrock"; - }; - icy-thought = { - name = "Icy-Thought"; - email = "gilganyx@pm.me"; - matrix = "@gilganix:matrix.org"; - github = "Icy-Thought"; - githubId = 53710398; - }; - idontgetoutmuch = { - email = "dominic@steinitz.org"; - github = "idontgetoutmuch"; - githubId = 1550265; - name = "Dominic Steinitz"; - }; - ifurther = { - github = "ifurther"; - githubId = 55025025; - name = "Feather Lin"; - }; - igsha = { - email = "igor.sharonov@gmail.com"; - github = "igsha"; - githubId = 5345170; - name = "Igor Sharonov"; - }; - iimog = { - email = "iimog@iimog.org"; - github = "iimog"; - githubId = 7403236; - name = "Markus J. Ankenbrand"; - }; - ikervagyok = { - email = "ikervagyok@gmail.com"; - github = "ikervagyok"; - githubId = 7481521; - name = "Balázs Lengyel"; - }; - ilian = { - email = "ilian@tuta.io"; - github = "ilian"; - githubId = 25505957; - name = "Ilian"; - }; - ilikeavocadoes = { - email = "ilikeavocadoes@hush.com"; - github = "ilikeavocadoes"; - githubId = 36193715; - name = "Lassi Haasio"; - }; - ilkecan = { - email = "ilkecan@protonmail.com"; - matrix = "@ilkecan:matrix.org"; - github = "ilkecan"; - githubId = 40234257; - name = "ilkecan bozdogan"; - }; - illegalprime = { - email = "themichaeleden@gmail.com"; - github = "illegalprime"; - githubId = 4401220; - name = "Michael Eden"; - }; - illiusdope = { - email = "mat@marini.ca"; - github = "illiusdope"; - githubId = 61913481; - name = "Mat Marini"; - }; - illustris = { - email = "me@illustris.tech"; - github = "illustris"; - githubId = 3948275; - name = "Harikrishnan R"; - }; - ilya-fedin = { - email = "fedin-ilja2010@ya.ru"; - github = "ilya-fedin"; - githubId = 17829319; - name = "Ilya Fedin"; - }; - ilya-kolpakov = { - email = "ilya.kolpakov@gmail.com"; - github = "ilya-kolpakov"; - githubId = 592849; - name = "Ilya Kolpakov"; - }; - ilyakooo0 = { - name = "Ilya Kostyuchenko"; - email = "ilyakooo0@gmail.com"; - github = "ilyakooo0"; - githubId = 6209627; - }; - imalison = { - email = "IvanMalison@gmail.com"; - github = "IvanMalison"; - githubId = 1246619; - name = "Ivan Malison"; - }; - imalsogreg = { - email = "imalsogreg@gmail.com"; - github = "imalsogreg"; - githubId = 993484; - name = "Greg Hale"; - }; - imgabe = { - email = "gabrielpmonte@hotmail.com"; - github = "ImGabe"; - githubId = 24387926; - name = "Gabriel Pereira"; - }; - imincik = { - email = "ivan.mincik@gmail.com"; - matrix = "@imincik:matrix.org"; - github = "imincik"; - githubId = 476346; - name = "Ivan Mincik"; - }; - imlonghao = { - email = "nixos@esd.cc"; - github = "imlonghao"; - githubId = 4951333; - name = "Hao Long"; - }; - immae = { - email = "ismael@bouya.org"; - matrix = "@immae:immae.eu"; - github = "immae"; - githubId = 510202; - name = "Ismaël Bouya"; - }; - impl = { - email = "noah@noahfontes.com"; - matrix = "@impl:matrix.org"; - github = "impl"; - githubId = 41129; - name = "Noah Fontes"; - keys = [{ - fingerprint = "F5B2 BE1B 9AAD 98FE 2916 5597 3665 FFF7 9D38 7BAA"; - }]; - }; - imsofi = { - email = "sofi+git@mailbox.org"; - github = "imsofi"; - githubId = 20756843; - name = "Sofi"; - }; - imuli = { - email = "i@imu.li"; - github = "imuli"; - githubId = 4085046; - name = "Imuli"; - }; - inclyc = { - email = "i@lyc.dev"; - github = "inclyc"; - githubId = 36667224; - name = "Yingchi Long"; - }; - indeednotjames = { - email = "nix@indeednotjames.com"; - github = "IndeedNotJames"; - githubId = 55066419; - name = "Emily Lange"; - }; - indexyz = { - email = "indexyz@pm.me"; - github = "5aaee9"; - githubId = 7685264; - name = "Indexyz"; - }; - ineol = { - email = "leo.stefanesco@gmail.com"; - github = "ineol"; - githubId = 37965; - name = "Léo Stefanesco"; - }; - infinidoge = { - name = "Infinidoge"; - email = "infinidoge@inx.moe"; - github = "Infinidoge"; - githubId = 22727114; - }; - infinisil = { - email = "contact@infinisil.com"; - matrix = "@infinisil:matrix.org"; - github = "infinisil"; - githubId = 20525370; - name = "Silvan Mosberger"; - keys = [{ - fingerprint = "6C2B 55D4 4E04 8266 6B7D DA1A 422E 9EDA E015 7170"; - }]; - }; - infinitivewitch = { - name = "Infinitive Witch"; - email = "infinitivewitch@disroot.org"; - matrix = "@infinitivewitch:fedora.im"; - github = "infinitivewitch"; - githubId = 128256833; - keys = [{ - fingerprint = "CF3D F4AD C7BD 1FDB A88B E4B3 CA2D 43DA 939D 94FB"; - }]; - }; - ingenieroariel = { - email = "ariel@nunez.co"; - github = "ingenieroariel"; - githubId = 54999; - name = "Ariel Nunez"; - }; - ionutnechita = { - email = "ionut_n2001@yahoo.com"; - github = "ionutnechita"; - githubId = 9405900; - name = "Ionut Nechita"; - }; - iopq = { - email = "iop_jr@yahoo.com"; - github = "iopq"; - githubId = 1817528; - name = "Igor Polyakov"; - }; - irenes = { - name = "Irene Knapp"; - email = "ireneista@gmail.com"; - matrix = "@irenes:matrix.org"; - github = "IreneKnapp"; - githubId = 157678; - keys = [{ - fingerprint = "E864 BDFA AB55 36FD C905 5195 DBF2 52AF FB26 19FD"; - }]; - }; - ironpinguin = { - email = "michele@catalano.de"; - github = "ironpinguin"; - githubId = 137306; - name = "Michele Catalano"; - }; - isgy = { - name = "isgy"; - email = "isgy@teiyg.com"; - github = "tgys"; - githubId = 13622947; - keys = [{ - fingerprint = "1412 816B A9FA F62F D051 1975 D3E1 B013 B463 1293"; - }]; - }; - ius = { - email = "j.de.gram@gmail.com"; - name = "Joerie de Gram"; - matrix = "@ius:nltrix.net"; - github = "ius"; - githubId = 529626; - }; - ivan = { - email = "ivan@ludios.org"; - github = "ivan"; - githubId = 4458; - name = "Ivan Kozik"; - }; - ivan-babrou = { - email = "nixpkgs@ivan.computer"; - name = "Ivan Babrou"; - github = "bobrik"; - githubId = 89186; - }; - ivanbrennan = { - email = "ivan.brennan@gmail.com"; - github = "ivanbrennan"; - githubId = 1672874; - name = "Ivan Brennan"; - keys = [{ - fingerprint = "7311 2700 AB4F 4CDF C68C F6A5 79C3 C47D C652 EA54"; - }]; - }; - ivankovnatsky = { - github = "ivankovnatsky"; - githubId = 75213; - name = "Ivan Kovnatsky"; - keys = [{ - fingerprint = "6BD3 7248 30BD 941E 9180 C1A3 3A33 FA4C 82ED 674F"; - }]; - }; - ivanmoreau = { - email = "Iván Molina Rebolledo"; - github = "ivanmoreau"; - githubId = 10843250; - name = "ivan@ivmoreau.com"; - }; - ivan-timokhin = { - email = "nixpkgs@ivan.timokhin.name"; - name = "Ivan Timokhin"; - github = "ivan-timokhin"; - githubId = 9802104; - }; - ivan-tkatchev = { - email = "tkatchev@gmail.com"; - github = "ivan-tkatchev"; - githubId = 650601; - name = "Ivan Tkatchev"; - }; - ivar = { - email = "ivar.scholten@protonmail.com"; - github = "IvarWithoutBones"; - githubId = 41924494; - name = "Ivar"; - }; - iwanb = { - email = "tracnar@gmail.com"; - github = "iwanb"; - githubId = 4035835; - name = "Iwan"; - }; - ixmatus = { - email = "parnell@digitalmentat.com"; - github = "ixmatus"; - githubId = 30714; - name = "Parnell Springmeyer"; - }; - ixxie = { - email = "matan@fluxcraft.net"; - github = "ixxie"; - githubId = 20320695; - name = "Matan Bendix Shenhav"; - }; - izorkin = { - email = "Izorkin@gmail.com"; - github = "Izorkin"; - githubId = 26877687; - name = "Yurii Izorkin"; - }; - j03 = { - email = "github@johannesloetzsch.de"; - github = "johannesloetzsch"; - githubId = 175537; - name = "Johannes Lötzsch"; - }; - j0hax = { - name = "Johannes Arnold"; - email = "johannes.arnold@stud.uni-hannover.de"; - github = "j0hax"; - githubId = 3802620; - }; - j0lol = { - name = "Jo"; - email = "me@j0.lol"; - github = "j0lol"; - githubId = 24716467; - }; - j0xaf = { - email = "j0xaf@j0xaf.de"; - name = "Jörn Gersdorf"; - github = "j0xaf"; - githubId = 932697; - }; - j4m3s = { - name = "James Landrein"; - email = "github@j4m3s.eu"; - github = "j4m3s-s"; - githubId = 9413812; - }; - jacg = { - name = "Jacek Generowicz"; - email = "jacg@my-post-office.net"; - github = "jacg"; - githubId = 2570854; - }; - jackgerrits = { - email = "jack@jackgerrits.com"; - github = "jackgerrits"; - githubId = 7558482; - name = "Jack Gerrits"; - }; - jagajaga = { - email = "ars.seroka@gmail.com"; - github = "jagajaga"; - githubId = 2179419; - name = "Arseniy Seroka"; - }; - jakehamilton = { - name = "Jake Hamilton"; - email = "jake.hamilton@hey.com"; - matrix = "@jakehamilton:matrix.org"; - github = "jakehamilton"; - githubId = 7005773; - keys = [{ - fingerprint = "B982 0250 1720 D540 6A18 2DA8 188E 4945 E85B 2D21"; - }]; - }; - jakeisnt = { - name = "Jacob Chvatal"; - email = "jake@isnt.online"; - github = "jakeisnt"; - githubId = 29869612; - }; - jakelogemann = { - email = "jake.logemann@gmail.com"; - github = "jakelogemann"; - githubId = 820715; - name = "Jake Logemann"; - }; - jakestanger = { - email = "mail@jstanger.dev"; - github = "JakeStanger"; - githubId = 5057870; - name = "Jake Stanger"; - }; - jakewaksbaum = { - email = "jake.waksbaum@gmail.com"; - github = "jbaum98"; - githubId = 5283991; - name = "Jake Waksbaum"; - }; - jakubgs = { - email = "jakub@gsokolowski.pl"; - github = "jakubgs"; - githubId = 2212681; - name = "Jakub Grzgorz Sokołowski"; - }; - jali-clarke = { - email = "jinnah.ali-clarke@outlook.com"; - name = "Jinnah Ali-Clarke"; - github = "jali-clarke"; - githubId = 17733984; - }; - jamiemagee = { - email = "jamie.magee@gmail.com"; - github = "JamieMagee"; - githubId = 1358764; - name = "Jamie Magee"; - }; - jammerful = { - email = "jammerful@gmail.com"; - github = "jammerful"; - githubId = 20176306; - name = "jammerful"; - }; - janik = { - name = "Janik"; - email = "janik@aq0.de"; - matrix = "@janik0:matrix.org"; - github = "Janik-Haag"; - githubId = 80165193; - }; - jansol = { - email = "jan.solanti@paivola.fi"; - github = "jansol"; - githubId = 2588851; - name = "Jan Solanti"; - }; - jappie = { - email = "jappieklooster@hotmail.com"; - github = "jappeace"; - githubId = 3874017; - name = "Jappie Klooster"; - }; - jasoncarr = { - email = "jcarr250@gmail.com"; - github = "jasoncarr0"; - githubId = 6874204; - name = "Jason Carr"; - }; - jasonodoom = { - email = "jasonodoom@riseup.net"; - github = "jasonodoom"; - githubId = 6789916; - name = "Jason Odoom"; - }; - javaguirre = { - email = "contacto@javaguirre.net"; - github = "javaguirre"; - githubId = 488556; - name = "Javier Aguirre"; - }; - jayesh-bhoot = { - name = "Jayesh Bhoot"; - email = "jayesh@bhoot.sh"; - github = "jayeshbhoot"; - githubId = 1915507; - }; - jayman2000 = { - email = "jason@jasonyundt.email"; - github = "Jayman2000"; - githubId = 5579359; - name = "Jason Yundt"; - }; - jb55 = { - email = "jb55@jb55.com"; - github = "jb55"; - githubId = 45598; - name = "William Casarin"; - }; - jbcrail = { - name = "Joseph Crail"; - email = "jbcrail@gmail.com"; - github = "jbcrail"; - githubId = 6038; - }; - jbedo = { - email = "cu@cua0.org"; - matrix = "@jb:vk3.wtf"; - github = "jbedo"; - githubId = 372912; - name = "Justin Bedő"; - }; - jbgi = { - email = "jb@giraudeau.info"; - github = "jbgi"; - githubId = 221929; - name = "Jean-Baptiste Giraudeau"; - }; - jboy = { - email = "jboy+nixos@bius.moe"; - githubId = 2187261; - github = "jboynyc"; - matrix = "@jboy:utwente.io"; - name = "John Boy"; - }; - j-brn = { - email = "me@bricker.io"; - github = "j-brn"; - githubId = 40566146; - name = "Jonas Braun"; - }; - jc = { - name = "Josh Cooper"; - email = "josh@cooper.is"; - github = "joshua-cooper"; - githubId = 35612334; - }; - jceb = { - name = "Jan Christoph Ebersbach"; - email = "jceb@e-jc.de"; - github = "jceb"; - githubId = 101593; - }; - jchw = { - email = "johnwchadwick@gmail.com"; - github = "jchv"; - githubId = 938744; - name = "John Chadwick"; - }; - jcouyang = { - email = "oyanglulu@gmail.com"; - github = "jcouyang"; - githubId = 1235045; - name = "Jichao Ouyang"; - keys = [{ - fingerprint = "A506 C38D 5CC8 47D0 DF01 134A DA8B 833B 5260 4E63"; - }]; - }; - jcs090218 = { - email = "jcs090218@gmail.com"; - github = "jcs090218"; - githubId = 8685505; - name = "Jen-Chieh Shen"; - }; - jcumming = { - email = "jack@mudshark.org"; - github = "jcumming"; - githubId = 1982341; - name = "Jack Cummings"; - }; - jdagilliland = { - email = "jdagilliland@gmail.com"; - github = "jdagilliland"; - githubId = 1383440; - name = "Jason Gilliland"; - }; - jdahm = { - email = "johann.dahm@gmail.com"; - github = "jdahm"; - githubId = 68032; - name = "Johann Dahm"; - }; - jdanek = { - email = "jdanek@redhat.com"; - github = "jirkadanek"; - githubId = 17877663; - keys = [{ - fingerprint = "D4A6 F051 AD58 2E7C BCED 5439 6927 5CAD F15D 872E"; - }]; - name = "Jiri Daněk"; - }; - jdbaldry = { - email = "jack.baldry@grafana.com"; - github = "jdbaldry"; - githubId = 4599384; - name = "Jack Baldry"; - }; - jdehaas = { - email = "qqlq@nullptr.club"; - github = "jeroendehaas"; - githubId = 117874; - name = "Jeroen de Haas"; - }; - jdelStrother = { - email = "me@delstrother.com"; - github = "jdelStrother"; - githubId = 2377; - name = "Jonathan del Strother"; - }; - jdreaver = { - email = "johndreaver@gmail.com"; - github = "jdreaver"; - githubId = 1253071; - name = "David Reaver"; - }; - jduan = { - name = "Jingjing Duan"; - email = "duanjingjing@gmail.com"; - github = "jduan"; - githubId = 452450; - }; - jdupak = { - name = "Jakub Dupak"; - email = "dev@jakubdupak.com"; - github = "jdupak"; - githubId = 22683640; - }; - jecaro = { - email = "jeancharles.quillet@gmail.com"; - github = "jecaro"; - githubId = 17029738; - name = "Jean-Charles Quillet"; - }; - jedsek = { - email = "jedsek@qq.com"; - github = "jedsek"; - githubId = 63626406; - name = "Jedsek"; - }; - jefdaj = { - email = "jefdaj@gmail.com"; - github = "jefdaj"; - githubId = 1198065; - name = "Jeffrey David Johnson"; - }; - jefflabonte = { - email = "grimsleepless@protonmail.com"; - github = "JeffLabonte"; - githubId = 9425955; - name = "Jean-François Labonté"; - }; - jensbin = { - email = "jensbin+git@pm.me"; - github = "jensbin"; - githubId = 1608697; - name = "Jens Binkert"; - }; - jeremyschlatter = { - email = "github@jeremyschlatter.com"; - github = "jeremyschlatter"; - githubId = 5741620; - name = "Jeremy Schlatter"; - }; - jerith666 = { - email = "github@matt.mchenryfamily.org"; - github = "jerith666"; - githubId = 854319; - name = "Matt McHenry"; - }; - jeschli = { - email = "jeschli@gmail.com"; - github = "0mbi"; - githubId = 10786794; - name = "Markus Hihn"; - }; - jessemoore = { - email = "jesse@jessemoore.dev"; - github = "jesseDMoore1994"; - githubId = 30251156; - name = "Jesse Moore"; - }; - jethro = { - email = "jethrokuan95@gmail.com"; - github = "jethrokuan"; - githubId = 1667473; - name = "Jethro Kuan"; - }; - jevy = { - email = "jevin@quickjack.ca"; - github = "jevy"; - githubId = 110620; - name = "Jevin Maltais"; - }; - jfb = { - email = "james@yamtime.com"; - github = "tftio"; - githubId = 143075; - name = "James Felix Black"; - }; - jfchevrette = { - email = "jfchevrette@gmail.com"; - github = "jfchevrette"; - githubId = 3001; - name = "Jean-Francois Chevrette"; - keys = [{ - fingerprint = "B612 96A9 498E EECD D5E9 C0F0 67A0 5858 0129 0DC6"; - }]; - }; - jflanglois = { - email = "yourstruly@julienlanglois.me"; - github = "jflanglois"; - githubId = 18501; - name = "Julien Langlois"; - }; - jfrankenau = { - email = "johannes@frankenau.net"; - github = "jfrankenau"; - githubId = 2736480; - name = "Johannes Frankenau"; - }; - jfroche = { - name = "Jean-François Roche"; - email = "jfroche@pyxel.be"; - matrix = "@jfroche:matrix.pyxel.cloud"; - github = "jfroche"; - githubId = 207369; - keys = [{ - fingerprint = "7EB1 C02A B62B B464 6D7C E4AE D1D0 9DE1 69EA 19A0"; - }]; - }; - jfvillablanca = { - email = "jmfv.dev@gmail.com"; - matrix = "@jfvillablanca:matrix.org"; - github = "jfvillablanca"; - githubId = 31008330; - name = "Jann Marc Villablanca"; - }; - jgart = { - email = "jgart@dismail.de"; - github = "jgarte"; - githubId = 47760695; - name = "Jorge Gomez"; - }; - jgeerds = { - email = "jascha@geerds.org"; - github = "jgeerds"; - githubId = 1473909; - name = "Jascha Geerds"; - }; - jgertm = { - email = "jger.tm@gmail.com"; - github = "jgertm"; - githubId = 6616642; - name = "Tim Jaeger"; - }; - jgillich = { - email = "jakob@gillich.me"; - github = "jgillich"; - githubId = 347965; - name = "Jakob Gillich"; - }; - jglukasik = { - email = "joseph@jgl.me"; - github = "jglukasik"; - githubId = 6445082; - name = "Joseph Lukasik"; - }; - jhh = { - email = "jeff@j3ff.io"; - github = "jhh"; - githubId = 14412; - name = "Jeff Hutchison"; - }; - jhhuh = { - email = "jhhuh.note@gmail.com"; - github = "jhhuh"; - githubId = 5843245; - name = "Ji-Haeng Huh"; - }; - jhillyerd = { - email = "james+nixos@hillyerd.com"; - github = "jhillyerd"; - githubId = 2502736; - name = "James Hillyerd"; - }; - j-hui = { - email = "j-hui@cs.columbia.edu"; - github = "j-hui"; - githubId = 11800204; - name = "John Hui"; - }; - jiegec = { - name = "Jiajie Chen"; - email = "c@jia.je"; - github = "jiegec"; - githubId = 6127678; - }; - jiehong = { - email = "nixos@majiehong.com"; - github = "Jiehong"; - githubId = 1061229; - name = "Jiehong Ma"; - }; - jirkamarsik = { - email = "jiri.marsik89@gmail.com"; - github = "jirkamarsik"; - githubId = 184898; - name = "Jirka Marsik"; - }; - jitwit = { - email = "jrn@bluefarm.ca"; - github = "jitwit"; - githubId = 51518420; - name = "jitwit"; - }; - jjjollyjim = { - email = "jamie@kwiius.com"; - github = "JJJollyjim"; - githubId = 691552; - name = "Jamie McClymont"; - }; - jk = { - email = "hello+nixpkgs@j-k.io"; - matrix = "@j-k:matrix.org"; - github = "06kellyjac"; - githubId = 9866621; - name = "Jack"; - }; - jkarlson = { - email = "jekarlson@gmail.com"; - github = "ethorsoe"; - githubId = 1204734; - name = "Emil Karlson"; - }; - j-keck = { - email = "jhyphenkeck@gmail.com"; - github = "j-keck"; - githubId = 3081095; - name = "Jürgen Keck"; - }; - jlamur = { - email = "contact@juleslamur.fr"; - github = "jlamur"; - githubId = 7054317; - name = "Jules Lamur"; - keys = [{ - fingerprint = "B768 6CD7 451A 650D 9C54 4204 6710 CF0C 1CBD 7762"; - }]; - }; - jlesquembre = { - email = "jl@lafuente.me"; - github = "jlesquembre"; - githubId = 1058504; - name = "José Luis Lafuente"; - }; - jloyet = { - email = "ml@fatbsd.com"; - github = "fatpat"; - githubId = 822436; - name = "Jérôme Loyet"; - }; - jluttine = { - email = "jaakko.luttinen@iki.fi"; - github = "jluttine"; - githubId = 2195834; - name = "Jaakko Luttinen"; - }; - jm2dev = { - email = "jomarcar@gmail.com"; - github = "jm2dev"; - githubId = 474643; - name = "José Miguel Martínez Carrasco"; - }; - jmagnusj = { - email = "jmagnusj@gmail.com"; - github = "magnusjonsson"; - githubId = 8900; - name = "Johan Magnus Jonsson"; - }; - jmc-figueira = { - email = "business+nixos@jmc-figueira.dev"; - github = "jmc-figueira"; - githubId = 6634716; - name = "João Figueira"; - keys = [ - # GitHub signing key - { - fingerprint = "EC08 7AA3 DEAD A972 F015 6371 DC7A E56A E98E 02D7"; - } - # Email encryption - { - fingerprint = "816D 23F5 E672 EC58 7674 4A73 197F 9A63 2D13 9E30"; - } - ]; - }; - jmettes = { - email = "jonathan@jmettes.com"; - github = "jmettes"; - githubId = 587870; - name = "Jonathan Mettes"; - }; - jmgilman = { - email = "joshuagilman@gmail.com"; - github = "jmgilman"; - githubId = 2308444; - name = "Joshua Gilman"; - }; - jnsgruk = { - email = "jon@sgrs.uk"; - github = "jnsgruk"; - githubId = 668505; - name = "Jon Seager"; - }; - jo1gi = { - email = "joakimholm@protonmail.com"; - github = "jo1gi"; - githubId = 26695750; - name = "Joakim Holm"; - }; - joachifm = { - email = "joachifm@fastmail.fm"; - github = "joachifm"; - githubId = 41977; - name = "Joachim Fasting"; - }; - joachimschmidt557 = { - email = "joachim.schmidt557@outlook.com"; - github = "joachimschmidt557"; - githubId = 28556218; - name = "Joachim Schmidt"; - }; - joamaki = { - email = "joamaki@gmail.com"; - github = "joamaki"; - githubId = 1102396; - name = "Jussi Maki"; - }; - jobojeha = { - email = "jobojeha@jeppener.de"; - github = "jobojeha"; - githubId = 60272884; - name = "Jonathan Jeppener-Haltenhoff"; - }; - jocelynthode = { - email = "jocelyn.thode@gmail.com"; - github = "jocelynthode"; - githubId = 3967312; - name = "Jocelyn Thode"; - }; - joedevivo = { - github = "joedevivo"; - githubId = 55951; - name = "Joe DeVivo"; - }; - joelancaster = { - email = "joe.a.lancas@gmail.com"; - github = "JoeLancaster"; - githubId = 16760945; - name = "Joe Lancaster"; - }; - joelburget = { - email = "joelburget@gmail.com"; - github = "joelburget"; - githubId = 310981; - name = "Joel Burget"; - }; - joelkoen = { - email = "mail@joelkoen.com"; - github = "joelkoen"; - githubId = 122502655; - name = "Joel Koen"; - }; - joelmo = { - email = "joel.moberg@gmail.com"; - github = "joelmo"; - githubId = 336631; - name = "Joel Moberg"; - }; - joepie91 = { - email = "admin@cryto.net"; - matrix = "@joepie91:pixie.town"; - name = "Sven Slootweg"; - github = "joepie91"; - githubId = 1663259; - }; - joerdav = { - email = "joe.davidson.21111@gmail.com"; - github = "joerdav"; - name = "Joe Davidson"; - githubId = 19927761; - }; - joesalisbury = { - email = "salisbury.joseph@gmail.com"; - github = "JosephSalisbury"; - githubId = 297653; - name = "Joe Salisbury"; - }; - johanot = { - email = "write@ownrisk.dk"; - github = "johanot"; - githubId = 998763; - name = "Johan Thomsen"; - }; - johbo = { - email = "johannes@bornhold.name"; - github = "johbo"; - githubId = 117805; - name = "Johannes Bornhold"; - }; - johnazoidberg = { - email = "git@danielschaefer.me"; - github = "JohnAZoidberg"; - githubId = 5307138; - name = "Daniel Schäfer"; - }; - johnchildren = { - email = "john.a.children@gmail.com"; - github = "johnchildren"; - githubId = 32305209; - name = "John Children"; - }; - johnmh = { - email = "johnmh@openblox.org"; - github = "JohnMH"; - githubId = 2576152; - name = "John M. Harris, Jr."; - }; - johnramsden = { - email = "johnramsden@riseup.net"; - github = "johnramsden"; - githubId = 8735102; - name = "John Ramsden"; - }; - johnrichardrinehart = { - email = "johnrichardrinehart@gmail.com"; - github = "johnrichardrinehart"; - githubId = 6321578; - name = "John Rinehart"; - }; - john-shaffer = { - email = "jdsha@proton.me"; - github = "john-shaffer"; - githubId = 53870456; - name = "John Shaffer"; - }; - johntitor = { - email = "huyuumi.dev@gmail.com"; - github = "JohnTitor"; - githubId = 25030997; - name = "Yuki Okushi"; - }; - jojosch = { - name = "Johannes Schleifenbaum"; - email = "johannes@js-webcoding.de"; - matrix = "@jojosch:jswc.de"; - github = "jojosch"; - githubId = 327488; - keys = [{ - fingerprint = "7249 70E6 A661 D84E 8B47 678A 0590 93B1 A278 BCD0"; - }]; - }; - joko = { - email = "ioannis.koutras@gmail.com"; - github = "jokogr"; - githubId = 1252547; - keys = [{ - # compare with https://keybase.io/joko - fingerprint = "B154 A8F9 0610 DB45 0CA8 CF39 85EA E7D9 DF56 C5CA"; - }]; - name = "Ioannis Koutras"; - }; - jonaenz = { - name = "Jona Enzinger"; - email = "5xt3zyy5l@mozmail.com"; - matrix = "@jona:matrix.jonaenz.de"; - github = "JonaEnz"; - githubId = 57130301; - keys = [{ - fingerprint = "1CC5 B67C EB9A 13A5 EDF6 F10E 0B4A 3662 FC58 9202"; - }]; - }; - jonafato = { - email = "jon@jonafato.com"; - github = "jonafato"; - githubId = 392720; - name = "Jon Banafato"; - }; - jonathanmarler = { - email = "johnnymarler@gmail.com"; - github = "marler8997"; - githubId = 304904; - name = "Jonathan Marler"; - }; - jonathanreeve = { - email = "jon.reeve@gmail.com"; - github = "JonathanReeve"; - githubId = 1843676; - name = "Jonathan Reeve"; - }; - jonnybolton = { - email = "jonnybolton@gmail.com"; - github = "jonnybolton"; - githubId = 8580434; - name = "Jonny Bolton"; - }; - jonringer = { - email = "jonringer117@gmail.com"; - matrix = "@jonringer:matrix.org"; - github = "jonringer"; - githubId = 7673602; - name = "Jonathan Ringer"; - }; - jopejoe1 = { - email = "johannes@joens.email"; - matrix = "@jopejoe1:matrix.org"; - github = "jopejoe1"; - githubId = 34899572; - name = "Johannes Jöns"; - }; - jordanisaacs = { - name = "Jordan Isaacs"; - email = "nix@jdisaacs.com"; - github = "jordanisaacs"; - githubId = 19742638; - }; - jorise = { - email = "info@jorisengbers.nl"; - github = "JorisE"; - githubId = 1767283; - name = "Joris Engbers"; - }; - jorsn = { - name = "Johannes Rosenberger"; - email = "johannes@jorsn.eu"; - github = "jorsn"; - githubId = 4646725; - }; - joshniemela = { - name = "Joshua Niemelä"; - email = "josh@jniemela.dk"; - github = "joshniemela"; - githubId = 88747315; - }; - joshuafern = { - name = "Joshua Fern"; - email = "joshuafern@protonmail.com"; - github = "JoshuaFern"; - githubId = 4300747; - }; - joshvanl = { - email = " me@joshvanl.dev "; - github = "JoshVanL"; - githubId = 15893072; - name = "Josh van Leeuwen"; - }; - jpagex = { - name = "Jérémy Pagé"; - email = "contact@jeremypage.me"; - github = "jpagex"; - githubId = 635768; - }; - jpas = { - name = "Jarrod Pas"; - email = "jarrod@jarrodpas.com"; - github = "jpas"; - githubId = 5689724; - }; - jpdoyle = { - email = "joethedoyle@gmail.com"; - github = "jpdoyle"; - githubId = 1918771; - name = "Joe Doyle"; - }; - jperras = { - email = "joel@nerderati.com"; - github = "jperras"; - githubId = 20675; - name = "Joël Perras"; - }; - jpetrucciani = { - email = "j@cobi.dev"; - github = "jpetrucciani"; - githubId = 8117202; - name = "Jacobi Petrucciani"; - }; - jpierre03 = { - email = "nix@prunetwork.fr"; - github = "jpierre03"; - githubId = 954536; - name = "Jean-Pierre PRUNARET"; - }; - jpotier = { - email = "jpo.contributes.to.nixos@marvid.fr"; - github = "jpotier"; - githubId = 752510; - name = "Martin Potier"; - }; - jqqqqqqqqqq = { - email = "jqqqqqqqqqq@gmail.com"; - github = "jqqqqqqqqqq"; - githubId = 12872927; - name = "Curtis Jiang"; - }; - jqueiroz = { - email = "nixos@johnjq.com"; - github = "jqueiroz"; - githubId = 4968215; - name = "Jonathan Queiroz"; - }; - jraygauthier = { - email = "jraygauthier@gmail.com"; - github = "jraygauthier"; - githubId = 4611077; - name = "Raymond Gauthier"; - }; - jrpotter = { - email = "jrpotter2112@gmail.com"; - github = "jrpotter"; - githubId = 3267697; - name = "Joshua Potter"; - }; - jshcmpbll = { - email = "me@joshuadcampbell.com"; - github = "jshcmpbll"; - githubId = 16374374; - name = "Joshua Campbell"; - }; - jshholland = { - email = "josh@inv.alid.pw"; - github = "jshholland"; - githubId = 107689; - name = "Josh Holland"; - }; - jsierles = { - email = "joshua@hey.com"; - matrix = "@jsierles:matrix.org"; - name = "Joshua Sierles"; - github = "jsierles"; - githubId = 82; - }; - jsimonetti = { - email = "jeroen+nixpkgs@simonetti.nl"; - matrix = "@jeroen:simonetti.nl"; - name = "Jeroen Simonetti"; - github = "jsimonetti"; - githubId = 5478838; - }; - jsoo1 = { - email = "jsoo1@asu.edu"; - github = "jsoo1"; - name = "John Soo"; - githubId = 10039785; - }; - jtcoolen = { - email = "jtcoolen@pm.me"; - name = "Julien Coolen"; - github = "jtcoolen"; - githubId = 54635632; - keys = [{ - fingerprint = "4C68 56EE DFDA 20FB 77E8 9169 1964 2151 C218 F6F5"; - }]; - }; - jtobin = { - email = "jared@jtobin.io"; - github = "jtobin"; - githubId = 1414434; - name = "Jared Tobin"; - }; - jtojnar = { - email = "jtojnar@gmail.com"; - matrix = "@jtojnar:matrix.org"; - github = "jtojnar"; - githubId = 705123; - name = "Jan Tojnar"; - }; - jtrees = { - email = "me@jtrees.io"; - github = "jtrees"; - githubId = 5802758; - name = "Joshua Trees"; - }; - juaningan = { - email = "juaningan@gmail.com"; - github = "uningan"; - githubId = 810075; - name = "Juan Rodal"; - }; - juboba = { - email = "juboba@gmail.com"; - github = "juboba"; - githubId = 1189739; - name = "Julio Borja Barra"; - }; - jugendhacker = { - name = "j.r"; - email = "j.r@jugendhacker.de"; - github = "jugendhacker"; - githubId = 12773748; - matrix = "@j.r:chaos.jetzt"; - }; - juliendehos = { - email = "dehos@lisic.univ-littoral.fr"; - github = "juliendehos"; - githubId = 11947756; - name = "Julien Dehos"; - }; - julienmalka = { - email = "julien.malka@me.com"; - github = "JulienMalka"; - githubId = 1792886; - name = "Julien Malka"; - }; - julm = { - email = "julm+nixpkgs@sourcephile.fr"; - github = "ju1m"; - githubId = 21160136; - name = "Julien Moutinho"; - }; - jumper149 = { - email = "felixspringer149@gmail.com"; - github = "jumper149"; - githubId = 39434424; - name = "Felix Springer"; - }; - junjihashimoto = { - email = "junji.hashimoto@gmail.com"; - github = "junjihashimoto"; - githubId = 2469618; - name = "Junji Hashimoto"; - }; - justinas = { - email = "justinas@justinas.org"; - github = "justinas"; - githubId = 662666; - name = "Justinas Stankevičius"; - }; - justinlovinger = { - email = "git@justinlovinger.com"; - github = "JustinLovinger"; - githubId = 7183441; - name = "Justin Lovinger"; - }; - justinwoo = { - email = "moomoowoo@gmail.com"; - github = "justinwoo"; - githubId = 2396926; - name = "Justin Woo"; - }; - jvanbruegge = { - email = "supermanitu@gmail.com"; - github = "jvanbruegge"; - githubId = 1529052; - name = "Jan van Brügge"; - keys = [{ - fingerprint = "3513 5CE5 77AD 711F 3825 9A99 3665 72BE 7D6C 78A2"; - }]; - }; - jwatt = { - email = "jwatt@broken.watch"; - github = "jjwatt"; - githubId = 2397327; - name = "Jesse Wattenbarger"; - }; - jwiegley = { - email = "johnw@newartisans.com"; - github = "jwiegley"; - githubId = 8460; - name = "John Wiegley"; - }; - jwijenbergh = { - email = "jeroenwijenbergh@protonmail.com"; - github = "jwijenbergh"; - githubId = 46386452; - name = "Jeroen Wijenbergh"; - }; - jwoudenberg = { - email = "nixpkgs@jasperwoudenberg.com"; - github = "jwoudenberg"; - githubId = 1525551; - name = "Jasper Woudenberg"; - }; - jwygoda = { - email = "jaroslaw@wygoda.me"; - github = "jwygoda"; - githubId = 20658981; - name = "Jarosław Wygoda"; - }; - jyp = { - email = "jeanphilippe.bernardy@gmail.com"; - github = "jyp"; - githubId = 27747; - name = "Jean-Philippe Bernardy"; - }; - jzellner = { - email = "jeffz@eml.cc"; - github = "sofuture"; - githubId = 66669; - name = "Jeff Zellner"; - }; - k3a = { - email = "git+nix@catmail.app"; - name = "Mario Hros"; - github = "k3a"; - githubId = 966992; - }; - k900 = { - name = "Ilya K."; - email = "me@0upti.me"; - github = "K900"; - githubId = 386765; - matrix = "@k900:0upti.me"; - }; - kaction = { - name = "Dmitry Bogatov"; - email = "KAction@disroot.org"; - github = "KAction"; - githubId = 44864956; - keys = [{ - fingerprint = "3F87 0A7C A7B4 3731 2F13 6083 749F D4DF A2E9 4236"; - }]; - }; - kaiha = { - email = "kai.harries@gmail.com"; - github = "KaiHa"; - githubId = 6544084; - name = "Kai Harries"; - }; - kalbasit = { - email = "wael.nasreddine@gmail.com"; - matrix = "@kalbasit:matrix.org"; - github = "kalbasit"; - githubId = 87115; - name = "Wael Nasreddine"; - }; - kalebpace = { - email = "kaleb.pace@pm.me"; - matrix = "@kalebpace:matrix.org"; - github = "kalebpace"; - githubId = 5586615; - name = "Kaleb Pace"; - }; - kalekseev = { - email = "mail@kalekseev.com"; - github = "kalekseev"; - githubId = 367259; - name = "Konstantin Alekseev"; - }; - kamadorueda = { - name = "Kevin Amado"; - email = "kamadorueda@gmail.com"; - github = "kamadorueda"; - githubId = 47480384; - keys = [{ - fingerprint = "2BE3 BAFD 793E A349 ED1F F00F 04D0 CEAF 916A 9A40"; - }]; - }; - kamilchm = { - email = "kamil.chm@gmail.com"; - github = "kamilchm"; - githubId = 1621930; - name = "Kamil Chmielewski"; - }; - kampfschlaefer = { - email = "arnold@arnoldarts.de"; - github = "kampfschlaefer"; - githubId = 3831860; - name = "Arnold Krille"; - }; - kanashimia = { - email = "chad@redpilled.dev"; - github = "kanashimia"; - githubId = 56224949; - name = "Mia Kanashi"; - }; - karantan = { - name = "Gasper Vozel"; - email = "karantan@gmail.com"; - github = "karantan"; - githubId = 7062631; - }; - KarlJoad = { - email = "karl@hallsby.com"; - github = "KarlJoad"; - githubId = 34152449; - name = "Karl Hallsby"; - }; - karolchmist = { - email = "info+nix@chmist.com"; - github = "karolchmist"; - githubId = 1927188; - name = "karolchmist"; - }; - kayhide = { - email = "kayhide@gmail.com"; - github = "kayhide"; - githubId = 1730718; - name = "Hideaki Kawai"; - }; - kazcw = { - email = "kaz@lambdaverse.org"; - github = "kazcw"; - githubId = 1047859; - name = "Kaz Wesley"; - }; - kazenyuk = { - email = "kazenyuk@pm.me"; - github = "nvmd"; - githubId = 524492; - name = "Sergey Kazenyuk"; - }; - kcalvinalvin = { - email = "calvin@kcalvinalvin.info"; - github = "kcalvinalvin"; - githubId = 37185887; - name = "Calvin Kim"; - }; - keksbg = { - email = "keksbg@riseup.net"; - name = "Stella"; - github = "keksbg"; - githubId = 10682187; - keys = [{ - fingerprint = "AB42 1F18 5A19 A160 AD77 9885 3D6D CA5B 6F2C 2A7A"; - }]; - }; - keldu = { - email = "mail@keldu.de"; - github = "keldu"; - githubId = 15373888; - name = "Claudius Holeksa"; - }; - ken-matsui = { - github = "ken-matsui"; - githubId = 26405363; - name = "Ken Matsui"; - keys = [{ - fingerprint = "3611 8CD3 6DE8 3334 B44A DDE4 1033 60B3 298E E433"; - }]; - }; - kennyballou = { - email = "kb@devnulllabs.io"; - github = "kennyballou"; - githubId = 2186188; - name = "Kenny Ballou"; - keys = [{ - fingerprint = "932F 3E8E 1C0F 4A98 95D7 B8B8 B0CA A28A 0295 8308"; - }]; - }; - kenran = { - email = "johannes.maier@mailbox.org"; - github = "kenranunderscore"; - githubId = 5188977; - matrix = "@kenran_:matrix.org"; - name = "Johannes Maier"; - }; - kentjames = { - email = "jameschristopherkent@gmail.com"; - github = "KentJames"; - githubId = 2029444; - name = "James Kent"; - }; - kephasp = { - email = "pierre@nothos.net"; - github = "kephas"; - githubId = 762421; - name = "Pierre Thierry"; - }; - ketzacoatl = { - email = "ketzacoatl@protonmail.com"; - github = "ketzacoatl"; - githubId = 10122937; - name = "ketzacoatl"; - }; - kevincox = { - email = "kevincox@kevincox.ca"; - matrix = "@kevincox:matrix.org"; - github = "kevincox"; - githubId = 494012; - name = "Kevin Cox"; - }; - kevingriffin = { - email = "me@kevin.jp"; - github = "kevingriffin"; - githubId = 209729; - name = "Kevin Griffin"; - }; - kevink = { - email = "kevin@kevink.dev"; - github = "Unkn0wnCat"; - githubId = 8211181; - name = "Kevin Kandlbinder"; - }; - kfears = { - email = "kfearsoff@gmail.com"; - github = "KFearsoff"; - githubId = 66781795; - matrix = "@kfears:matrix.org"; - name = "KFears"; - }; - kfollesdal = { - email = "kfollesdal@gmail.com"; - github = "kfollesdal"; - githubId = 546087; - name = "Kristoffer K. Føllesdal"; - }; - kho-dialga = { - email = "ivandashenyou@gmail.com"; - github = "Kho-Dialga"; - githubId = 55767703; - name = "Iván Brito"; - }; - khumba = { - email = "bog@khumba.net"; - github = "khumba"; - githubId = 788813; - name = "Bryan Gardiner"; - }; - khushraj = { - email = "khushraj.rathod@gmail.com"; - github = "khrj"; - githubId = 44947946; - name = "Khushraj Rathod"; - keys = [{ - fingerprint = "1988 3FD8 EA2E B4EC 0A93 1E22 B77B 2A40 E770 2F19"; - }]; - }; - KibaFox = { - email = "kiba.fox@foxypossibilities.com"; - github = "KibaFox"; - githubId = 16481032; - name = "Kiba Fox"; - }; - kidd = { - email = "raimonster@gmail.com"; - github = "kidd"; - githubId = 25607; - name = "Raimon Grau"; - }; - kidonng = { - email = "hi@xuann.wang"; - github = "kidonng"; - githubId = 44045911; - name = "Kid"; - }; - kidsan = { - github = "Kidsan"; - githubId = 8798449; - name = "kidsan"; - }; - kierdavis = { - email = "kierdavis@gmail.com"; - github = "kierdavis"; - githubId = 845652; - name = "Kier Davis"; - }; - kilimnik = { - email = "mail@kilimnik.de"; - github = "kilimnik"; - githubId = 5883283; - name = "Daniel Kilimnik"; - }; - killercup = { - email = "killercup@gmail.com"; - github = "killercup"; - githubId = 20063; - name = "Pascal Hertleif"; - }; - kiloreux = { - email = "kiloreux@gmail.com"; - github = "kiloreux"; - githubId = 6282557; - name = "Kiloreux Emperex"; - }; - kim0 = { - email = "email.ahmedkamal@googlemail.com"; - github = "kim0"; - githubId = 59667; - name = "Ahmed Kamal"; - }; - kimat = { - email = "mail@kimat.org"; - github = "kimat"; - githubId = 3081769; - name = "Kimat Boven"; - }; - kimburgess = { - email = "kim@acaprojects.com"; - github = "kimburgess"; - githubId = 843652; - name = "Kim Burgess"; - }; - kindrowboat = { - email = "hello@kindrobot.ca"; - github = "kindrowboat"; - githubId = 777773; - name = "Stef Dunlap"; - }; - kini = { - email = "keshav.kini@gmail.com"; - github = "kini"; - githubId = 691290; - name = "Keshav Kini"; - }; - kira-bruneau = { - email = "kira.bruneau@pm.me"; - name = "Kira Bruneau"; - github = "kira-bruneau"; - githubId = 382041; - }; - kirelagin = { - email = "kirelagin@gmail.com"; - matrix = "@kirelagin:matrix.org"; - github = "kirelagin"; - githubId = 451835; - name = "Kirill Elagin"; - }; - kirikaza = { - email = "k@kirikaza.ru"; - github = "kirikaza"; - githubId = 804677; - name = "Kirill Kazakov"; - }; - kirillrdy = { - email = "kirillrdy@gmail.com"; - github = "kirillrdy"; - githubId = 12160; - name = "Kirill Radzikhovskyy"; - }; - kiskae = { - github = "Kiskae"; - githubId = 546681; - name = "Jeroen van Leusen"; - }; - kisonecat = { - email = "kisonecat@gmail.com"; - github = "kisonecat"; - githubId = 148352; - name = "Jim Fowler"; - }; - kittywitch = { - email = "kat@inskip.me"; - github = "kittywitch"; - githubId = 67870215; - name = "Kat Inskip"; - keys = [{ - fingerprint = "9CC6 44B5 69CD A59B C874 C4C9 E8DD E3ED 1C90 F3A0"; - }]; - }; - kiwi = { - email = "envy1988@gmail.com"; - github = "Kiwi"; - githubId = 35715; - name = "Robert Djubek"; - keys = [{ - fingerprint = "8992 44FC D291 5CA2 0A97 802C 156C 88A5 B0A0 4B2A"; - }]; - }; - kjeremy = { - email = "kjeremy@gmail.com"; - name = "Jeremy Kolb"; - github = "kjeremy"; - githubId = 4325700; - }; - kkharji = { - name = "kkharji"; - email = "kkharji@protonmail.com"; - github = "kkharji"; - githubId = 65782666; - }; - klden = { - name = "Kenzyme Le"; - email = "kl@kenzymele.com"; - github = "klDen"; - githubId = 5478260; - }; - klntsky = { - email = "klntsky@gmail.com"; - name = "Vladimir Kalnitsky"; - github = "klntsky"; - githubId = 18447310; - }; - kloenk = { - email = "me@kloenk.dev"; - matrix = "@kloenk:petabyte.dev"; - name = "Finn Behrens"; - github = "Kloenk"; - githubId = 12898828; - keys = [{ - fingerprint = "6881 5A95 D715 D429 659B 48A4 B924 45CF C954 6F9D"; - }]; - }; - kmcopper = { - email = "kmcopper@danwin1210.me"; - name = "Kyle Copperfield"; - github = "kmcopper"; - githubId = 57132115; - }; - kmeakin = { - email = "karlwfmeakin@gmail.com"; - name = "Karl Meakin"; - github = "Kmeakin"; - githubId = 19665139; - }; - - kmein = { - email = "kmein@posteo.de"; - name = "Kierán Meinhardt"; - github = "kmein"; - githubId = 10352507; - }; - kmicklas = { - email = "maintainer@kmicklas.com"; - name = "Ken Micklas"; - github = "kmicklas"; - githubId = 929096; - }; - knairda = { - email = "adrian@kummerlaender.eu"; - name = "Adrian Kummerlaender"; - github = "KnairdA"; - githubId = 498373; - }; - knedlsepp = { - email = "josef.kemetmueller@gmail.com"; - github = "knedlsepp"; - githubId = 3287933; - name = "Josef Kemetmüller"; - }; - knl = { - email = "nikola@knezevic.co"; - github = "knl"; - githubId = 361496; - name = "Nikola Knežević"; - }; - kolaente = { - email = "k@knt.li"; - github = "kolaente"; - githubId = 13721712; - name = "Konrad Langenberg"; - }; - kolbycrouch = { - email = "kjc.devel@gmail.com"; - github = "kolbycrouch"; - githubId = 6346418; - name = "Kolby Crouch"; - }; - kolloch = { - email = "info@eigenvalue.net"; - github = "kolloch"; - githubId = 339354; - name = "Peter Kolloch"; - }; - konimex = { - email = "herdiansyah@netc.eu"; - github = "konimex"; - githubId = 15692230; - name = "Muhammad Herdiansyah"; - }; - konradmalik = { - email = "konrad.malik@gmail.com"; - matrix = "@konradmalik:matrix.org"; - name = "Konrad Malik"; - github = "konradmalik"; - githubId = 13033392; - }; - konst-aa = { - email = "konstantin.astafurov@gmail.com"; - github = "konst-aa"; - githubId = 40547702; - name = "Konstantin Astafurov"; - }; - koozz = { - email = "koozz@linux.com"; - github = "koozz"; - githubId = 264372; - name = "Jan van den Berg"; - }; - koral = { - email = "koral@mailoo.org"; - github = "k0ral"; - githubId = 524268; - name = "Koral"; - }; - koslambrou = { - email = "koslambrou@gmail.com"; - github = "koslambrou"; - githubId = 2037002; - name = "Konstantinos"; - }; - kototama = { - email = "kototama@posteo.jp"; - github = "kototama"; - githubId = 128620; - name = "Kototama"; - }; - kouyk = { - email = "skykinetic@stevenkou.xyz"; - github = "kouyk"; - githubId = 1729497; - name = "Steven Kou"; - }; - kovirobi = { - email = "kovirobi@gmail.com"; - github = "KoviRobi"; - githubId = 1903418; - name = "Kovacsics Robert"; - }; - kquick = { - email = "quick@sparq.org"; - github = "kquick"; - githubId = 787421; - name = "Kevin Quick"; - }; - kradalby = { - name = "Kristoffer Dalby"; - email = "kristoffer@dalby.cc"; - github = "kradalby"; - githubId = 98431; - }; - kraem = { - email = "me@kraem.xyz"; - github = "kraem"; - githubId = 26622971; - name = "Ronnie Ebrin"; - }; - kragniz = { - email = "louis@kragniz.eu"; - github = "kragniz"; - githubId = 735008; - name = "Louis Taylor"; - }; - kranurag7 = { - email = "contact.anurag7@gmail.com"; - github = "kranurag7"; - githubId = 81210977; - name = "Anurag"; - }; - kranzes = { - email = "personal@ilanjoselevich.com"; - github = "Kranzes"; - githubId = 56614642; - name = "Ilan Joselevich"; - }; - krav = { - email = "kristoffer@microdisko.no"; - github = "krav"; - githubId = 4032; - name = "Kristoffer Thømt Ravneberg"; - }; - kristian-brucaj = { - email = "kbrucaj@gmail.com"; - github = "Flameslice"; - githubId = 8893110; - name = "Kristian Brucaj"; - }; - kristoff3r = { - email = "k.soeholm@gmail.com"; - github = "kristoff3r"; - githubId = 160317; - name = "Kristoffer Søholm"; - }; - kritnich = { - email = "kritnich@kritni.ch"; - github = "Kritnich"; - githubId = 22116767; - name = "Kritnich"; - }; - kroell = { - email = "nixosmainter@makroell.de"; - github = "rokk4"; - githubId = 17659803; - name = "Matthias Axel Kröll"; - }; - krostar = { - email = "alexis.destrez@pm.me"; - github = "krostar"; - githubId = 5759930; - name = "Alexis Destrez"; - }; - ktf = { - email = "giulio.eulisse@cern.ch"; - github = "ktf"; - githubId = 10544; - name = "Giuluo Eulisse"; - }; - kthielen = { - email = "kthielen@gmail.com"; - github = "kthielen"; - githubId = 1409287; - name = "Kalani Thielen"; - }; - ktor = { - email = "kruszewsky@gmail.com"; - github = "ktor"; - githubId = 99639; - name = "Pawel Kruszewski"; - }; - kubukoz = { - email = "kubukoz@gmail.com"; - github = "kubukoz"; - githubId = 894884; - name = "Jakub Kozłowski"; - }; - kurnevsky = { - email = "kurnevsky@gmail.com"; - github = "kurnevsky"; - githubId = 2943605; - name = "Evgeny Kurnevsky"; - }; - kuwii = { - name = "kuwii"; - email = "kuwii.someone@gmail.com"; - github = "kuwii"; - githubId = 10705175; - }; - kuznero = { - email = "roman@kuznero.com"; - github = "kuznero"; - githubId = 449813; - name = "Roman Kuznetsov"; - }; - kwohlfahrt = { - email = "kai.wohlfahrt@gmail.com"; - github = "kwohlfahrt"; - githubId = 2422454; - name = "Kai Wohlfahrt"; - }; - kylehendricks = { - name = "Kyle Hendricks"; - email = "kyle-github@mail.hendricks.nu"; - github = "kylehendricks"; - githubId = 981958; - }; - kyleondy = { - email = "kyle@ondy.org"; - github = "KyleOndy"; - githubId = 1640900; - name = "Kyle Ondy"; - keys = [{ - fingerprint = "3C79 9D26 057B 64E6 D907 B0AC DB0E 3C33 491F 91C9"; - }]; - }; - kylesferrazza = { - name = "Kyle Sferrazza"; - email = "nixpkgs@kylesferrazza.com"; - - github = "kylesferrazza"; - githubId = 6677292; - - keys = [{ - fingerprint = "5A9A 1C9B 2369 8049 3B48 CF5B 81A1 5409 4816 2372"; - }]; - }; - l3af = { - email = "L3afMeAlon3@gmail.com"; - matrix = "@L3afMe:matrix.org"; - github = "L3afMe"; - githubId = 72546287; - name = "L3af"; - }; - laalsaas = { - email = "laalsaas@systemli.org"; - github = "laalsaas"; - githubId = 43275254; - name = "laalsaas"; - }; - lach = { - email = "iam@lach.pw"; - github = "CertainLach"; - githubId = 6235312; - keys = [{ - fingerprint = "323C 95B5 DBF7 2D74 8570 C0B7 40B5 D694 8143 175F"; - }]; - name = "Yaroslav Bolyukin"; - }; - lafrenierejm = { - email = "joseph@lafreniere.xyz"; - github = "lafrenierejm"; - githubId = 11155300; - keys = [{ - fingerprint = "0375 DD9A EDD1 68A3 ADA3 9EBA EE23 6AA0 141E FCA3"; - }]; - name = "Joseph LaFreniere"; - }; - laikq = { - email = "gwen@quasebarth.de"; - github = "laikq"; - githubId = 55911173; - name = "Gwendolyn Quasebarth"; - }; - lambda-11235 = { - email = "taranlynn0@gmail.com"; - github = "lambda-11235"; - githubId = 16354815; - name = "Taran Lynn"; - }; - lammermann = { - email = "k.o.b.e.r@web.de"; - github = "lammermann"; - githubId = 695526; - name = "Benjamin Kober"; - }; - larsr = { - email = "Lars.Rasmusson@gmail.com"; - github = "larsr"; - githubId = 182024; - name = "Lars Rasmusson"; - }; - l-as = { - email = "las@protonmail.ch"; - matrix = "@Las:matrix.org"; - github = "L-as"; - githubId = 22075344; - keys = [{ - fingerprint = "A093 EA17 F450 D4D1 60A0 1194 AC45 8A7D 1087 D025"; - }]; - name = "Las Safin"; - }; - lasandell = { - email = "lasandell@gmail.com"; - github = "lasandell"; - githubId = 2034420; - name = "Luke Sandell"; - }; - lassulus = { - email = "lassulus@gmail.com"; - matrix = "@lassulus:lassul.us"; - github = "Lassulus"; - githubId = 621759; - name = "Lassulus"; - }; - layus = { - email = "layus.on@gmail.com"; - github = "layus"; - githubId = 632767; - name = "Guillaume Maudoux"; - }; - lblasc = { - email = "lblasc@znode.net"; - github = "lblasc"; - githubId = 32152; - name = "Luka Blaskovic"; - }; - lbpdt = { - email = "nix@pdtpartners.com"; - github = "lbpdt"; - githubId = 45168934; - name = "Louis Blin"; - }; - lde = { - email = "lilian.deloche@puck.fr"; - github = "lde"; - githubId = 1447020; - name = "Lilian Deloche"; - }; - ldelelis = { - email = "ldelelis@est.frba.utn.edu.ar"; - github = "ldelelis"; - githubId = 20250323; - name = "Lucio Delelis"; - }; - ldenefle = { - email = "ldenefle@gmail.com"; - github = "ldenefle"; - githubId = 20558127; - name = "Lucas Denefle"; - }; - ldesgoui = { - email = "ldesgoui@gmail.com"; - matrix = "@ldesgoui:matrix.org"; - github = "ldesgoui"; - githubId = 2472678; - name = "Lucas Desgouilles"; - }; - league = { - email = "league@contrapunctus.net"; - github = "league"; - githubId = 50286; - name = "Christopher League"; - }; - leahneukirchen = { - email = "leah@vuxu.org"; - github = "leahneukirchen"; - githubId = 139; - name = "Leah Neukirchen"; - }; - lebastr = { - email = "lebastr@gmail.com"; - github = "lebastr"; - githubId = 887072; - name = "Alexander Lebedev"; - }; - ledif = { - email = "refuse@gmail.com"; - github = "ledif"; - githubId = 307744; - name = "Adam Fidel"; - }; - leemachin = { - email = "me@mrl.ee"; - github = "leemeichin"; - githubId = 736291; - name = "Lee Machin"; - }; - leenaars = { - email = "ml.software@leenaa.rs"; - github = "leenaars"; - githubId = 4158274; - name = "Michiel Leenaars"; - }; - leifhelm = { - email = "jakob.leifhelm@gmail.com"; - github = "leifhelm"; - githubId = 31693262; - name = "Jakob Leifhelm"; - keys =[{ - fingerprint = "4A82 F68D AC07 9FFD 8BF0 89C4 6817 AA02 3810 0822"; - }]; - }; - leixb = { - email = "abone9999+nixpkgs@gmail.com"; - matrix = "@leix_b:matrix.org"; - github = "Leixb"; - githubId = 17183803; - name = "Aleix Boné"; - keys = [{ - fingerprint = "63D3 F436 EDE8 7E1F 1292 24AF FC03 5BB2 BB28 E15D"; - }]; - }; - lejonet = { - email = "daniel@kuehn.se"; - github = "lejonet"; - githubId = 567634; - name = "Daniel Kuehn"; - }; - leo60228 = { - email = "leo@60228.dev"; - matrix = "@leo60228:matrix.org"; - github = "leo60228"; - githubId = 8355305; - name = "leo60228"; - keys = [{ - fingerprint = "5BE4 98D5 1C24 2CCD C21A 4604 AC6F 4BA0 78E6 7833"; - }]; - }; - leona = { - email = "nix@leona.is"; - github = "leona-ya"; - githubId = 11006031; - name = "Leona Maroni"; - }; - leonardoce = { - email = "leonardo.cecchi@gmail.com"; - github = "leonardoce"; - githubId = 1572058; - name = "Leonardo Cecchi"; - }; - leshainc = { - email = "leshainc@fomalhaut.me"; - github = "LeshaInc"; - githubId = 42153076; - name = "Alexey Nikashkin"; - }; - lesuisse = { - email = "thomas@gerbet.me"; - github = "LeSuisse"; - githubId = 737767; - name = "Thomas Gerbet"; - }; - lethalman = { - email = "lucabru@src.gnome.org"; - github = "lethalman"; - githubId = 480920; - name = "Luca Bruno"; - }; - leungbk = { - email = "leungbk@mailfence.com"; - github = "leungbk"; - githubId = 29217594; - name = "Brian Leung"; - }; - lewo = { - email = "lewo@abesis.fr"; - matrix = "@lewo:matrix.org"; - github = "nlewo"; - githubId = 3425311; - name = "Antoine Eiche"; - }; - lexuge = { - name = "Harry Ying"; - email = "lexugeyky@outlook.com"; - github = "LEXUGE"; - githubId = 13804737; - keys = [{ - fingerprint = "7FE2 113A A08B 695A C8B8 DDE6 AE53 B4C2 E58E DD45"; - }]; - }; - lf- = { - email = "nix-maint@lfcode.ca"; - github = "lf-"; - githubId = 6652840; - name = "Jade"; - }; - lgcl = { - email = "dev@lgcl.de"; - name = "Leon Vack"; - github = "LogicalOverflow"; - githubId = 5919957; - }; - lheckemann = { - email = "git@sphalerite.org"; - github = "lheckemann"; - githubId = 341954; - name = "Linus Heckemann"; - }; - lhvwb = { - email = "nathaniel.baxter@gmail.com"; - github = "nathanielbaxter"; - githubId = 307589; - name = "Nathaniel Baxter"; - }; - liamdiprose = { - email = "liam@liamdiprose.com"; - github = "liamdiprose"; - githubId = 1769386; - name = "Liam Diprose"; - }; - libjared = { - email = "jared@perrycode.com"; - github = "libjared"; - githubId = 3746656; - matrix = "@libjared:matrix.org"; - name = "Jared Perry"; - }; - liff = { - email = "liff@iki.fi"; - github = "liff"; - githubId = 124475; - name = "Olli Helenius"; - }; - lightbulbjim = { - email = "chris@killred.net"; - github = "lightbulbjim"; - githubId = 4312404; - name = "Chris Rendle-Short"; - }; - lightdiscord = { - email = "root@arnaud.sh"; - github = "lightdiscord"; - githubId = 24509182; - name = "Arnaud Pascal"; - }; - lightquantum = { - email = "self@lightquantum.me"; - github = "PhotonQuantum"; - githubId = 18749973; - name = "Yanning Chen"; - matrix = "@self:lightquantum.me"; - }; - lihop = { - email = "nixos@leroy.geek.nz"; - github = "lihop"; - githubId = 3696783; - name = "Leroy Hopson"; - }; - lillycham = { - email = "lillycat332@gmail.com"; - github = "lillycat332"; - githubId = 54189319; - name = "Lilly Cham"; - }; - lilyball = { - email = "lily@sb.org"; - github = "lilyball"; - githubId = 714; - name = "Lily Ballard"; - }; - lilyinstarlight = { - email = "lily@lily.flowers"; - matrix = "@lily:lily.flowers"; - github = "lilyinstarlight"; - githubId = 298109; - name = "Lily Foster"; - }; - limeytexan = { - email = "limeytexan@gmail.com"; - github = "limeytexan"; - githubId = 36448130; - name = "Michael Brantley"; - }; - linc01n = { - email = "git@lincoln.hk"; - github = "linc01n"; - githubId = 667272; - name = "Lincoln Lee"; - }; - linj = { - name = "Lin Jian"; - email = "me@linj.tech"; - matrix = "@me:linj.tech"; - github = "jian-lin"; - githubId = 75130626; - keys = [{ - fingerprint = "80EE AAD8 43F9 3097 24B5 3D7E 27E9 7B91 E63A 7FF8"; - }]; - }; - linquize = { - email = "linquize@yahoo.com.hk"; - github = "linquize"; - githubId = 791115; - name = "Linquize"; - }; - linsui = { - email = "linsui555@gmail.com"; - github = "linsui"; - githubId = 36977733; - name = "linsui"; - }; - linus = { - email = "linusarver@gmail.com"; - github = "listx"; - githubId = 725613; - name = "Linus Arver"; - }; - lionello = { - email = "lio@lunesu.com"; - github = "lionello"; - githubId = 591860; - name = "Lionello Lunesu"; - }; - livnev = { - email = "lev@liv.nev.org.uk"; - github = "livnev"; - githubId = 3964494; - name = "Lev Livnev"; - keys = [{ - fingerprint = "74F5 E5CC 19D3 B5CB 608F 6124 68FF 81E6 A785 0F49"; - }]; - }; - lluchs = { - email = "lukas.werling@gmail.com"; - github = "lluchs"; - githubId = 516527; - name = "Lukas Werling"; - }; - lnl7 = { - email = "daiderd@gmail.com"; - github = "LnL7"; - githubId = 689294; - name = "Daiderd Jordan"; - }; - lo1tuma = { - email = "schreck.mathias@gmail.com"; - github = "lo1tuma"; - githubId = 169170; - name = "Mathias Schreck"; - }; - locallycompact = { - email = "dan.firth@homotopic.tech"; - github = "locallycompact"; - githubId = 1267527; - name = "Daniel Firth"; - }; - lockejan = { - email = "git@smittie.de"; - matrix = "@jan:smittie.de"; - github = "lockejan"; - githubId = 25434434; - name = "Jan Schmitt"; - keys = [{ - fingerprint = "1763 9903 2D7C 5B82 5D5A 0EAD A2BC 3C6F 1435 1991"; - }]; - }; - lodi = { - email = "anthony.lodi@gmail.com"; - github = "lodi"; - githubId = 918448; - name = "Anthony Lodi"; - }; - loewenheim = { - email = "loewenheim@mailbox.org"; - github = "loewenheim"; - githubId = 7622248; - name = "Sebastian Zivota"; - }; - logo = { - email = "logo4poop@protonmail.com"; - matrix = "@logo4poop:matrix.org"; - github = "logo4poop"; - githubId = 24994565; - name = "Isaac Silverstein"; - }; - loicreynier = { - email = "loic@loicreynier.fr"; - github = "loicreynier"; - githubId = 88983487; - name = "Loïc Reynier"; - }; - lom = { - email = "legendofmiracles@protonmail.com"; - matrix = "@legendofmiracles:matrix.org"; - github = "legendofmiracles"; - githubId = 30902201; - name = "legendofmiracles"; - keys = [{ - fingerprint = "CC50 F82C 985D 2679 0703 AF15 19B0 82B3 DEFE 5451"; - }]; - }; - longer = { - email = "michal@mieszczak.com.pl"; - name = "Michał Mieszczak"; - github = "LongerHV"; - githubId = 46924944; - }; - lopsided98 = { - email = "benwolsieffer@gmail.com"; - github = "lopsided98"; - githubId = 5624721; - name = "Ben Wolsieffer"; - }; - lorenz = { - name = "Lorenz Brun"; - email = "lorenz@brun.one"; - github = "lorenz"; - githubId = 5228892; - }; - lorenzleutgeb = { - email = "lorenz@leutgeb.xyz"; - github = "lorenzleutgeb"; - githubId = 542154; - name = "Lorenz Leutgeb"; - }; - loskutov = { - email = "ignat.loskutov@gmail.com"; - github = "loskutov"; - githubId = 1202012; - name = "Ignat Loskutov"; - }; - lostnet = { - email = "lost.networking@gmail.com"; - github = "lostnet"; - githubId = 1422781; - name = "Will Young"; - }; - louisdk1 = { - email = "louis@louis.dk"; - github = "LouisDK1"; - githubId = 4969294; - name = "Louis Tim Larsen"; - }; - lourkeur = { - name = "Louis Bettens"; - email = "louis@bettens.info"; - github = "lourkeur"; - githubId = 15657735; - keys = [{ - fingerprint = "5B93 9CFA E8FC 4D8F E07A 3AEA DFE1 D4A0 1733 7E2A"; - }]; - }; - loveisgrief = { - name = "LoveIsGrief"; - email = "loveisgrief@tuta.io"; - github = "LoveIsGrief"; - githubId = 2829538; - keys = [{ - fingerprint = "9847 4F48 18C6 4E0A F0C5 3529 E96D 1EDF A053 45EB"; - }]; - }; - lovek323 = { - email = "jason@oconal.id.au"; - github = "lovek323"; - githubId = 265084; - name = "Jason O'Conal"; - }; - lovesegfault = { - email = "meurerbernardo@gmail.com"; - matrix = "@lovesegfault:matrix.org"; - github = "lovesegfault"; - githubId = 7243783; - name = "Bernardo Meurer"; - keys = [{ - fingerprint = "F193 7596 57D5 6DA4 CCD4 786B F4C0 D53B 8D14 C246"; - }]; - }; - lowfatcomputing = { - email = "andreas.wagner@lowfatcomputing.org"; - github = "lowfatcomputing"; - githubId = 10626; - name = "Andreas Wagner"; - }; - lrewega = { - email = "lrewega@c32.ca"; - github = "lrewega"; - githubId = 639066; - name = "Luke Rewega"; - }; - lromor = { - email = "leonardo.romor@gmail.com"; - github = "lromor"; - githubId = 1597330; - name = "Leonardo Romor"; - }; - lschuermann = { - email = "leon.git@is.currently.online"; - matrix = "@leons:is.currently.online"; - github = "lschuermann"; - githubId = 5341193; - name = "Leon Schuermann"; - }; - lsix = { - email = "lsix@lancelotsix.com"; - github = "lsix"; - githubId = 724339; - name = "Lancelot SIX"; - }; - ltavard = { - email = "laure.tavard@univ-grenoble-alpes.fr"; - github = "ltavard"; - githubId = 8555953; - name = "Laure Tavard"; - }; - luc65r = { - email = "lucas@ransan.tk"; - github = "luc65r"; - githubId = 59375051; - name = "Lucas Ransan"; - }; - lucasew = { - email = "lucas59356@gmail.com"; - github = "lucasew"; - githubId = 15693688; - name = "Lucas Eduardo Wendt"; - }; - lucc = { - email = "lucc+nix@posteo.de"; - github = "lucc"; - githubId = 1104419; - name = "Lucas Hoffmann"; - }; - lucperkins = { - email = "lucperkins@gmail.com"; - github = "lucperkins"; - githubId = 1523104; - name = "Luc Perkins"; - }; - lucus16 = { - email = "lars.jellema@gmail.com"; - github = "Lucus16"; - githubId = 2487922; - name = "Lars Jellema"; - }; - ludo = { - email = "ludo@gnu.org"; - github = "civodul"; - githubId = 1168435; - name = "Ludovic Courtès"; - }; - lufia = { - email = "lufia@lufia.org"; - github = "lufia"; - githubId = 1784379; - name = "Kyohei Kadota"; - }; - Luflosi = { - name = "Luflosi"; - email = "luflosi@luflosi.de"; - github = "Luflosi"; - githubId = 15217907; - keys = [{ - fingerprint = "66D1 3048 2B5F 2069 81A6 6B83 6F98 7CCF 224D 20B9"; - }]; - }; - lugarun = { - email = "lfschmidt.me@gmail.com"; - github = "lugarun"; - githubId = 5767106; - name = "Lukas Schmidt"; - }; - luis = { - email = "luis.nixos@gmail.com"; - github = "Luis-Hebendanz"; - githubId = 22085373; - name = "Luis Hebendanz"; - }; - luispedro = { - email = "luis@luispedro.org"; - github = "luispedro"; - githubId = 79334; - name = "Luis Pedro Coelho"; - }; - luizirber = { - email = "nixpkgs@luizirber.org"; - github = "luizirber"; - githubId = 6642; - name = "Luiz Irber"; - }; - luizribeiro = { - email = "nixpkgs@l9o.dev"; - matrix = "@luizribeiro:matrix.org"; - name = "Luiz Ribeiro"; - github = "luizribeiro"; - githubId = 112069; - keys = [{ - fingerprint = "97A0 AE5E 03F3 499B 7D7A 65C6 76A4 1432 37EF 5817"; - }]; - }; - lukeadams = { - email = "luke.adams@belljar.io"; - github = "lukeadams"; - githubId = 3508077; - name = "Luke Adams"; - }; - lukebfox = { - email = "lbentley-fox1@sheffield.ac.uk"; - github = "lukebfox"; - githubId = 34683288; - name = "Luke Bentley-Fox"; - }; - lukegb = { - email = "nix@lukegb.com"; - matrix = "@lukegb:zxcvbnm.ninja"; - github = "lukegb"; - githubId = 246745; - name = "Luke Granger-Brown"; - }; - lukego = { - email = "luke@snabb.co"; - github = "lukego"; - githubId = 13791; - name = "Luke Gorrie"; - }; - luker = { - email = "luker@fenrirproject.org"; - github = "LucaFulchir"; - githubId = 2486026; - name = "Luca Fulchir"; - }; - lumi = { - email = "lumi@pew.im"; - github = "lumi-me-not"; - githubId = 26020062; - name = "lumi"; - }; - lunarequest = { - email = "nullarequest@vivlaid.net"; - github = "Lunarequest"; - githubId = 30698906; - name = "Luna D Dragon"; - }; - lunik1 = { - email = "ch.nixpkgs@themaw.xyz"; - matrix = "@lunik1:lunik.one"; - github = "lunik1"; - githubId = 13547699; - name = "Corin Hoad"; - keys = [{ - # fingerprint = "BA3A 5886 AE6D 526E 20B4 57D6 6A37 DF94 8318 8492"; # old key, superseded - fingerprint = "6E69 6A19 4BD8 BFAE 7362 ACDB 6437 4619 95CA 7F16"; - }]; - }; - LunNova = { - email = "nixpkgs-maintainer@lunnova.dev"; - github = "LunNova"; - githubId = 782440; - name = "Luna Nova"; - }; - lux = { - email = "lux@lux.name"; - github = "luxzeitlos"; - githubId = 1208273; - matrix = "@lux:ontheblueplanet.com"; - name = "Lux"; - }; - luz = { - email = "luz666@daum.net"; - github = "Luz"; - githubId = 208297; - name = "Luz"; - }; - lw = { - email = "lw@fmap.me"; - github = "lolwat97"; - githubId = 2057309; - name = "Sergey Sofeychuk"; - }; - lx = { - email = "alex@adnab.me"; - github = "Alexis211"; - githubId = 101484; - matrix = "@lx:deuxfleurs.fr"; - name = "Alex Auvolat"; - }; - lxea = { - email = "nix@amk.ie"; - github = "lxea"; - githubId = 7910815; - name = "Alex McGrath"; - }; - lynty = { - email = "ltdong93+nix@gmail.com"; - github = "Lynty"; - githubId = 39707188; - name = "Lynn Dong"; - }; - m00wl = { - name = "Moritz Lumme"; - email = "moritz.lumme@gmail.com"; - github = "m00wl"; - githubId = 46034439; - }; - m1cr0man = { - email = "lucas+nix@m1cr0man.com"; - github = "m1cr0man"; - githubId = 3044438; - name = "Lucas Savva"; - }; - ma27 = { - email = "maximilian@mbosch.me"; - matrix = "@ma27:nicht-so.sexy"; - github = "Ma27"; - githubId = 6025220; - name = "Maximilian Bosch"; - keys = [{ - fingerprint = "62B9 9C26 F046 721E 26B0 04F6 D006 A998 C6AB FDF1"; - }]; - }; - ma9e = { - email = "sean@lfo.team"; - github = "furrycatherder"; - githubId = 36235154; - name = "Sean Haugh"; - }; - maaslalani = { - email = "maaslalani0@gmail.com"; - github = "maaslalani"; - githubId = 42545625; - name = "Maas Lalani"; - }; - macalinao = { - email = "me@ianm.com"; - name = "Ian Macalinao"; - github = "macalinao"; - githubId = 401263; - keys = [{ - fingerprint = "1147 43F1 E707 6F3E 6F4B 2C96 B9A8 B592 F126 F8E8"; - }]; - }; - maddiethecafebabe = { - email = "maddie@cafebabe.date"; - github = "maddiethecafebabe"; - githubId = 75337286; - name = "Madeline S."; - }; - madjar = { - email = "georges.dubus@compiletoi.net"; - github = "madjar"; - githubId = 109141; - name = "Georges Dubus"; - }; - madonius = { - email = "nixos@madoni.us"; - github = "madonius"; - githubId = 1246752; - name = "madonius"; - matrix = "@madonius:entropia.de"; - }; - Madouura = { - email = "madouura@gmail.com"; - github = "Madouura"; - githubId = 93990818; - name = "Madoura"; - }; - mafo = { - email = "Marc.Fontaine@gmx.de"; - github = "MarcFontaine"; - githubId = 1433367; - name = "Marc Fontaine"; - }; - magenbluten = { - email = "magenbluten@codemonkey.cc"; - github = "magenbluten"; - githubId = 1140462; - name = "magenbluten"; - }; - maggesi = { - email = "marco.maggesi@gmail.com"; - github = "maggesi"; - githubId = 1809783; - name = "Marco Maggesi"; - }; - magnetophon = { - email = "bart@magnetophon.nl"; - github = "magnetophon"; - githubId = 7645711; - name = "Bart Brouns"; - }; - magnouvean = { - email = "rg0zjsyh@anonaddy.me"; - github = "magnouvean"; - githubId = 85435692; - name = "Maxwell Berg"; - }; - mahe = { - email = "matthias.mh.herrmann@gmail.com"; - github = "2chilled"; - githubId = 1238350; - name = "Matthias Herrmann"; - }; - mahmoudk1000 = { - email = "mahmoudk1000@gmail.com"; - github = "mahmoudk1000"; - githubId = 24735185; - name = "Mahmoud Ayman"; - }; - majesticmullet = { - email = "hoccthomas@gmail.com.au"; - github = "MajesticMullet"; - githubId = 31056089; - name = "Tom Ho"; - }; - majewsky = { - email = "majewsky@gmx.net"; - github = "majewsky"; - githubId = 24696; - name = "Stefan Majewsky"; - }; - majiir = { - email = "majiir@nabaal.net"; - github = "Majiir"; - githubId = 963511; - name = "Majiir Paktu"; - }; - makefu = { - email = "makefu@syntax-fehler.de"; - github = "makefu"; - githubId = 115218; - name = "Felix Richter"; - }; - MakiseKurisu = { - github = "MakiseKurisu"; - githubId = 2321672; - name = "Makise Kurisu"; - }; - malbarbo = { - email = "malbarbo@gmail.com"; - github = "malbarbo"; - githubId = 1678126; - name = "Marco A L Barbosa"; - }; - malo = { - email = "mbourgon@gmail.com"; - github = "malob"; - githubId = 2914269; - name = "Malo Bourgon"; - }; - malte-v = { - email = "nixpkgs@mal.tc"; - github = "malte-v"; - githubId = 34393802; - name = "Malte Voos"; - }; - malyn = { - email = "malyn@strangeGizmo.com"; - github = "malyn"; - githubId = 346094; - name = "Michael Alyn Miller"; - }; - manojkarthick = { - email = "smanojkarthick@gmail.com"; - github = "manojkarthick"; - githubId = 7802795; - name = "Manoj Karthick"; - }; - manveru = { - email = "m.fellinger@gmail.com"; - matrix = "@manveru:matrix.org"; - github = "manveru"; - githubId = 3507; - name = "Michael Fellinger"; - }; - maralorn = { - email = "mail@maralorn.de"; - matrix = "@maralorn:maralorn.de"; - github = "maralorn"; - githubId = 1651325; - name = "maralorn"; - }; - marcus7070 = { - email = "marcus@geosol.com.au"; - github = "marcus7070"; - githubId = 50230945; - name = "Marcus Boyd"; - }; - marcusramberg = { - email = "marcus@means.no"; - github = "marcusramberg"; - githubId = 5526; - name = "Marcus Ramberg"; - }; - marcweber = { - email = "marco-oweber@gmx.de"; - github = "MarcWeber"; - githubId = 34086; - name = "Marc Weber"; - }; - marenz = { - email = "marenz@arkom.men"; - github = "marenz2569"; - githubId = 12773269; - name = "Markus Schmidl"; - }; - mariaa144 = { - email = "speechguard_intensivist@aleeas.com"; - github = "mariaa144"; - githubId = 105451387; - name = "Maria"; - }; - marijanp = { - name = "Marijan Petričević"; - email = "marijan.petricevic94@gmail.com"; - github = "marijanp"; - githubId = 13599169; - }; - marius851000 = { - email = "mariusdavid@laposte.net"; - name = "Marius David"; - github = "marius851000"; - githubId = 22586596; - }; - markbeep = { - email = "mrkswrn@gmail.com"; - github = "markbeep"; - githubId = 20665331; - name = "Mark"; - }; - markus1189 = { - email = "markus1189@gmail.com"; - github = "markus1189"; - githubId = 591567; - name = "Markus Hauck"; - }; - markuskowa = { - email = "markus.kowalewski@gmail.com"; - github = "markuskowa"; - githubId = 26470037; - name = "Markus Kowalewski"; - }; - marsam = { - github = "marsam"; - githubId = 65531; - name = "Mario Rodas"; - }; - marsupialgutz = { - email = "mars@possums.xyz"; - github = "pupbrained"; - githubId = 33522919; - name = "Marshall Arruda"; - }; - martfont = { - name = "Martino Fontana"; - email = "tinozzo123@tutanota.com"; - github = "SuperSamus"; - githubId = 40663462; - }; - martijnvermaat = { - email = "martijn@vermaat.name"; - github = "martijnvermaat"; - githubId = 623509; - name = "Martijn Vermaat"; - }; - martinetd = { - email = "f.ktfhrvnznqxacf@noclue.notk.org"; - github = "martinetd"; - githubId = 1729331; - name = "Dominique Martinet"; - }; - martingms = { - email = "martin@mg.am"; - github = "martingms"; - githubId = 458783; - name = "Martin Gammelsæter"; - }; - martinramm = { - email = "martin-ramm@gmx.de"; - github = "MartinRamm"; - githubId = 31626748; - name = "Martin Ramm"; - }; - marzipankaiser = { - email = "nixos@gaisseml.de"; - github = "marzipankaiser"; - githubId = 2551444; - name = "Marcial Gaißert"; - keys = [{ - fingerprint = "B573 5118 0375 A872 FBBF 7770 B629 036B E399 EEE9"; - }]; - }; - masaeedu = { - email = "masaeedu@gmail.com"; - github = "masaeedu"; - githubId = 3674056; - name = "Asad Saeeduddin"; - }; - masipcat = { - email = "jordi@masip.cat"; - github = "masipcat"; - githubId = 775189; - name = "Jordi Masip"; - }; - MaskedBelgian = { - email = "michael.colicchia@imio.be"; - github = "MaskedBelgian"; - githubId = 29855073; - name = "Michael Colicchia"; - }; - matejc = { - email = "cotman.matej@gmail.com"; - github = "matejc"; - githubId = 854770; - name = "Matej Cotman"; - }; - mateodd25 = { - email = "mateodd@icloud.com"; - github = "mateodd25"; - githubId = 7878181; - name = "Mateo Diaz"; - }; - math-42 = { - email = "matheus.4200@gmail.com"; - github = "Math-42"; - githubId = 43853194; - name = "Matheus Vieira"; - }; - mathiassven = { - email = "github@mathiassven.com"; - github = "MathiasSven"; - githubId = 24759037; - name = "Mathias Sven"; - }; - mathnerd314 = { - email = "mathnerd314.gph+hs@gmail.com"; - github = "Mathnerd314"; - githubId = 322214; - name = "Mathnerd314"; - }; - matklad = { - email = "aleksey.kladov@gmail.com"; - github = "matklad"; - githubId = 1711539; - name = "matklad"; - }; - matrss = { - name = "Matthias Riße"; - email = "matthias.risze@t-online.de"; - github = "matrss"; - githubId = 9308656; - }; - mattchrist = { - email = "nixpkgs-matt@christ.systems"; - github = "mattchrist"; - githubId = 952712; - name = "Matt Christ"; - }; - matthewbauer = { - email = "mjbauer95@gmail.com"; - github = "matthewbauer"; - githubId = 19036; - name = "Matthew Bauer"; - }; - matthewcroughan = { - email = "matt@croughan.sh"; - github = "MatthewCroughan"; - githubId = 26458780; - name = "Matthew Croughan"; - }; - matthew-levan = { - email = "matthew@coeli.network"; - github = "matthew-levan"; - githubId = 91502660; - name = "Matthew LeVan"; - }; - matthewpi = { - email = "me+nix@matthewp.io"; - github = "matthewpi"; - githubId = 26559841; - name = "Matthew Penner"; - keys = [{ - fingerprint = "5118 F1CC B7B0 6C17 4DD1 5267 3131 1906 AD4C F6D6"; - }]; - }; - matthiasbenaets = { - email = "matthias.benaets@gmail.com"; - github = "MatthiasBenaets"; - githubId = 89214559; - name = "Matthias Benaets"; - }; - matthiasbeyer = { - email = "mail@beyermatthias.de"; - matrix = "@musicmatze:beyermatthi.as"; - github = "matthiasbeyer"; - githubId = 427866; - name = "Matthias Beyer"; - }; - MatthieuBarthel = { - email = "matthieu@imatt.ch"; - name = "Matthieu Barthel"; - github = "MatthieuBarthel"; - githubId = 435534; - keys = [{ - fingerprint = "80EB 0F2B 484A BB80 7BEF 4145 BA23 F10E AADC 2E26"; - }]; - }; - matthuszagh = { - email = "huszaghmatt@gmail.com"; - github = "matthuszagh"; - githubId = 7377393; - name = "Matt Huszagh"; - }; - matti-kariluoma = { - email = "matti@kariluo.ma"; - github = "matti-kariluoma"; - githubId = 279868; - name = "Matti Kariluoma"; - }; - matt-snider = { - email = "matt.snider@protonmail.com"; - github = "matt-snider"; - githubId = 11810057; - name = "Matt Snider"; - }; - maurer = { - email = "matthew.r.maurer+nix@gmail.com"; - github = "maurer"; - githubId = 136037; - name = "Matthew Maurer"; - }; - mausch = { - email = "mauricioscheffer@gmail.com"; - github = "mausch"; - githubId = 95194; - name = "Mauricio Scheffer"; - }; - maxbrunet = { - email = "max@brnt.mx"; - github = "maxbrunet"; - githubId = 32458727; - name = "Maxime Brunet"; - keys = [{ - fingerprint = "E9A2 EE26 EAC6 B3ED 6C10 61F3 4379 62FF 87EC FE2B"; - }]; - }; - maxdamantus = { - email = "maxdamantus@gmail.com"; - github = "Maxdamantus"; - githubId = 502805; - name = "Max Zerzouri"; - }; - maxeaubrey = { - email = "maxeaubrey@gmail.com"; - github = "maxeaubrey"; - githubId = 35892750; - name = "Maxine Aubrey"; - }; - maxhbr = { - email = "nixos@maxhbr.dev"; - github = "maxhbr"; - githubId = 1187050; - name = "Maximilian Huber"; - }; - maxhero = { - email = "contact@maxhero.dev"; - github = "themaxhero"; - githubId = 4708337; - name = "Marcelo A. de L. Santos"; - }; - maxhille = { - email = "mh@lambdasoup.com"; - github = "maxhille"; - githubId = 693447; - name = "Max Hille"; - }; - maximsmol = { - email = "maximsmol@gmail.com"; - github = "maximsmol"; - githubId = 1472826; - name = "Max Smolin"; - }; - max-niederman = { - email = "max@maxniederman.com"; - github = "max-niederman"; - githubId = 19580458; - name = "Max Niederman"; - keys = [{ - fingerprint = "1DE4 424D BF77 1192 5DC4 CF5E 9AED 8814 81D8 444E"; - }]; - }; - maxux = { - email = "root@maxux.net"; - github = "maxux"; - githubId = 4141584; - name = "Maxime Daniel"; - }; - maxwell-lt = { - email = "maxwell.lt@live.com"; - github = "Maxwell-lt"; - githubId = 17859747; - name = "Maxwell L-T"; - }; - maxwilson = { - email = "nixpkgs@maxwilson.dev"; - github = "mwilsoncoding"; - githubId = 43796009; - name = "Max Wilson"; - }; - maxxk = { - email = "maxim.krivchikov@gmail.com"; - github = "maxxk"; - githubId = 1191859; - name = "Maxim Krivchikov"; - }; - MayNiklas = { - email = "info@niklas-steffen.de"; - github = "MayNiklas"; - githubId = 44636701; - name = "Niklas Steffen"; - }; - mazurel = { - email = "mateusz.mazur@yahoo.com"; - github = "Mazurel"; - githubId = 22836301; - name = "Mateusz Mazur"; - }; - mbaeten = { - github = "mbaeten"; - githubId = 2649304; - name = "M. Baeten"; - }; - mbaillie = { - email = "martin@baillie.id"; - github = "martinbaillie"; - githubId = 613740; - name = "Martin Baillie"; - }; - mbbx6spp = { - email = "me@susanpotter.net"; - github = "mbbx6spp"; - githubId = 564; - name = "Susan Potter"; - }; - mbe = { - email = "brandonedens@gmail.com"; - github = "brandonedens"; - githubId = 396449; - name = "Brandon Edens"; - }; - mbode = { - email = "maxbode@gmail.com"; - github = "mbode"; - githubId = 9051309; - name = "Maximilian Bode"; - }; - mboes = { - email = "mboes@tweag.net"; - github = "mboes"; - githubId = 51356; - name = "Mathieu Boespflug"; - }; - mbprtpmnr = { - name = "mbprtpmnr"; - email = "mbprtpmnr@pm.me"; - github = "mbprtpmnr"; - githubId = 88109321; - }; - mbrgm = { - email = "marius@yeai.de"; - github = "mbrgm"; - githubId = 2971615; - name = "Marius Bergmann"; - }; - mcaju = { - email = "cajum.bugs@yandex.com"; - github = "CajuM"; - githubId = 10420834; - name = "Mihai-Drosi Caju"; - }; - mcbeth = { - email = "mcbeth@broggs.org"; - github = "mcbeth"; - githubId = 683809; - name = "Jeffrey Brent McBeth"; - }; - mcmtroffaes = { - email = "matthias.troffaes@gmail.com"; - github = "mcmtroffaes"; - githubId = 158568; - name = "Matthias C. M. Troffaes"; - }; - McSinyx = { - email = "mcsinyx@disroot.org"; - github = "McSinyx"; - githubId = 13689192; - name = "Nguyễn Gia Phong"; - keys = [{ - fingerprint = "E90E 11B8 0493 343B 6132 E394 2714 8B2C 06A2 224B"; - }]; - }; - mcwitt = { - email = "mcwitt@gmail.com"; - github = "mcwitt"; - githubId = 319411; - name = "Matt Wittmann"; - }; - mdaiter = { - email = "mdaiter8121@gmail.com"; - github = "mdaiter"; - githubId = 1377571; - name = "Matthew S. Daiter"; - }; - mdarocha = { - email = "marek@mdarocha.pl"; - github = "mdarocha"; - githubId = 11572618; - name = "Marek Darocha"; - }; - mdevlamynck = { - email = "matthias.devlamynck@mailoo.org"; - github = "mdevlamynck"; - githubId = 4378377; - name = "Matthias Devlamynck"; - }; - mdlayher = { - email = "mdlayher@gmail.com"; - github = "mdlayher"; - githubId = 1926905; - name = "Matt Layher"; - keys = [{ - fingerprint = "D709 03C8 0BE9 ACDC 14F0 3BFB 77BF E531 397E DE94"; - }]; - }; - mdr = { - email = "MattRussellUK@gmail.com"; - github = "mdr"; - githubId = 241257; - name = "Matt Russell"; - }; - meain = { - email = "mail@meain.io"; - matrix = "@meain:matrix.org"; - github = "meain"; - githubId = 14259816; - name = "Abin Simon"; - }; - meatcar = { - email = "nixpkgs@denys.me"; - github = "meatcar"; - githubId = 191622; - name = "Denys Pavlov"; - }; - meditans = { - email = "meditans@gmail.com"; - github = "meditans"; - githubId = 4641445; - name = "Carlo Nucera"; - }; - megheaiulian = { - email = "iulian.meghea@gmail.com"; - github = "megheaiulian"; - githubId = 1788114; - name = "Meghea Iulian"; - }; - meisternu = { - email = "meister@krutt.org"; - github = "meisternu"; - githubId = 8263431; - name = "Matt Miemiec"; - }; - melchips = { - email = "truphemus.francois@gmail.com"; - github = "melchips"; - githubId = 365721; - name = "Francois Truphemus"; - }; - melias122 = { - name = "Martin Elias"; - email = "martin+nixpkgs@elias.sx"; - github = "melias122"; - githubId = 1027766; - }; - melkor333 = { - email = "samuel@ton-kunst.ch"; - github = "Melkor333"; - githubId = 6412377; - name = "Samuel Ruprecht"; - }; - melling = { - email = "mattmelling@fastmail.com"; - github = "mattmelling"; - githubId = 1215331; - name = "Matt Melling"; - }; - melsigl = { - email = "melanie.bianca.sigl@gmail.com"; - github = "melsigl"; - githubId = 15093162; - name = "Melanie B. Sigl"; - }; - mephistophiles = { - email = "mussitantesmortem@gmail.com"; - name = "Maxim Zhukov"; - github = "Mephistophiles"; - githubId = 4850908; - }; - mfossen = { - email = "msfossen@gmail.com"; - github = "mfossen"; - githubId = 3300322; - name = "Mitchell Fossen"; - }; - mgdelacroix = { - email = "mgdelacroix@gmail.com"; - github = "mgdelacroix"; - githubId = 223323; - name = "Miguel de la Cruz"; - }; - mgdm = { - email = "michael@mgdm.net"; - github = "mgdm"; - githubId = 71893; - name = "Michael Maclean"; - }; - mglolenstine = { - email = "mglolenstine@gmail.com"; - github = "MGlolenstine"; - githubId = 9406770; - matrix = "@mglolenstine:matrix.org"; - name = "MGlolenstine"; - }; - mgregoire = { - email = "gregoire@martinache.net"; - github = "M-Gregoire"; - githubId = 9469313; - name = "Gregoire Martinache"; - }; - mgttlinger = { - email = "megoettlinger@gmail.com"; - github = "mgttlinger"; - githubId = 5120487; - name = "Merlin Humml"; - }; - mguentner = { - email = "code@klandest.in"; - github = "mguentner"; - githubId = 668926; - name = "Maximilian Güntner"; - }; - mh = { - github = "markus-heinrich"; - githubId = 68288772; - name = "Markus Heinrich"; - }; - mh182 = { - email = "mh182@chello.at"; - github = "mh182"; - githubId = 9980864; - name = "Max Hofer"; - }; - mhaselsteiner = { - email = "magdalena.haselsteiner@gmx.at"; - github = "mhaselsteiner"; - githubId = 20536514; - name = "Magdalena Haselsteiner"; - }; - miangraham = { - github = "miangraham"; - githubId = 704580; - name = "M. Ian Graham"; - keys = [{ - fingerprint = "8CE3 2906 516F C4D8 D373 308A E189 648A 55F5 9A9F"; - }]; - }; - mic92 = { - email = "joerg@thalheim.io"; - matrix = "@mic92:nixos.dev"; - github = "Mic92"; - githubId = 96200; - name = "Jörg Thalheim"; - keys = [{ - # compare with https://keybase.io/Mic92 - fingerprint = "3DEE 1C55 6E1C 3DC5 54F5 875A 003F 2096 411B 5F92"; - }]; - }; - michaeladler = { - email = "therisen06@gmail.com"; - github = "michaeladler"; - githubId = 1575834; - name = "Michael Adler"; - }; - michaelBelsanti = { - email = "mbels03@protonmail.com"; - name = "Mike Belsanti"; - github = "michaelBelsanti"; - githubId = 62124625; - }; - michaelgrahamevans = { - email = "michaelgrahamevans@gmail.com"; - name = "Michael Evans"; - github = "michaelgrahamevans"; - githubId = 5932424; - }; - michaelpj = { - email = "michaelpj@gmail.com"; - github = "michaelpj"; - githubId = 1699466; - name = "Michael Peyton Jones"; - }; - michalrus = { - email = "m@michalrus.com"; - github = "michalrus"; - githubId = 4366292; - name = "Michal Rus"; - }; - michelk = { - email = "michel@kuhlmanns.info"; - github = "michelk"; - githubId = 1404919; - name = "Michel Kuhlmann"; - }; - michojel = { - email = "mic.liamg@gmail.com"; - github = "michojel"; - githubId = 21156022; - name = "Michal Minář"; - }; - michzappa = { - email = "me@michzappa.com"; - github = "michzappa"; - githubId = 59343378; - name = "Michael Zappa"; - }; - mickours = { - email = "mickours@gmail.com<"; - github = "mickours"; - githubId = 837312; - name = "Michael Mercier"; - }; - midchildan = { - email = "git@midchildan.org"; - matrix = "@midchildan:matrix.org"; - github = "midchildan"; - githubId = 7343721; - name = "midchildan"; - keys = [{ - fingerprint = "FEF0 AE2D 5449 3482 5F06 40AA 186A 1EDA C5C6 3F83"; - }]; - }; - mightyiam = { - email = "mightyiampresence@gmail.com"; - github = "mightyiam"; - githubId = 635591; - name = "Shahar Dawn Or"; - }; - mihnea-s = { - email = "mihn.stn@gmail.com"; - github = "mihnea-s"; - githubId = 43088426; - name = "Mihnea Stoian"; - }; - mikefaille = { - email = "michael@faille.io"; - github = "mikefaille"; - githubId = 978196; - name = "Michaël Faille"; - }; - mikesperber = { - email = "sperber@deinprogramm.de"; - github = "mikesperber"; - githubId = 1387206; - name = "Mike Sperber"; - }; - mikoim = { - email = "ek@esh.ink"; - github = "mikoim"; - githubId = 3958340; - name = "Eshin Kunishima"; - }; - mikroskeem = { - email = "mikroskeem@mikroskeem.eu"; - github = "mikroskeem"; - githubId = 3490861; - name = "Mark Vainomaa"; - keys = [{ - fingerprint = "DB43 2895 CF68 F0CE D4B7 EF60 DA01 5B05 B5A1 1B22"; - }]; - }; - milahu = { - email = "milahu@gmail.com"; - github = "milahu"; - githubId = 12958815; - name = "Milan Hauth"; - }; - milesbreslin = { - email = "milesbreslin@gmail.com"; - github = "MilesBreslin"; - githubId = 38543128; - name = "Miles Breslin"; - }; - milibopp = { - email = "contact@ebopp.de"; - github = "milibopp"; - githubId = 3098430; - name = "Emilia Bopp"; - }; - millerjason = { - email = "mailings-github@millerjason.com"; - github = "millerjason"; - githubId = 7610974; - name = "Jason Miller"; - }; - milogert = { - email = "milo@milogert.com"; - github = "milogert"; - githubId = 5378535; - name = "Milo Gertjejansen"; - }; - milran = { - email = "milranmike@protonmail.com"; - github = "milran"; - githubId = 93639059; - name = "Milran Mike"; - }; - mimame = { - email = "miguel.madrid.mencia@gmail.com"; - github = "mimame"; - githubId = 3269878; - name = "Miguel Madrid Mencía"; - }; - mindavi = { - email = "rol3517@gmail.com"; - github = "Mindavi"; - githubId = 9799623; - name = "Rick van Schijndel"; - }; - minijackson = { - email = "minijackson@riseup.net"; - github = "minijackson"; - githubId = 1200507; - name = "Rémi Nicole"; - keys = [{ - fingerprint = "3196 83D3 9A1B 4DE1 3DC2 51FD FEA8 88C9 F5D6 4F62"; - }]; - }; - minion3665 = { - name = "Skyler Grey"; - email = "skyler3665@gmail.com"; - matrix = "@minion3665:matrix.org"; - github = "Minion3665"; - githubId = 34243578; - keys = [{ - fingerprint = "D520 AC8D 7C96 9212 5B2B BD3A 1AFD 1025 6B3C 714D"; - }]; - }; - minizilla = { - email = "m.billyzaelani@gmail.com"; - github = "minizilla"; - githubId = 20436235; - name = "Billy Zaelani Malik"; - }; - mir06 = { - email = "armin.leuprecht@uni-graz.at"; - github = "mir06"; - githubId = 8479244; - name = "Armin Leuprecht"; - }; - mirdhyn = { - email = "mirdhyn@gmail.com"; - github = "mirdhyn"; - githubId = 149558; - name = "Merlin Gaillard"; - }; - mirrexagon = { - email = "mirrexagon@mirrexagon.com"; - github = "mirrexagon"; - githubId = 1776903; - name = "Andrew Abbott"; - }; - mislavzanic = { - email = "mislavzanic3@gmail.com"; - github = "mislavzanic"; - githubId = 48838244; - name = "Mislav Zanic"; - }; - misterio77 = { - email = "eu@misterio.me"; - github = "Misterio77"; - githubId = 5727578; - matrix = "@misterio:matrix.org"; - name = "Gabriel Fontes"; - keys = [{ - fingerprint = "7088 C742 1873 E0DB 97FF 17C2 245C AB70 B4C2 25E9"; - }]; - }; - misuzu = { - email = "bakalolka@gmail.com"; - github = "misuzu"; - githubId = 248143; - name = "misuzu"; - }; - mitchmindtree = { - email = "mail@mitchellnordine.com"; - github = "mitchmindtree"; - githubId = 4587373; - name = "Mitchell Nordine"; - }; - mjanczyk = { - email = "m@dragonvr.pl"; - github = "mjanczyk"; - githubId = 1001112; - name = "Marcin Janczyk"; - }; - mjp = { - email = "mike@mythik.co.uk"; - github = "MikePlayle"; - githubId = 16974598; - name = "Mike Playle"; - }; - mkaito = { - email = "chris@mkaito.net"; - github = "mkaito"; - githubId = 20434; - name = "Christian Höppner"; - }; - mkazulak = { - email = "kazulakm@gmail.com"; - github = "mulderr"; - githubId = 5698461; - name = "Maciej Kazulak"; - }; - mkf = { - email = "m@mikf.pl"; - github = "mkf"; - githubId = 7753506; - name = "Michał Krzysztof Feiler"; - keys = [{ - fingerprint = "1E36 9940 CC7E 01C4 CFE8 F20A E35C 2D7C 2C6A C724"; - }]; - }; - mkg = { - email = "mkg@vt.edu"; - github = "mkgvt"; - githubId = 22477669; - name = "Mark K Gardner"; - }; - mkg20001 = { - email = "mkg20001+nix@gmail.com"; - matrix = "@mkg20001:matrix.org"; - github = "mkg20001"; - githubId = 7735145; - name = "Maciej Krüger"; - keys = [{ - fingerprint = "E90C BA34 55B3 6236 740C 038F 0D94 8CE1 9CF4 9C5F"; - }]; - }; - mktip = { - email = "mo.issa.ok+nix@gmail.com"; - github = "mktip"; - githubId = 45905717; - name = "Mohammad Issa"; - keys = [{ - fingerprint = "64BE BF11 96C3 DD7A 443E 8314 1DC0 82FA DE5B A863"; - }]; - }; - mlatus = { - email = "wqseleven@gmail.com"; - github = "Ninlives"; - githubId = 17873203; - name = "mlatus"; - }; - mlieberman85 = { - email = "mlieberman85@gmail.com"; - github = "mlieberman85"; - githubId = 622577; - name = "Michael Lieberman"; - }; - mlvzk = { - name = "mlvzk"; - github = "mlvzk"; - githubId = 44906333; - }; - mmahut = { - email = "marek.mahut@gmail.com"; - github = "mmahut"; - githubId = 104795; - name = "Marek Mahut"; - }; - mmai = { - email = "henri.bourcereau@gmail.com"; - github = "mmai"; - githubId = 117842; - name = "Henri Bourcereau"; - }; - mmesch = { - github = "MMesch"; - githubId = 2597803; - name = "Matthias Meschede"; - }; - mmilata = { - email = "martin@martinmilata.cz"; - github = "mmilata"; - githubId = 85857; - name = "Martin Milata"; - }; - mmlb = { - email = "manny@peekaboo.mmlb.icu"; - github = "mmlb"; - githubId = 708570; - name = "Manuel Mendez"; - }; - mnacamura = { - email = "m.nacamura@gmail.com"; - github = "mnacamura"; - githubId = 45770; - name = "Mitsuhiro Nakamura"; - }; - moaxcp = { - email = "moaxcp@gmail.com"; - github = "moaxcp"; - githubId = 7831184; - name = "John Mercier"; - }; - modulistic = { - email = "modulistic@gmail.com"; - github = "modulistic"; - githubId = 1902456; - name = "Pablo Costa"; - }; - mog = { - email = "mog-lists@rldn.net"; - github = "mogorman"; - githubId = 64710; - name = "Matthew O'Gorman"; - }; - Mogria = { - email = "m0gr14@gmail.com"; - github = "mogria"; - githubId = 754512; - name = "Mogria"; - }; - mohe2015 = { - name = "Moritz Hedtke"; - email = "Moritz.Hedtke@t-online.de"; - matrix = "@moritz.hedtke:matrix.org"; - github = "mohe2015"; - githubId = 13287984; - keys = [{ - fingerprint = "1248 D3E1 1D11 4A85 75C9 8934 6794 D45A 488C 2EDE"; - }]; - }; - monaaraj = { - name = "Mon Aaraj"; - email = "owo69uwu69@gmail.com"; - matrix = "@mon:tchncs.de"; - github = "ribosomerocker"; - githubId = 46468162; - }; - monsieurp = { - email = "monsieurp@gentoo.org"; - github = "monsieurp"; - githubId = 350116; - name = "Patrice Clement"; - }; - montag451 = { - email = "montag451@laposte.net"; - github = "montag451"; - githubId = 249317; - name = "montag451"; - }; - montchr = { - name = "Chris Montgomery"; - email = "chris@cdom.io"; - github = "montchr"; - githubId = 1757914; - keys = [{ - fingerprint = "6460 4147 C434 F65E C306 A21F 135E EDD0 F719 34F3"; - }]; - }; - moosingin3space = { - email = "moosingin3space@gmail.com"; - github = "moosingin3space"; - githubId = 830082; - name = "Nathan Moos"; - }; - moredread = { - email = "code@apb.name"; - github = "Moredread"; - githubId = 100848; - name = "André-Patrick Bubel"; - keys = [{ - fingerprint = "4412 38AD CAD3 228D 876C 5455 118C E7C4 24B4 5728"; - }]; - }; - moretea = { - email = "maarten@moretea.nl"; - github = "moretea"; - githubId = 99988; - name = "Maarten Hoogendoorn"; - }; - MoritzBoehme = { - email = "mail@moritzboeh.me"; - github = "MoritzBoehme"; - githubId = 42215704; - name = "Moritz Böhme"; - }; - MostAwesomeDude = { - email = "cds@corbinsimpson.com"; - github = "MostAwesomeDude"; - githubId = 118035; - name = "Corbin Simpson"; - }; - mothsart = { - email = "jerem.ferry@gmail.com"; - github = "mothsART"; - githubId = 10601196; - name = "Jérémie Ferry"; - }; - mounium = { - email = "muoniurn@gmail.com"; - github = "Mounium"; - githubId = 20026143; - name = "Katona László"; - }; - MP2E = { - email = "MP2E@archlinux.us"; - github = "MP2E"; - githubId = 167708; - name = "Cray Elliott"; - }; - mpcsh = { - email = "m@mpc.sh"; - github = "mpcsh"; - githubId = 2894019; - name = "Mark Cohen"; - }; - mpickering = { - email = "matthewtpickering@gmail.com"; - github = "mpickering"; - githubId = 1216657; - name = "Matthew Pickering"; - }; - mpoquet = { - email = "millian.poquet@gmail.com"; - github = "mpoquet"; - githubId = 3502831; - name = "Millian Poquet"; - }; - mpscholten = { - email = "marc@digitallyinduced.com"; - github = "mpscholten"; - githubId = 2072185; - name = "Marc Scholten"; - }; - mredaelli = { - email = "massimo@typish.io"; - github = "mredaelli"; - githubId = 3073833; - name = "Massimo Redaelli"; - }; - mrene = { - email = "mathieu.rene@gmail.com"; - github = "mrene"; - githubId = 254443; - name = "Mathieu Rene"; - }; - mrfreezeex = { - email = "arthur@cri.epita.fr"; - github = "MrFreezeex"; - name = "Arthur Outhenin-Chalandre"; - githubId = 3845213; - }; - mrityunjaygr8 = { - email = "mrityunjaysaxena1996@gmail.com"; - github = "mrityunjaygr8"; - name = "Mrityunjay Saxena"; - githubId = 14573967; - }; - mrkkrp = { - email = "markkarpov92@gmail.com"; - github = "mrkkrp"; - githubId = 8165792; - name = "Mark Karpov"; - }; - mrmebelman = { - email = "burzakovskij@protonmail.com"; - github = "MrMebelMan"; - githubId = 15896005; - name = "Vladyslav Burzakovskyy"; - }; - mrtarantoga = { - email = "goetz-dev@web.de"; - name = "Götz Grimmer"; - github = "MrTarantoga"; - githubId = 53876219; - }; - mrVanDalo = { - email = "contact@ingolf-wagner.de"; - github = "mrVanDalo"; - githubId = 839693; - name = "Ingolf Wanger"; - }; - mschristiansen = { - email = "mikkel@rheosystems.com"; - github = "mschristiansen"; - githubId = 437005; - name = "Mikkel Christiansen"; - }; - mschuwalow = { - github = "mschuwalow"; - githubId = 16665913; - name = "Maxim Schuwalow"; - email = "maxim.schuwalow@gmail.com"; - }; - msfjarvis = { - github = "msfjarvis"; - githubId = 13348378; - name = "Harsh Shandilya"; - email = "nixos@msfjarvis.dev"; - keys = [{ - fingerprint = "8F87 050B 0F9C B841 1515 7399 B784 3F82 3355 E9B9"; - }]; - }; - msiedlarek = { - email = "mikolaj@siedlarek.pl"; - github = "msiedlarek"; - githubId = 133448; - name = "Mikołaj Siedlarek"; - }; - mslingsby = { - email = "morten.slingsby@eviny.no"; - github = "MortenSlingsby"; - githubId = 111859550; - name = "Morten Slingsby"; - }; - msm = { - email = "msm@tailcall.net"; - github = "msm-code"; - githubId = 7026881; - name = "Jarosław Jedynak"; - }; - mstarzyk = { - email = "mstarzyk@gmail.com"; - github = "mstarzyk"; - githubId = 111304; - name = "Maciek Starzyk"; - }; - msteen = { - email = "emailmatthijs@gmail.com"; - github = "msteen"; - githubId = 788953; - name = "Matthijs Steen"; - }; - mstrangfeld = { - email = "marvin@strangfeld.io"; - github = "mstrangfeld"; - githubId = 36842980; - name = "Marvin Strangfeld"; - }; - mt-caret = { - email = "mtakeda.enigsol@gmail.com"; - github = "mt-caret"; - githubId = 4996739; - name = "Masayuki Takeda"; - }; - mtesseract = { - email = "moritz@stackrox.com"; - github = "mtesseract"; - githubId = 11706080; - name = "Moritz Clasmeier"; - }; - mtoohey = { - name = "Matthew Toohey"; - email = "contact@mtoohey.com"; - github = "mtoohey31"; - githubId = 36740602; - }; - MtP = { - email = "marko.nixos@poikonen.de"; - github = "MtP76"; - githubId = 2176611; - name = "Marko Poikonen"; - }; - mtreca = { - email = "maxime.treca@gmail.com"; - github = "mtreca"; - githubId = 16440823; - name = "Maxime Tréca"; - }; - mtreskin = { - email = "zerthurd@gmail.com"; - github = "Zert"; - githubId = 39034; - name = "Max Treskin"; - }; - mtrsk = { - email = "marcos.schonfinkel@protonmail.com"; - github = "mtrsk"; - githubId = 16356569; - name = "Marcos Benevides"; - }; - mudri = { - email = "lamudri@gmail.com"; - github = "laMudri"; - githubId = 5139265; - name = "James Wood"; - }; - mudrii = { - email = "mudreac@gmail.com"; - github = "mudrii"; - githubId = 220262; - name = "Ion Mudreac"; - }; - multun = { - email = "victor.collod@epita.fr"; - github = "multun"; - githubId = 5047140; - name = "Victor Collod"; - }; - munksgaard = { - name = "Philip Munksgaard"; - email = "philip@munksgaard.me"; - github = "Munksgaard"; - githubId = 230613; - matrix = "@philip:matrix.munksgaard.me"; - keys = [{ - fingerprint = "5658 4D09 71AF E45F CC29 6BD7 4CE6 2A90 EFC0 B9B2"; - }]; - }; - mupdt = { - email = "nix@pdtpartners.com"; - github = "mupdt"; - githubId = 25388474; - name = "Matej Urbas"; - }; - muscaln = { - email = "muscaln@protonmail.com"; - github = "muscaln"; - githubId = 96225281; - name = "Mustafa Çalışkan"; - }; - mvisonneau = { - name = "Maxime VISONNEAU"; - email = "maxime@visonneau.fr"; - matrix = "@maxime:visonneau.fr"; - github = "mvisonneau"; - githubId = 1761583; - keys = [{ - fingerprint = "EC63 0CEA E8BC 5EE5 5C58 F2E3 150D 6F0A E919 8D24"; - }]; - }; - mvnetbiz = { - email = "mvnetbiz@gmail.com"; - matrix = "@mvtva:matrix.org"; - github = "mvnetbiz"; - githubId = 6455574; - name = "Matt Votava"; - }; - mvs = { - email = "mvs@nya.yt"; - github = "illdefined"; - githubId = 772914; - name = "Mikael Voss"; - }; - mwdomino = { - email = "matt@dominey.io"; - github = "mwdomino"; - githubId = 46284538; - name = "Matt Dominey"; - }; - mwolfe = { - email = "corp@m0rg.dev"; - github = "m0rg-dev"; - githubId = 38578268; - name = "Morgan Wolfe"; - }; - myaats = { - email = "mats@mats.sh"; - github = "Myaats"; - githubId = 6295090; - name = "Mats"; - }; - mynacol = { - github = "Mynacol"; - githubId = 26695166; - name = "Paul Prechtel"; - }; - myrl = { - email = "myrl.0xf@gmail.com"; - github = "Myrl"; - githubId = 9636071; - name = "Myrl Hex"; - }; - n0emis = { - email = "nixpkgs@n0emis.network"; - github = "n0emis"; - githubId = 22817873; - name = "Ember Keske"; - }; - nadrieril = { - email = "nadrieril@gmail.com"; - github = "Nadrieril"; - githubId = 6783654; - name = "Nadrieril Feneanar"; - }; - nagisa = { - name = "Simonas Kazlauskas"; - email = "nixpkgs@kazlauskas.me"; - github = "nagisa"; - githubId = 679122; - }; - nagy = { - email = "danielnagy@posteo.de"; - github = "nagy"; - githubId = 692274; - name = "Daniel Nagy"; - keys = [{ - fingerprint = "F6AE 2C60 9196 A1BC ECD8 7108 1B8E 8DCB 576F B671"; - }]; - }; - nalbyuites = { - email = "ashijit007@gmail.com"; - github = "nalbyuites"; - githubId = 1009523; - name = "Ashijit Pramanik"; - }; - namore = { - email = "namor@hemio.de"; - github = "namore"; - githubId = 1222539; - name = "Roman Naumann"; - }; - naphta = { - github = "naphta"; - githubId = 6709831; - name = "Jake Hill"; - }; - nasirhm = { - email = "nasirhussainm14@gmail.com"; - github = "nasirhm"; - githubId = 35005234; - name = "Nasir Hussain"; - keys = [{ - fingerprint = "7A10 AB8E 0BEC 566B 090C 9BE3 D812 6E55 9CE7 C35D"; - }]; - }; - nat-418 = { - github = "nat-418"; - githubId = 93013864; - name = "nat-418"; - }; - nathan-gs = { - email = "nathan@nathan.gs"; - github = "nathan-gs"; - githubId = 330943; - name = "Nathan Bijnens"; - }; - nathanruiz = { - email = "nathanruiz@protonmail.com"; - github = "nathanruiz"; - githubId = 18604892; - name = "Nathan Ruiz"; - }; - nathyong = { - github = "nathyong"; - githubId = 818502; - name = "Nathan Yong"; - }; - natsukium = { - email = "nixpkgs@natsukium.com"; - github = "natsukium"; - githubId = 25083790; - name = "Tomoya Otabi"; - keys = [{ - fingerprint = "3D14 6004 004C F882 D519 6CD4 9EA4 5A31 DB99 4C53"; - }]; - }; - natto1784 = { - email = "natto@weirdnatto.in"; - github = "natto1784"; - githubId = 56316606; - name = "Amneesh Singh"; - }; - nazarewk = { - name = "Krzysztof Nazarewski"; - matrix = "@nazarewk:matrix.org"; - github = "nazarewk"; - githubId = 3494992; - keys = [{ - fingerprint = "4BFF 0614 03A2 47F0 AA0B 4BC4 916D 8B67 2418 92AE"; - }]; - }; - nbr = { - github = "nbr"; - githubId = 3819225; - name = "Nick Braga"; - }; - nbren12 = { - email = "nbren12@gmail.com"; - github = "nbren12"; - githubId = 1386642; - name = "Noah Brenowitz"; - }; - ncfavier = { - email = "n@monade.li"; - matrix = "@ncfavier:matrix.org"; - github = "ncfavier"; - githubId = 4323933; - name = "Naïm Favier"; - keys = [{ - fingerprint = "F3EB 4BBB 4E71 99BC 299C D4E9 95AF CE82 1190 8325"; - }]; - }; - nckx = { - email = "github@tobias.gr"; - github = "nckx"; - githubId = 364510; - name = "Tobias Geerinckx-Rice"; - }; - ndl = { - email = "ndl@endl.ch"; - github = "ndl"; - githubId = 137805; - name = "Alexander Tsvyashchenko"; - }; - ne9z = { - email = "yuchen@apvc.uk"; - github = "ne9z"; - githubId = 77314501; - name = "Maurice Zhou"; - }; - nebulka = { - email = "arapun@proton.me"; - github = "nebulka1"; - githubId = 121920704; - name = "Nebulka"; - }; - Necior = { - email = "adrian@sadlocha.eu"; - github = "Necior"; - githubId = 2404518; - matrix = "@n3t:matrix.org"; - name = "Adrian Sadłocha"; - }; - necrophcodr = { - email = "nc@scalehost.eu"; - github = "necrophcodr"; - githubId = 575887; - name = "Steffen Rytter Postas"; - }; - neeasade = { - email = "nathanisom27@gmail.com"; - github = "neeasade"; - githubId = 3747396; - name = "Nathan Isom"; - }; - neilmayhew = { - email = "nix@neil.mayhew.name"; - github = "neilmayhew"; - githubId = 166791; - name = "Neil Mayhew"; - }; - nek0 = { - email = "nek0@nek0.eu"; - github = "nek0"; - githubId = 1859691; - name = "Amedeo Molnár"; - }; - nelsonjeppesen = { - email = "nix@jeppesen.io"; - github = "NelsonJeppesen"; - githubId = 50854675; - name = "Nelson Jeppesen"; - }; - neonfuz = { - email = "neonfuz@gmail.com"; - github = "neonfuz"; - githubId = 2590830; - name = "Sage Raflik"; - }; - neosimsim = { - email = "me@abn.sh"; - github = "neosimsim"; - githubId = 1771772; - name = "Alexander Ben Nasrallah"; - }; - nequissimus = { - email = "tim@nequissimus.com"; - github = "NeQuissimus"; - githubId = 628342; - name = "Tim Steinbach"; - }; - nerdypepper = { - email = "nerdy@peppe.rs"; - github = "nerdypepper"; - githubId = 23743547; - name = "Akshay Oppiliappan"; - }; - ners = { - name = "ners"; - email = "ners@gmx.ch"; - matrix = "@ners:ners.ch"; - github = "ners"; - githubId = 50560955; - }; - nessdoor = { - name = "Tomas Antonio Lopez"; - email = "entropy.overseer@protonmail.com"; - github = "nessdoor"; - githubId = 25993494; - }; - netali = { - name = "Jennifer Graul"; - email = "me@netali.de"; - github = "NetaliDev"; - githubId = 15304894; - keys = [{ - fingerprint = "F729 2594 6F58 0B05 8FB3 F271 9C55 E636 426B 40A9"; - }]; - }; - netcrns = { - email = "jason.wing@gmx.de"; - github = "netcrns"; - githubId = 34162313; - name = "Jason Wing"; - }; - netfox = { - name = "netfox"; - email = "say-hi@netfox.rip"; - matrix = "@netfox:catgirl.cloud"; - github = "0xnetfox"; - githubId = 97521402; - keys = [{ - fingerprint = "E8E9 43D7 EB83 DB77 E41C D87F 9C77 CB70 F2E6 3EF7"; - }]; - }; - netixx = { - email = "dev.espinetfrancois@gmail.com"; - github = "netixx"; - githubId = 1488603; - name = "François Espinet"; - }; - net-mist = { - email = "archimist.linux@gmail.com"; - github = "Net-Mist"; - githubId = 13920346; - name = "Sébastien Iooss"; - }; - neverbehave = { - email = "i@never.pet"; - github = "NeverBehave"; - githubId = 17120571; - name = "Xinhao Luo"; - }; - newam = { - email = "alex@thinglab.org"; - github = "newAM"; - githubId = 7845120; - name = "Alex Martens"; - }; - ngerstle = { - name = "Nicholas Gerstle"; - email = "ngerstle@gmail.com"; - github = "ngerstle"; - githubId = 1023752; - }; - ngiger = { - email = "niklaus.giger@member.fsf.org"; - github = "ngiger"; - githubId = 265800; - name = "Niklaus Giger"; - }; - nh2 = { - email = "mail@nh2.me"; - matrix = "@nh2:matrix.org"; - github = "nh2"; - githubId = 399535; - name = "Niklas Hambüchen"; - }; - nhooyr = { - email = "anmol@aubble.com"; - github = "nhooyr"; - githubId = 10180857; - name = "Anmol Sethi"; - }; - nialov = { - email = "nikolasovaskainen@gmail.com"; - github = "nialov"; - githubId = 47318483; - name = "Nikolas Ovaskainen"; - }; - nicbk = { - email = "nicolas@nicbk.com"; - github = "nicbk"; - githubId = 77309427; - name = "Nicolás Kennedy"; - keys = [{ - fingerprint = "7BC1 77D9 C222 B1DC FB2F 0484 C061 089E FEBF 7A35"; - }]; - }; - nickcao = { - name = "Nick Cao"; - email = "nickcao@nichi.co"; - github = "NickCao"; - githubId = 15247171; - }; - nickhu = { - email = "me@nickhu.co.uk"; - github = "NickHu"; - githubId = 450276; - name = "Nick Hu"; - }; - nicknovitski = { - email = "nixpkgs@nicknovitski.com"; - github = "nicknovitski"; - githubId = 151337; - name = "Nick Novitski"; - }; - nico202 = { - email = "anothersms@gmail.com"; - github = "nico202"; - githubId = 8214542; - name = "Nicolò Balzarotti"; - }; - nicoo = { - email = "nicoo@debian.org"; - github = "nbraud"; - githubId = 1155801; - name = "nicoo"; - keys = [{ - fingerprint = "E44E 9EA5 4B8E 256A FB73 49D3 EC9D 3708 72BC 7A8C"; - }]; - }; - nidabdella = { - name = "Mohamed Nidabdella"; - email = "nidabdella.mohamed@gmail.com"; - github = "nidabdella"; - githubId = 8083813; - }; - NieDzejkob = { - email = "kuba@kadziolka.net"; - github = "meithecatte"; - githubId = 23580910; - name = "Jakub Kądziołka"; - keys = [{ - fingerprint = "E576 BFB2 CF6E B13D F571 33B9 E315 A758 4613 1564"; - }]; - }; - nigelgbanks = { - name = "Nigel Banks"; - email = "nigel.g.banks@gmail.com"; - github = "nigelgbanks"; - githubId = 487373; - }; - nikitavoloboev = { - email = "nikita.voloboev@gmail.com"; - github = "nikitavoloboev"; - githubId = 6391776; - name = "Nikita Voloboev"; - }; - NikolaMandic = { - email = "nikola@mandic.email"; - github = "NikolaMandic"; - githubId = 4368690; - name = "Ratko Mladic"; - }; - nikstur = { - email = "nikstur@outlook.com"; - name = "nikstur"; - github = "nikstur"; - githubId = 61635709; - }; - nilp0inter = { - email = "robertomartinezp@gmail.com"; - github = "nilp0inter"; - githubId = 1224006; - name = "Roberto Abdelkader Martínez Pérez"; - }; - nils-degroot = { - email = "nils@peeko.nl"; - github = "nils-degroot"; - githubId = 53556985; - name = "Nils de Groot"; - }; - nilsirl = { - email = "nils@nilsand.re"; - github = "NilsIrl"; - githubId = 26231126; - name = "Nils ANDRÉ-CHANG"; - }; - ninjatrappeur = { - email = "felix@alternativebit.fr"; - matrix = "@ninjatrappeur:matrix.org"; - github = "NinjaTrappeur"; - githubId = 1219785; - name = "Félix Baylac-Jacqué"; - }; - nintron = { - email = "nintron@sent.com"; - github = "Nintron27"; - githubId = 47835714; - name = "Nintron"; - }; - niols = { - email = "niols@niols.fr"; - github = "niols"; - githubId = 5920602; - name = "Nicolas Jeannerod"; - }; - nioncode = { - email = "nioncode+github@gmail.com"; - github = "nioncode"; - githubId = 3159451; - name = "Nicolas Schneider"; - }; - nitsky = { - name = "nitsky"; - github = "nitsky"; - githubId = 492793; - }; - nixbitcoin = { - email = "nixbitcoin@i2pmail.org"; - github = "nixbitcoin"; - githubId = 45737139; - name = "nixbitcoindev"; - keys = [{ - fingerprint = "577A 3452 7F3E 2A85 E80F E164 DD11 F9AD 5308 B3BA"; - }]; - }; - nixinator = { - email = "33lockdown33@protonmail.com"; - matrix = "@nixinator:nixos.dev"; - github = "nixinator"; - githubId = 66913205; - name = "Rick Sanchez"; - }; - nixy = { - email = "nixy@nixy.moe"; - github = "nixy"; - githubId = 7588406; - name = "Andrew R. M."; - }; - nkalupahana = { - email = "hello@nisa.la"; - github = "nkalupahana"; - githubId = 7347290; - name = "Nisala Kalupahana"; - }; - nkje = { - name = "Niels Kristian Lyshøj Jensen"; - email = "n@nk.je"; - github = "NKJe"; - githubId = 1102306; - keys = [{ - fingerprint = "B956 C6A4 22AF 86A0 8F77 A8CA DE3B ADFE CD31 A89D"; - }]; - }; - nkpvk = { - email = "niko.pavlinek@gmail.com"; - github = "npavlinek"; - githubId = 16385648; - name = "Niko Pavlinek"; - }; - nloomans = { - email = "noah@nixos.noahloomans.com"; - github = "nloomans"; - githubId = 7829481; - name = "Noah Loomans"; - }; - nmattia = { - email = "nicolas@nmattia.com"; - github = "nmattia"; - githubId = 6930756; - name = "Nicolas Mattia"; - }; - nobbz = { - name = "Norbert Melzer"; - email = "timmelzer+nixpkgs@gmail.com"; - github = "NobbZ"; - githubId = 58951; - }; - nocoolnametom = { - email = "nocoolnametom@gmail.com"; - github = "nocoolnametom"; - githubId = 810877; - name = "Tom Doggett"; - }; - noisersup = { - email = "patryk@kwiatek.xyz"; - github = "noisersup"; - githubId = 42322511; - name = "Patryk Kwiatek"; - }; - nomeata = { - email = "mail@joachim-breitner.de"; - github = "nomeata"; - githubId = 148037; - name = "Joachim Breitner"; - }; - nomisiv = { - email = "simon@nomisiv.com"; - github = "NomisIV"; - githubId = 47303199; - name = "Simon Gutgesell"; - }; - noneucat = { - email = "andy@lolc.at"; - matrix = "@noneucat:lolc.at"; - github = "noneucat"; - githubId = 40049608; - name = "Andy Chun"; - }; - nook = { - name = "Tom Nook"; - email = "0xnook@protonmail.com"; - github = "0xnook"; - githubId = 88323754; - }; - noreferences = { - email = "norkus@norkus.net"; - github = "jozuas"; - githubId = 13085275; - name = "Juozas Norkus"; - }; - norfair = { - email = "syd@cs-syd.eu"; - github = "NorfairKing"; - githubId = 3521180; - name = "Tom Sydney Kerckhove"; - }; - NotAShelf = { - name = "NotAShelf"; - email = "itsashelf@gmail.com"; - github = "NotAShelf"; - githubId = 62766066; - }; - notbandali = { - name = "Amin Bandali"; - email = "bandali@gnu.org"; - github = "bandali0"; - githubId = 1254858; - keys = [{ - fingerprint = "BE62 7373 8E61 6D6D 1B3A 08E8 A21A 0202 4881 6103"; - }]; - }; - not-my-segfault = { - email = "michal@tar.black"; - matrix = "@michal:tar.black"; - github = "not-my-segfault"; - githubId = 30374463; - name = "Michal S."; - }; - notthemessiah = { - email = "brian.cohen.88@gmail.com"; - github = "NOTtheMessiah"; - githubId = 2946283; - name = "Brian Cohen"; - }; - novenary = { - email = "streetwalkermc@gmail.com"; - github = "9ary"; - githubId = 1155030; - name = "novenary"; - }; - novoxd = { - email = "radnovox@gmail.com"; - github = "novoxd"; - githubId = 6052922; - name = "Kirill Struokov"; - }; - np = { - email = "np.nix@nicolaspouillard.fr"; - github = "np"; - githubId = 5548; - name = "Nicolas Pouillard"; - }; - npatsakula = { - email = "nikita.patsakula@gmail.com"; - name = "Patsakula Nikita"; - github = "npatsakula"; - githubId = 23001619; - }; - nphilou = { - email = "nphilou@gmail.com"; - github = "nphilou"; - githubId = 9939720; - name = "Philippe Nguyen"; - }; - nrdxp = { - email = "tim.deh@pm.me"; - matrix = "@timdeh:matrix.org"; - github = "nrdxp"; - githubId = 34083928; - name = "Tim DeHerrera"; - }; - nrhelmi = { - email = "helmiinour@gmail.com"; - github = "NRHelmi"; - githubId = 15707703; - name = "Helmi Nour"; - }; - nshalman = { - email = "nahamu@gmail.com"; - github = "nshalman"; - githubId = 20391; - name = "Nahum Shalman"; - }; - nsnelson = { - email = "noah.snelson@protonmail.com"; - github = "peeley"; - githubId = 30942198; - name = "Noah Snelson"; - }; - nthorne = { - email = "notrupertthorne@gmail.com"; - github = "nthorne"; - githubId = 1839979; - name = "Niklas Thörne"; - }; - nukaduka = { - email = "ksgokte@gmail.com"; - github = "NukaDuka"; - githubId = 22592293; - name = "Kartik Gokte"; - }; - nullishamy = { - email = "amy.codes@null.net"; - name = "nullishamy"; - github = "nullishamy"; - githubId = 99221043; - }; - nullx76 = { - email = "nix@xirion.net"; - github = "NULLx76"; - githubId = 1809198; - name = "Victor Roest"; - }; - numinit = { - email = "me@numin.it"; - github = "numinit"; - githubId = 369111; - name = "Morgan Jones"; - }; - numkem = { - name = "Sebastien Bariteau"; - email = "numkem@numkem.org"; - matrix = "@numkem:matrix.org"; - github = "numkem"; - githubId = 332423; - }; - nviets = { - email = "nathan.g.viets@gmail.com"; - github = "nviets"; - githubId = 16027994; - name = "Nathan Viets"; - }; - nyanloutre = { - email = "paul@nyanlout.re"; - github = "nyanloutre"; - githubId = 7677321; - name = "Paul Trehiou"; - }; - nyanotech = { - name = "nyanotech"; - email = "nyanotechnology@gmail.com"; - github = "nyanotech"; - githubId = 33802077; - }; - nyarly = { - email = "nyarly@gmail.com"; - github = "nyarly"; - githubId = 127548; - name = "Judson Lester"; - }; - nzbr = { - email = "nixos@nzbr.de"; - github = "nzbr"; - githubId = 7851175; - name = "nzbr"; - matrix = "@nzbr:nzbr.de"; - keys = [{ - fingerprint = "BF3A 3EE6 3144 2C5F C9FB 39A7 6C78 B50B 97A4 2F8A"; - }]; - }; - nzhang-zh = { - email = "n.zhang.hp.au@gmail.com"; - github = "nzhang-zh"; - githubId = 30825096; - name = "Ning Zhang"; - }; - obadz = { - email = "obadz-nixos@obadz.com"; - github = "obadz"; - githubId = 3359345; - name = "obadz"; - }; - oberblastmeister = { - email = "littlebubu.shu@gmail.com"; - github = "oberblastmeister"; - githubId = 61095988; - name = "Brian Shu"; - }; - obfusk = { - email = "flx@obfusk.net"; - matrix = "@obfusk:matrix.org"; - github = "obfusk"; - githubId = 1260687; - name = "FC Stegerman"; - keys = [{ - fingerprint = "D5E4 A51D F8D2 55B9 FAC6 A9BB 2F96 07F0 9B36 0F2D"; - }]; - }; - obsidian-systems-maintenance = { - name = "Obsidian Systems Maintenance"; - email = "maintainer@obsidian.systems"; - github = "obsidian-systems-maintenance"; - githubId = 80847921; - }; - ocfox = { - email = "i@ocfox.me"; - github = "ocfox"; - githubId = 47410251; - name = "ocfox"; - keys = [{ - fingerprint = "939E F8A5 CED8 7F50 5BB5 B2D0 24BC 2738 5F70 234F"; - }]; - }; - oddlama = { - email = "oddlama@oddlama.org"; - github = "oddlama"; - githubId = 31919558; - name = "oddlama"; - keys = [{ - fingerprint = "680A A614 E988 DE3E 84E0 DEFA 503F 6C06 8410 4B0A"; - }]; - }; - odi = { - email = "oliver.dunkl@gmail.com"; - github = "odi"; - githubId = 158758; - name = "Oliver Dunkl"; - }; - ofek = { - email = "oss@ofek.dev"; - github = "ofek"; - githubId = 9677399; - name = "Ofek Lev"; - }; - offline = { - email = "jaka@x-truder.net"; - github = "offlinehacker"; - githubId = 585547; - name = "Jaka Hudoklin"; - }; - oida = { - email = "oida@posteo.de"; - github = "oida"; - githubId = 7249506; - name = "oida"; - }; - olcai = { - email = "dev@timan.info"; - github = "olcai"; - githubId = 20923; - name = "Erik Timan"; - }; - olebedev = { - email = "ole6edev@gmail.com"; - github = "olebedev"; - githubId = 848535; - name = "Oleg Lebedev"; - }; - olejorgenb = { - email = "olejorgenb@yahoo.no"; - github = "olejorgenb"; - githubId = 72201; - name = "Ole Jørgen Brønner"; - }; - ollieB = { - github = "oliverbunting"; - githubId = 1237862; - name = "Ollie Bunting"; - }; - oluceps = { - email = "nixos@oluceps.uk"; - github = "oluceps"; - githubId = 35628088; - name = "oluceps"; - }; - olynch = { - email = "owen@olynch.me"; - github = "olynch"; - githubId = 4728903; - name = "Owen Lynch"; - }; - omasanori = { - github = "omasanori"; - githubId = 167209; - name = "Masanori Ogino"; - }; - omgbebebe = { - email = "omgbebebe@gmail.com"; - github = "omgbebebe"; - githubId = 588167; - name = "Sergey Bubnov"; - }; - omnipotententity = { - email = "omnipotententity@gmail.com"; - github = "OmnipotentEntity"; - githubId = 1538622; - name = "Michael Reilly"; - }; - onedragon = { - name = "YiLong Liu"; - email = "18922251299@163.com"; - github = "jackyliu16"; - githubId = 50787361; - }; - onixie = { - email = "onixie@gmail.com"; - github = "onixie"; - githubId = 817073; - name = "Yc. Shen"; - }; - onny = { - email = "onny@project-insanity.org"; - github = "onny"; - githubId = 757752; - name = "Jonas Heinrich"; - }; - onsails = { - email = "andrey@onsails.com"; - github = "onsails"; - githubId = 107261; - name = "Andrey Kuznetsov"; - }; - onthestairs = { - email = "austinplatt@gmail.com"; - github = "onthestairs"; - githubId = 915970; - name = "Austin Platt"; - }; - ony = { - name = "Mykola Orliuk"; - email = "virkony@gmail.com"; - github = "ony"; - githubId = 11265; - }; - opeik = { - email = "sandro@stikic.com"; - github = "opeik"; - githubId = 11566773; - name = "Sandro Stikić"; - }; - OPNA2608 = { - email = "christoph.neidahl@gmail.com"; - github = "OPNA2608"; - githubId = 23431373; - name = "Christoph Neidahl"; - }; - orbekk = { - email = "kjetil.orbekk@gmail.com"; - github = "orbekk"; - githubId = 19862; - name = "KJ Ørbekk"; - }; - orbitz = { - email = "mmatalka@gmail.com"; - github = "orbitz"; - githubId = 75299; - name = "Malcolm Matalka"; - }; - orivej = { - email = "orivej@gmx.fr"; - github = "orivej"; - githubId = 101514; - name = "Orivej Desh"; - }; - ornxka = { - email = "ornxka@littledevil.sh"; - github = "ornxka"; - githubId = 52086525; - name = "ornxka"; - }; - oro = { - email = "marco@orovecchia.at"; - github = "Oro"; - githubId = 357005; - name = "Marco Orovecchia"; - }; - osener = { - email = "ozan@ozansener.com"; - github = "osener"; - githubId = 111265; - name = "Ozan Sener"; - }; - ostrolucky = { - email = "gabriel.ostrolucky@gmail.com"; - github = "ostrolucky"; - githubId = 496233; - name = "Gabriel Ostrolucký"; - keys = [{ - fingerprint = "6611 22A7 B778 6E4A E99A 9D6E C79A D015 19EF B134"; - }]; - }; - otavio = { - email = "otavio.salvador@ossystems.com.br"; - github = "otavio"; - githubId = 25278; - name = "Otavio Salvador"; - }; - otini = { - name = "Olivier Nicole"; - email = "olivier@chnik.fr"; - github = "OlivierNicole"; - githubId = 14031333; - }; - otwieracz = { - email = "slawek@otwiera.cz"; - github = "otwieracz"; - githubId = 108072; - name = "Slawomir Gonet"; - }; - ovlach = { - email = "ondrej@vlach.xyz"; - name = "Ondrej Vlach"; - github = "ovlach"; - githubId = 4405107; - }; - oxalica = { - email = "oxalicc@pm.me"; - github = "oxalica"; - githubId = 14816024; - name = "oxalica"; - keys = [{ - fingerprint = "F90F FD6D 585C 2BA1 F13D E8A9 7571 654C F88E 31C2"; - }]; - }; - oxapentane = { - email = "blame@oxapentane.com"; - github = "oxapentane"; - githubId = 1297357; - name = "Grigory Shipunov"; - keys = [{ - fingerprint = "DD09 98E6 CDF2 9453 7FC6 04F9 91FA 5E5B F9AA 901C"; - }]; - }; - oxij = { - email = "oxij@oxij.org"; - github = "oxij"; - githubId = 391919; - name = "Jan Malakhovski"; - keys = [{ - fingerprint = "514B B966 B46E 3565 0508 86E8 0E6C A66E 5C55 7AA8"; - }]; - }; - oxzi = { - email = "post@0x21.biz"; - github = "oxzi"; - githubId = 8402811; - name = "Alvar Penning"; - keys = [{ - fingerprint = "EB14 4E67 E57D 27E2 B5A4 CD8C F32A 4563 7FA2 5E31"; - }]; - }; - oyren = { - email = "m.scheuren@oyra.eu"; - github = "oyren"; - githubId = 15930073; - name = "Moritz Scheuren"; - }; - ozkutuk = { - email = "ozkutuk@protonmail.com"; - github = "ozkutuk"; - githubId = 5948762; - name = "Berk Özkütük"; - }; - p3psi = { - name = "Elliot Boo"; - email = "p3psi.boo@gmail.com"; - github = "p3psi-boo"; - githubId = 43925055; - }; - pablovsky = { - email = "dealberapablo07@gmail.com"; - github = "Pablo1107"; - githubId = 17091659; - name = "Pablo Andres Dealbera"; - }; - pacien = { - email = "b4gx3q.nixpkgs@pacien.net"; - github = "pacien"; - githubId = 1449319; - name = "Pacien Tran-Girard"; - }; - pacman99 = { - email = "pachum99@gmail.com"; - matrix = "@pachumicchu:myrdd.info"; - github = "Pacman99"; - githubId = 16345849; - name = "Parthiv Seetharaman"; - }; - paddygord = { - email = "pgpatrickgordon@gmail.com"; - github = "avaunit02"; - githubId = 10776658; - name = "Patrick Gordon"; - }; - paholg = { - email = "paho@paholg.com"; - github = "paholg"; - githubId = 4908217; - name = "Paho Lurie-Gregg"; - }; - pakhfn = { - email = "pakhfn@gmail.com"; - github = "pakhfn"; - githubId = 11016164; - name = "Fedor Pakhomov"; - }; - pallix = { - email = "pierre.allix.work@gmail.com"; - github = "pallix"; - githubId = 676838; - name = "Pierre Allix"; - }; - paluh = { - email = "paluho@gmail.com"; - github = "paluh"; - githubId = 190249; - name = "Tomasz Rybarczyk"; - }; - pamplemousse = { - email = "xav.maso@gmail.com"; - matrix = "@pamplemouss_:matrix.org"; - github = "Pamplemousse"; - githubId = 2647236; - name = "Xavier Maso"; - }; - panaeon = { - email = "vitalii.voloshyn@gmail.com"; - github = "PanAeon"; - githubId = 686076; - name = "Vitalii Voloshyn"; - }; - panda2134 = { - email = "me+nixpkgs@panda2134.site"; - github = "panda2134"; - githubId = 7239200; - name = "panda2134"; - }; - pandaman = { - email = "kointosudesuyo@infoseek.jp"; - github = "pandaman64"; - githubId = 1788628; - name = "pandaman"; - }; - panicgh = { - email = "nbenes.gh@xandea.de"; - github = "panicgh"; - githubId = 79252025; - name = "Nicolas Benes"; - }; - paperdigits = { - email = "mica@silentumbrella.com"; - github = "paperdigits"; - githubId = 71795; - name = "Mica Semrick"; - }; - paraseba = { - email = "paraseba@gmail.com"; - github = "paraseba"; - githubId = 20792; - name = "Sebastian Galkin"; - }; - parasrah = { - email = "nixos@parasrah.com"; - github = "Parasrah"; - githubId = 14935550; - name = "Brad Pfannmuller"; - }; - parras = { - email = "c@philipp-arras.de"; - github = "phiadaarr"; - githubId = 33826198; - name = "Philipp Arras"; - }; - pashashocky = { - email = "pashashocky@gmail.com"; - github = "pashashocky"; - githubId = 673857; - name = "Pash Shocky"; - }; - pashev = { - email = "pashev.igor@gmail.com"; - github = "ip1981"; - githubId = 131844; - name = "Igor Pashev"; - }; - pasqui23 = { - email = "p3dimaria@hotmail.it"; - github = "pasqui23"; - githubId = 6931743; - name = "pasqui23"; - }; - patricksjackson = { - email = "patrick@jackson.dev"; - github = "patricksjackson"; - githubId = 160646; - name = "Patrick Jackson"; - }; - patryk27 = { - email = "pwychowaniec@pm.me"; - github = "Patryk27"; - githubId = 3395477; - name = "Patryk Wychowaniec"; - keys = [{ - fingerprint = "196A BFEC 6A1D D1EC 7594 F8D1 F625 47D0 75E0 9767"; - }]; - }; - patryk4815 = { - email = "patryk.sondej@gmail.com"; - github = "patryk4815"; - githubId = 3074260; - name = "Patryk Sondej"; - }; - patternspandemic = { - email = "patternspandemic@live.com"; - github = "patternspandemic"; - githubId = 15645854; - name = "Brad Christensen"; - }; - paveloom = { - email = "paveloom@riseup.net"; - github = "paveloom"; - githubId = 49961859; - name = "Pavel Sobolev"; - }; - pawelpacana = { - email = "pawel.pacana@gmail.com"; - github = "pawelpacana"; - githubId = 116740; - name = "Paweł Pacana"; - }; - payas = { - email = "relekarpayas@gmail.com"; - github = "bhankas"; - githubId = 24254289; - name = "Payas Relekar"; - }; - pb- = { - email = "pbaecher@gmail.com"; - github = "pb-"; - githubId = 84886; - name = "Paul Baecher"; - }; - pbar = { - email = "piercebartine@gmail.com"; - github = "pbar1"; - githubId = 26949935; - name = "Pierce Bartine"; - }; - pbek = { - email = "patrizio@bekerle.com"; - matrix = "@patrizio:bekerle.com"; - github = "pbek"; - githubId = 1798101; - name = "Patrizio Bekerle"; - keys = [{ - fingerprint = "E005 48D5 D6AC 812C AAD2 AFFA 9C42 B05E 5913 60DC"; - }]; - }; - pblkt = { - email = "pebblekite@gmail.com"; - github = "pblkt"; - githubId = 6498458; - name = "pebble kite"; - }; - pbogdan = { - email = "ppbogdan@gmail.com"; - github = "pbogdan"; - githubId = 157610; - name = "Piotr Bogdan"; - }; - pborzenkov = { - email = "pavel@borzenkov.net"; - github = "pborzenkov"; - githubId = 434254; - name = "Pavel Borzenkov"; - }; - pbsds = { - name = "Peder Bergebakken Sundt"; - email = "pbsds@hotmail.com"; - github = "pbsds"; - githubId = 140964; - }; - pcarrier = { - email = "pc@rrier.ca"; - github = "pcarrier"; - githubId = 8641; - name = "Pierre Carrier"; - }; - pedrohlc = { - email = "root@pedrohlc.com"; - github = "PedroHLC"; - githubId = 1368952; - name = "Pedro Lara Campos"; - }; - peelz = { - email = "peelz.dev+nixpkgs@gmail.com"; - github = "notpeelz"; - githubId = 920910; - name = "peelz"; - }; - pelme = { - email = "andreas@pelme.se"; - github = "pelme"; - githubId = 20529; - name = "Andreas Pelme"; - }; - penalty1083 = { - email = "penalty1083@outlook.com"; - github = "penalty1083"; - githubId = 121009904; - name = "penalty1083"; - }; - penguwin = { - email = "penguwin@penguwin.eu"; - github = "penguwin"; - githubId = 13225611; - name = "Nicolas Martin"; - }; - pennae = { - name = "pennae"; - email = "github@quasiparticle.net"; - github = "pennae"; - githubId = 82953136; - }; - periklis = { - email = "theopompos@gmail.com"; - github = "periklis"; - githubId = 152312; - name = "Periklis Tsirakidis"; - }; - petercommand = { - email = "petercommand@gmail.com"; - github = "petercommand"; - githubId = 1260660; - name = "petercommand"; - }; - peterhoeg = { - email = "peter@hoeg.com"; - matrix = "@peter:hoeg.com"; - github = "peterhoeg"; - githubId = 722550; - name = "Peter Hoeg"; - }; - peterromfeldhk = { - email = "peter.romfeld.hk@gmail.com"; - github = "peterromfeldhk"; - githubId = 5515707; - name = "Peter Romfeld"; - }; - petersjt014 = { - email = "petersjt014@gmail.com"; - github = "petersjt014"; - githubId = 29493551; - name = "Josh Peters"; - }; - peterwilli = { - email = "peter@codebuffet.co"; - github = "peterwilli"; - githubId = 1212814; - name = "Peter Willemsen"; - keys = [{ - fingerprint = "A37F D403 88E2 D026 B9F6 9617 5C9D D4BF B96A 28F0"; - }]; - }; - peti = { - email = "simons@cryp.to"; - github = "peti"; - githubId = 28323; - name = "Peter Simons"; - }; - petrosagg = { - email = "petrosagg@gmail.com"; - github = "petrosagg"; - githubId = 939420; - name = "Petros Angelatos"; - }; - petterstorvik = { - email = "petterstorvik@gmail.com"; - github = "storvik"; - githubId = 3438604; - name = "Petter Storvik"; - }; - p-h = { - email = "p@hurlimann.org"; - github = "p-h"; - githubId = 645664; - name = "Philippe Hürlimann"; - }; - phaer = { - name = "Paul Haerle"; - email = "nix@phaer.org"; - - matrix = "@phaer:matrix.org"; - github = "phaer"; - githubId = 101753; - keys = [{ - fingerprint = "5D69 CF04 B7BC 2BC1 A567 9267 00BC F29B 3208 0700"; - }]; - }; - phdcybersec = { - name = "Léo Lavaur"; - email = "phdcybersec@pm.me"; - - github = "phdcybersec"; - githubId = 82591009; - keys = [{ - fingerprint = "7756 E88F 3C6A 47A5 C5F0 CDFB AB54 6777 F93E 20BF"; - }]; - }; - phfroidmont = { - name = "Paul-Henri Froidmont"; - email = "nix.contact-j9dw4d@froidmont.org"; - - github = "phfroidmont"; - githubId = 8150907; - keys = [{ - fingerprint = "3AC6 F170 F011 33CE 393B CD94 BE94 8AFD 7E78 73BE"; - }]; - }; - philandstuff = { - email = "philip.g.potter@gmail.com"; - github = "philandstuff"; - githubId = 581269; - name = "Philip Potter"; - }; - phile314 = { - email = "nix@314.ch"; - github = "phile314"; - githubId = 1640697; - name = "Philipp Hausmann"; - }; - Philipp-M = { - email = "philipp@mildenberger.me"; - github = "Philipp-M"; - githubId = 9267430; - name = "Philipp Mildenberger"; - }; - phip1611 = { - email = "phip1611@gmail.com"; - github = "phip1611"; - githubId = 5737016; - name = "Philipp Schuster"; - }; - Phlogistique = { - email = "noe.rubinstein@gmail.com"; - github = "Phlogistique"; - githubId = 421510; - name = "Noé Rubinstein"; - }; - photex = { - email = "photex@gmail.com"; - github = "photex"; - githubId = 301903; - name = "Chip Collier"; - }; - phryneas = { - email = "mail@lenzw.de"; - github = "phryneas"; - githubId = 4282439; - name = "Lenz Weber"; - }; - phunehehe = { - email = "phunehehe@gmail.com"; - github = "phunehehe"; - githubId = 627831; - name = "Hoang Xuan Phu"; - }; - piegames = { - name = "piegames"; - email = "nix@piegames.de"; - matrix = "@piegames:matrix.org"; - github = "piegamesde"; - githubId = 14054505; - }; - pierrechevalier83 = { - email = "pierrechevalier83@gmail.com"; - github = "pierrechevalier83"; - githubId = 5790907; - name = "Pierre Chevalier"; - }; - pierreis = { - email = "pierre@pierre.is"; - github = "pierreis"; - githubId = 203973; - name = "Pierre Matri"; - }; - pierrer = { - email = "pierrer@pi3r.be"; - github = "PierreR"; - githubId = 93115; - name = "Pierre Radermecker"; - }; - pierron = { - email = "nixos@nbp.name"; - github = "nbp"; - githubId = 1179566; - name = "Nicolas B. Pierron"; - }; - pimeys = { - email = "julius@nauk.io"; - github = "pimeys"; - githubId = 34967; - name = "Julius de Bruijn"; - }; - pingiun = { - email = "nixos@pingiun.com"; - github = "pingiun"; - githubId = 1576660; - name = "Jelle Besseling"; - keys = [{ - fingerprint = "A3A3 65AE 16ED A7A0 C29C 88F1 9712 452E 8BE3 372E"; - }]; - }; - pinkcreeper100 = { - email = "benmoreosm@gmail.com"; - github = "pinkcreeper100"; - githubId = 35699052; - name = "Oliver Samuel Morris"; - }; - pinpox = { - email = "mail@pablo.tools"; - github = "pinpox"; - githubId = 1719781; - name = "Pablo Ovelleiro Corral"; - keys = [{ - fingerprint = "D03B 218C AE77 1F77 D7F9 20D9 823A 6154 4264 08D3"; - }]; - }; - piperswe = { - email = "contact@piperswe.me"; - github = "piperswe"; - githubId = 1830959; - name = "Piper McCorkle"; - }; - pjbarnoy = { - email = "pjbarnoy@gmail.com"; - github = "pjbarnoy"; - githubId = 119460; - name = "Perry Barnoy"; - }; - pjjw = { - email = "peter@shortbus.org"; - github = "pjjw"; - githubId = 638; - name = "Peter Woodman"; - }; - pjones = { - email = "pjones@devalot.com"; - github = "pjones"; - githubId = 3737; - name = "Peter Jones"; - }; - pkharvey = { - email = "kayharvey@protonmail.com"; - github = "pkharvey"; - githubId = 50750875; - name = "Paul Harvey"; - }; - pkmx = { - email = "pkmx.tw@gmail.com"; - github = "PkmX"; - githubId = 610615; - name = "Chih-Mao Chen"; - }; - plabadens = { - name = "Pierre Labadens"; - email = "labadens.pierre+nixpkgs@gmail.com"; - github = "plabadens"; - githubId = 4303706; - keys = [{ - fingerprint = "B00F E582 FD3F 0732 EA48 3937 F558 14E4 D687 4375"; - }]; - }; - PlayerNameHere = { - name = "Dixon Sean Low Yan Feng"; - email = "dixonseanlow@protonmail.com"; - github = "PlayerNameHere"; - githubId = 56017218; - keys = [{ - fingerprint = "E6F4 BFB4 8DE3 893F 68FC A15F FF5F 4B30 A41B BAC8"; - }]; - }; - plchldr = { - email = "mail@oddco.de"; - github = "plchldr"; - githubId = 11639001; - name = "Jonas Beyer"; - }; - plcplc = { - email = "plcplc@gmail.com"; - github = "plcplc"; - githubId = 358550; - name = "Philip Lykke Carlsen"; - }; - pleshevskiy = { - email = "dmitriy@pleshevski.ru"; - github = "pleshevskiy"; - githubId = 7839004; - name = "Dmitriy Pleshevskiy"; - }; - plumps = { - email = "maks.bronsky@web.de"; - github = "plumps"; - githubId = 13000278; - name = "Maksim Bronsky"; - }; - PlushBeaver = { - name = "Dmitry Kozlyuk"; - email = "dmitry.kozliuk+nixpkgs@gmail.com"; - github = "PlushBeaver"; - githubId = 8988269; - }; - pmahoney = { - email = "pat@polycrystal.org"; - github = "pmahoney"; - githubId = 103822; - name = "Patrick Mahoney"; - }; - pmenke = { - email = "nixos@pmenke.de"; - github = "pmenke-de"; - githubId = 898922; - name = "Philipp Menke"; - keys = [{ - fingerprint = "ED54 5EFD 64B6 B5AA EC61 8C16 EB7F 2D4C CBE2 3B69"; - }]; - }; - pmeunier = { - email = "pierre-etienne.meunier@inria.fr"; - github = "P-E-Meunier"; - githubId = 17021304; - name = "Pierre-Étienne Meunier"; - }; - pmiddend = { - email = "pmidden@secure.mailbox.org"; - github = "pmiddend"; - githubId = 178496; - name = "Philipp Middendorf"; - }; - pmw = { - email = "philip@mailworks.org"; - matrix = "@philip4g:matrix.org"; - name = "Philip White"; - github = "philipmw"; - githubId = 1379645; - keys = [{ - fingerprint = "9AB0 6C94 C3D1 F9D0 B9D9 A832 BC54 6FB3 B16C 8B0B"; - }]; - }; - pmy = { - email = "pmy@xqzp.net"; - github = "pmeiyu"; - githubId = 8529551; - name = "Peng Mei Yu"; - }; - pmyjavec = { - email = "pauly@myjavec.com"; - github = "pmyjavec"; - githubId = 315096; - name = "Pauly Myjavec"; - }; - pnelson = { - email = "me@pnelson.ca"; - github = "pnelson"; - githubId = 579773; - name = "Philip Nelson"; - }; - pneumaticat = { - email = "kevin@potatofrom.space"; - github = "kliu128"; - githubId = 11365056; - name = "Kevin Liu"; - }; - pnmadelaine = { - name = "Paul-Nicolas Madelaine"; - email = "pnm@pnm.tf"; - github = "pnmadelaine"; - githubId = 21977014; - }; - pnotequalnp = { - email = "kevin@pnotequalnp.com"; - github = "pnotequalnp"; - githubId = 46154511; - name = "Kevin Mullins"; - keys = [{ - fingerprint = "2CD2 B030 BD22 32EF DF5A 008A 3618 20A4 5DB4 1E9A"; - }]; - }; - podocarp = { - email = "xdjiaxd@gmail.com"; - github = "podocarp"; - githubId = 10473184; - name = "Jia Xiaodong"; - }; - poelzi = { - email = "nix@poelzi.org"; - github = "poelzi"; - githubId = 66107; - name = "Daniel Poelzleithner"; - }; - pogobanane = { - email = "mail@peter-okelmann.de"; - github = "pogobanane"; - githubId = 38314551; - name = "Peter Okelmann"; - }; - polarmutex = { - email = "brian@brianryall.xyz"; - github = "polarmutex"; - githubId = 115141; - name = "Brian Ryall"; - }; - polendri = { - email = "paul@ijj.li"; - github = "polendri"; - githubId = 1829032; - name = "Paul Hendry"; - }; - polygon = { - email = "polygon@wh2.tu-dresden.de"; - name = "Polygon"; - github = "polygon"; - githubId = 51489; - }; - polykernel = { - github = "polykernel"; - githubId = 81340136; - name = "polykernel"; - }; - polyrod = { - email = "dc1mdp@gmail.com"; - github = "polyrod"; - githubId = 24878306; - name = "Maurizio Di Pietro"; - }; - pombeirp = { - email = "nix@endgr.33mail.com"; - github = "pedropombeiro"; - githubId = 138074; - name = "Pedro Pombeiro"; - }; - pongo1231 = { - email = "pongo1999712@gmail.com"; - github = "pongo1231"; - githubId = 4201956; - name = "pongo1231"; - }; - portothree = { - name = "Gustavo Porto"; - email = "gus@p8s.co"; - github = "portothree"; - githubId = 3718120; - }; - poscat = { - email = "poscat@mail.poscat.moe"; - github = "poscat0x04"; - githubId = 53291983; - name = "Poscat Tarski"; - keys = [{ - fingerprint = "48AD DE10 F27B AFB4 7BB0 CCAF 2D25 95A0 0D08 ACE0"; - }]; - }; - posch = { - email = "tp@fonz.de"; - github = "posch"; - githubId = 146413; - name = "Tobias Poschwatta"; - }; - PowerUser64 = { - email = "blakelysnorth@gmail.com"; - github = "PowerUser64"; - githubId = 24578572; - name = "Blake North"; - }; - ppenguin = { - name = "Jeroen Versteeg"; - email = "hieronymusv@gmail.com"; - github = "ppenguin"; - githubId = 17690377; - }; - ppom = { - name = "Paco Pompeani"; - email = "paco@ecomail.io"; - github = "aopom"; - githubId = 38916722; - }; - pradeepchhetri = { - email = "pradeep.chhetri89@gmail.com"; - github = "pradeepchhetri"; - githubId = 2232667; - name = "Pradeep Chhetri"; - }; - pradyuman = { - email = "me@pradyuman.co"; - github = "pradyuman"; - githubId = 9904569; - name = "Pradyuman Vig"; - keys = [{ - fingerprint = "240B 57DE 4271 2480 7CE3 EAC8 4F74 D536 1C4C A31E"; - }]; - }; - preisschild = { - email = "florian@florianstroeger.com"; - github = "Preisschild"; - githubId = 11898437; - name = "Florian Ströger"; - }; - priegger = { - email = "philipp@riegger.name"; - github = "priegger"; - githubId = 228931; - name = "Philipp Riegger"; - }; - prikhi = { - email = "pavan.rikhi@gmail.com"; - github = "prikhi"; - githubId = 1304102; - name = "Pavan Rikhi"; - }; - primeos = { - email = "dev.primeos@gmail.com"; - matrix = "@primeos:matrix.org"; - github = "primeos"; - githubId = 7537109; - name = "Michael Weiss"; - keys = [ - { - # Git only - fingerprint = "86A7 4A55 07D0 58D1 322E 37FD 1308 26A6 C2A3 89FD"; - } - { - # Email, etc. - fingerprint = "AF85 991C C950 49A2 4205 1933 BCA9 943D D1DF 4C04"; - } - ]; - }; - princemachiavelli = { - name = "Josh Hoffer"; - email = "jhoffer@sansorgan.es"; - matrix = "@princemachiavelli:matrix.org"; - github = "Princemachiavelli"; - githubId = 2730968; - keys = [{ - fingerprint = "DD54 130B ABEC B65C 1F6B 2A38 8312 4F97 A318 EA18"; - }]; - }; - ProducerMatt = { - name = "Matthew Pherigo"; - email = "ProducerMatt42@gmail.com"; - github = "ProducerMatt"; - githubId = 58014742; - }; - Profpatsch = { - email = "mail@profpatsch.de"; - github = "Profpatsch"; - githubId = 3153638; - name = "Profpatsch"; - }; - proglodyte = { - email = "proglodyte23@gmail.com"; - github = "proglodyte"; - githubId = 18549627; - name = "Proglodyte"; - }; - progval = { - email = "progval+nix@progval.net"; - github = "progval"; - githubId = 406946; - name = "Valentin Lorentz"; - }; - proofofkeags = { - email = "keagan.mcclelland@gmail.com"; - github = "ProofOfKeags"; - githubId = 4033651; - name = "Keagan McClelland"; - }; - protoben = { - email = "protob3n@gmail.com"; - github = "protoben"; - githubId = 4633847; - name = "Ben Hamlin"; - }; - prrlvr = { - email = "po@prrlvr.fr"; - github = "prrlvr"; - githubId = 33699501; - name = "Pierre-Olivier Rey"; - keys = [{ - fingerprint = "40A0 78FD 297B 0AC1 E6D8 A119 4D38 49D9 9555 1307"; - }]; - }; - prtzl = { - email = "matej.blagsic@protonmail.com"; - github = "prtzl"; - githubId = 32430344; - name = "Matej Blagsic"; - }; - prusnak = { - email = "pavol@rusnak.io"; - github = "prusnak"; - githubId = 42201; - name = "Pavol Rusnak"; - keys = [{ - fingerprint = "86E6 792F C27B FD47 8860 C110 91F3 B339 B9A0 2A3D"; - }]; - }; - psanford = { - email = "psanford@sanford.io"; - github = "psanford"; - githubId = 33375; - name = "Peter Sanford"; - }; - pshirshov = { - email = "pshirshov@eml.cc"; - github = "pshirshov"; - githubId = 295225; - name = "Pavel Shirshov"; - }; - psibi = { - email = "sibi@psibi.in"; - matrix = "@psibi:matrix.org"; - github = "psibi"; - githubId = 737477; - name = "Sibi Prabakaran"; - }; - pstn = { - email = "philipp@xndr.de"; - github = "pstn"; - githubId = 1329940; - name = "Philipp Steinpaß"; - }; - pSub = { - email = "mail@pascal-wittmann.de"; - github = "pSub"; - githubId = 83842; - name = "Pascal Wittmann"; - }; - psyanticy = { - email = "iuns@outlook.fr"; - github = "PsyanticY"; - githubId = 20524473; - name = "Psyanticy"; - }; - psydvl = { - email = "psydvl@fea.st"; - github = "psydvl"; - githubId = 43755002; - name = "Dmitriy P"; - }; - ptival = { - email = "valentin.robert.42@gmail.com"; - github = "Ptival"; - githubId = 478606; - name = "Valentin Robert"; - }; - ptrhlm = { - email = "ptrhlm0@gmail.com"; - github = "ptrhlm"; - githubId = 9568176; - name = "Piotr Halama"; - }; - puckipedia = { - email = "puck@puckipedia.com"; - github = "puckipedia"; - githubId = 488734; - name = "Puck Meerburg"; - }; - puffnfresh = { - email = "brian@brianmckenna.org"; - github = "puffnfresh"; - githubId = 37715; - name = "Brian McKenna"; - }; - pulsation = { - name = "Philippe Sam-Long"; - github = "pulsation"; - githubId = 1838397; - }; - purcell = { - email = "steve@sanityinc.com"; - github = "purcell"; - githubId = 5636; - name = "Steve Purcell"; - }; - putchar = { - email = "slim.cadoux@gmail.com"; - matrix = "@putch4r:matrix.org"; - github = "putchar"; - githubId = 8208767; - name = "Slim Cadoux"; - }; - puzzlewolf = { - email = "nixos@nora.pink"; - github = "puzzlewolf"; - githubId = 23097564; - name = "Nora Widdecke"; - }; - pwoelfel = { - name = "Philipp Woelfel"; - email = "philipp.woelfel@gmail.com"; - github = "PhilippWoelfel"; - githubId = 19400064; - }; - pyrolagus = { - email = "pyrolagus@gmail.com"; - github = "PyroLagus"; - githubId = 4579165; - name = "Danny Bautista"; - }; - pyxels = { - email = "pyxels.dev@gmail.com"; - github = "Pyxels"; - githubId = 39232833; - name = "Jonas"; - }; - q3k = { - email = "q3k@q3k.org"; - github = "q3k"; - githubId = 315234; - name = "Serge Bazanski"; - }; - qbit = { - name = "Aaron Bieber"; - email = "aaron@bolddaemon.com"; - github = "qbit"; - githubId = 68368; - matrix = "@qbit:tapenet.org"; - keys = [{ - fingerprint = "3586 3350 BFEA C101 DB1A 4AF0 1F81 112D 62A9 ADCE"; - }]; - }; - qjoly = { - email = "github@thoughtless.eu"; - github = "qjoly"; - githubId = 82603435; - name = "Quentin JOLY"; - }; - qknight = { - email = "js@lastlog.de"; - github = "qknight"; - githubId = 137406; - name = "Joachim Schiele"; - }; - qoelet = { - email = "kenny@machinesung.com"; - github = "qoelet"; - githubId = 115877; - name = "Kenny Shen"; - }; - quag = { - email = "quaggy@gmail.com"; - github = "quag"; - githubId = 35086; - name = "Jonathan Wright"; - }; - quantenzitrone = { - email = "quantenzitrone@protonmail.com"; - github = "Quantenzitrone"; - githubId = 74491719; - matrix = "@quantenzitrone:matrix.org"; - name = "quantenzitrone"; - }; - queezle = { - email = "git@queezle.net"; - github = "queezle42"; - githubId = 1024891; - name = "Jens Nolte"; - }; - quentin = { - email = "quentin@mit.edu"; - github = "quentinmit"; - githubId = 115761; - name = "Quentin Smith"; - keys = [{ - fingerprint = "1C71 A066 5400 AACD 142E B1A0 04EE 05A8 FCEF B697"; - }]; - }; - quentini = { - email = "quentini@airmail.cc"; - github = "QuentinI"; - githubId = 18196237; - name = "Quentin Inkling"; - }; - qyliss = { - email = "hi@alyssa.is"; - github = "alyssais"; - githubId = 2768870; - name = "Alyssa Ross"; - matrix = "@qyliss:fairydust.space"; - keys = [{ - fingerprint = "7573 56D7 79BB B888 773E 415E 736C CDF9 EF51 BD97"; - }]; - }; - r3dl3g = { - email = "redleg@rothfuss-web.de"; - github = "r3dl3g"; - githubId = 35229674; - name = "Armin Rothfuss"; - }; - raboof = { - email = "arnout@bzzt.net"; - matrix = "@raboof:matrix.org"; - github = "raboof"; - githubId = 131856; - name = "Arnout Engelen"; - }; - raehik = { - email = "thefirstmuffinman@gmail.com"; - github = "raehik"; - githubId = 3764592; - name = "Ben Orchard"; - }; - rafael = { - name = "Rafael"; - email = "pr9@tuta.io"; - github = "rafa-dot-el"; - githubId = 104688305; - keys = [{ - fingerprint = "5F0B 3EAC F1F9 8155 0946 CDF5 469E 3255 A40D 2AD6"; - }]; - }; - rafaelgg = { - email = "rafael.garcia.gallego@gmail.com"; - github = "rafaelgg"; - githubId = 1016742; - name = "Rafael García"; - }; - ragge = { - email = "r.dahlen@gmail.com"; - github = "ragnard"; - githubId = 882; - name = "Ragnar Dahlen"; - }; - RaghavSood = { - email = "r@raghavsood.com"; - github = "RaghavSood"; - githubId = 903072; - name = "Raghav Sood"; - }; - raitobezarius = { - email = "ryan@lahfa.xyz"; - matrix = "@raitobezarius:matrix.org"; - github = "RaitoBezarius"; - githubId = 314564; - name = "Ryan Lahfa"; - }; - rakesh4g = { - email = "rakeshgupta4u@gmail.com"; - github = "Rakesh4G"; - githubId = 50867187; - name = "Rakesh Gupta"; - }; - ralismark = { - email = "nixpkgs@ralismark.xyz"; - github = "ralismark"; - githubId = 13449732; - name = "Temmie"; - }; - ralith = { - email = "ben.e.saunders@gmail.com"; - matrix = "@ralith:ralith.com"; - github = "Ralith"; - githubId = 104558; - name = "Benjamin Saunders"; - }; - ramkromberg = { - email = "ramkromberg@mail.com"; - github = "RamKromberg"; - githubId = 14829269; - name = "Ram Kromberg"; - }; - rampoina = { - email = "rampoina@protonmail.com"; - matrix = "@rampoina:matrix.org"; - github = "Rampoina"; - githubId = 5653911; - name = "Rampoina"; - }; - ranfdev = { - email = "ranfdev@gmail.com"; - name = "Lorenzo Miglietta"; - github = "ranfdev"; - githubId = 23294184; - }; - raphaelr = { - email = "raphael-git@tapesoftware.net"; - matrix = "@raphi:tapesoftware.net"; - github = "raphaelr"; - githubId = 121178; - name = "Raphael Robatsch"; - }; - raquelgb = { - email = "raquel.garcia.bautista@gmail.com"; - github = "raquelgb"; - githubId = 1246959; - name = "Raquel García"; - }; - rardiol = { - email = "ricardo.ardissone@gmail.com"; - github = "rardiol"; - githubId = 11351304; - name = "Ricardo Ardissone"; - }; - rasendubi = { - email = "rasen.dubi@gmail.com"; - github = "rasendubi"; - githubId = 1366419; - name = "Alexey Shmalko"; - }; - raskin = { - email = "7c6f434c@mail.ru"; - github = "7c6f434c"; - githubId = 1891350; - name = "Michael Raskin"; - }; - ratsclub = { - email = "victor@freire.dev.br"; - github = "ratsclub"; - githubId = 25647735; - name = "Victor Freire"; - }; - rawkode = { - email = "david.andrew.mckay@gmail.com"; - github = "rawkode"; - githubId = 145816; - name = "David McKay"; - }; - razvan = { - email = "razvan.panda@gmail.com"; - github = "razvan-flavius-panda"; - githubId = 1758708; - name = "Răzvan Flavius Panda"; - }; - rb = { - email = "maintainers@cloudposse.com"; - github = "nitrocode"; - githubId = 7775707; - name = "RB"; - }; - rb2k = { - email = "nix@marc-seeger.com"; - github = "rb2k"; - githubId = 9519; - name = "Marc Seeger"; - }; - rbasso = { - email = "rbasso@sharpgeeks.net"; - github = "rbasso"; - githubId = 16487165; - name = "Rafael Basso"; - }; - rbreslow = { - name = "Rocky Breslow"; - github = "rbreslow"; - githubId = 1774125; - keys = [{ - fingerprint = "B5B7 BCA0 EE6F F31E 263A 69E3 A0D3 2ACC A38B 88ED"; - }]; - }; - rbrewer = { - email = "rwb123@gmail.com"; - github = "rbrewer123"; - githubId = 743058; - name = "Rob Brewer"; - }; - r-burns = { - email = "rtburns@protonmail.com"; - github = "r-burns"; - githubId = 52847440; - name = "Ryan Burns"; - }; - rdnetto = { - email = "rdnetto@gmail.com"; - github = "rdnetto"; - githubId = 1973389; - name = "Reuben D'Netto"; - }; - realsnick = { - name = "Ido Samuelson"; - email = "ido.samuelson@gmail.com"; - github = "realsnick"; - githubId = 1440852; - }; - reckenrode = { - name = "Randy Eckenrode"; - email = "randy@largeandhighquality.com"; - matrix = "@reckenrode:matrix.org"; - github = "reckenrode"; - githubId = 7413633; - keys = [ - # compare with https://keybase.io/reckenrode - { - fingerprint = "01D7 5486 3A6D 64EA AC77 0D26 FBF1 9A98 2CCE 0048"; - } - ]; - }; - redbaron = { - email = "ivanov.maxim@gmail.com"; - github = "redbaron"; - githubId = 16624; - name = "Maxim Ivanov"; - }; - redfish64 = { - email = "engler@gmail.com"; - github = "redfish64"; - githubId = 1922770; - name = "Tim Engler"; - }; - redvers = { - email = "red@infect.me"; - github = "redvers"; - githubId = 816465; - name = "Redvers Davies"; - }; - reedrw = { - email = "reedrw5601@gmail.com"; - github = "reedrw"; - githubId = 21069876; - name = "Reed Williams"; - }; - refnil = { - email = "broemartino@gmail.com"; - github = "refnil"; - githubId = 1142322; - name = "Martin Lavoie"; - }; - regadas = { - email = "oss@regadas.email"; - name = "Filipe Regadas"; - github = "regadas"; - githubId = 163899; - }; - regnat = { - email = "regnat@regnat.ovh"; - github = "thufschmitt"; - githubId = 7226587; - name = "Théophane Hufschmitt"; - }; - rehno-lindeque = { - email = "rehno.lindeque+code@gmail.com"; - github = "rehno-lindeque"; - githubId = 337811; - name = "Rehno Lindeque"; - }; - relrod = { - email = "ricky@elrod.me"; - github = "relrod"; - githubId = 43930; - name = "Ricky Elrod"; - }; - rembo10 = { - github = "rembo10"; - githubId = 801525; - name = "rembo10"; - }; - renatoGarcia = { - email = "fgarcia.renato@gmail.com"; - github = "renatoGarcia"; - githubId = 220211; - name = "Renato Garcia"; - }; - renesat = { - name = "Ivan Smolyakov"; - email = "smol.ivan97@gmail.com"; - github = "renesat"; - githubId = 11363539; - }; - renzo = { - email = "renzocarbonara@gmail.com"; - github = "k0001"; - githubId = 3302; - name = "Renzo Carbonara"; - }; - revol-xut = { - email = "revol-xut@protonmail.com"; - name = "Tassilo Tanneberger"; - github = "revol-xut"; - githubId = 32239737; - keys = [{ - fingerprint = "91EB E870 1639 1323 642A 6803 B966 009D 57E6 9CC6"; - }]; - }; - rewine = { - email = "lhongxu@outlook.com"; - github = "wineee"; - githubId = 22803888; - name = "Lu Hongxu"; - }; - rexim = { - email = "reximkut@gmail.com"; - github = "rexim"; - githubId = 165283; - name = "Alexey Kutepov"; - }; - rgnns = { - email = "jglievano@gmail.com"; - github = "rgnns"; - githubId = 811827; - name = "Gabriel Lievano"; - }; - rgrinberg = { - name = "Rudi Grinberg"; - email = "me@rgrinberg.com"; - github = "rgrinberg"; - githubId = 139003; - }; - rgrunbla = { - email = "remy@grunblatt.org"; - github = "rgrunbla"; - githubId = 42433779; - name = "Rémy Grünblatt"; - }; - rguevara84 = { - email = "fuzztkd@gmail.com"; - github = "rguevara84"; - githubId = 12279531; - name = "Ricardo Guevara"; - }; - rhendric = { - name = "Ryan Hendrickson"; - github = "rhendric"; - githubId = 1570964; - }; - rhoriguchi = { - email = "ryan.horiguchi@gmail.com"; - github = "rhoriguchi"; - githubId = 6047658; - name = "Ryan Horiguchi"; - }; - rht = { - email = "rhtbot@protonmail.com"; - github = "rht"; - githubId = 395821; - name = "rht"; - }; - rhysmdnz = { - email = "rhys@memes.nz"; - matrix = "@rhys:memes.nz"; - github = "rhysmdnz"; - githubId = 2162021; - name = "Rhys Davies"; - }; - ribose-jeffreylau = { - name = "Jeffrey Lau"; - email = "jeffrey.lau@ribose.com"; - github = "ribose-jeffreylau"; - githubId = 2649467; - }; - ricarch97 = { - email = "ricardo.steijn97@gmail.com"; - github = "RicArch97"; - githubId = 61013287; - name = "Ricardo Steijn"; - }; - richardipsum = { - email = "richardipsum@fastmail.co.uk"; - github = "richardipsum"; - githubId = 10631029; - name = "Richard Ipsum"; - }; - rick68 = { - email = "rick68@gmail.com"; - github = "rick68"; - githubId = 42619; - name = "Wei-Ming Yang"; - }; - rickynils = { - email = "rickynils@gmail.com"; - github = "rickynils"; - githubId = 16779; - name = "Rickard Nilsson"; - }; - ricochet = { - email = "behayes2@gmail.com"; - github = "ricochet"; - githubId = 974323; - matrix = "@ricochetcode:matrix.org"; - name = "Bailey Hayes"; - }; - riey = { - email = "creeper844@gmail.com"; - github = "Riey"; - githubId = 14910534; - name = "Riey"; - }; - rika = { - email = "rika@paymentswit.ch"; - github = "ScarletHg"; - githubId = 1810487; - name = "Rika"; - }; - rileyinman = { - email = "rileyminman@gmail.com"; - github = "rileyinman"; - githubId = 37246692; - name = "Riley Inman"; - }; - riotbib = { - email = "github-nix@lnrt.de"; - github = "riotbib"; - githubId = 43172581; - name = "Lennart Mühlenmeier"; - }; - ris = { - email = "code@humanleg.org.uk"; - github = "risicle"; - githubId = 807447; - name = "Robert Scott"; - }; - risson = { - name = "Marc Schmitt"; - email = "marc.schmitt@risson.space"; - matrix = "@risson:lama-corp.space"; - github = "rissson"; - githubId = 18313093; - keys = [ - { - fingerprint = "8A0E 6A7C 08AB B9DE 67DE 2A13 F6FD 87B1 5C26 3EC9"; - } - { - fingerprint = "C0A7 A9BB 115B C857 4D75 EA99 BBB7 A680 1DF1 E03F"; - } - ]; - }; - rixed = { - email = "rixed-github@happyleptic.org"; - github = "rixed"; - githubId = 449990; - name = "Cedric Cellier"; - }; - rizary = { - email = "andika@numtide.com"; - github = "Rizary"; - githubId = 7221768; - name = "Andika Demas Riyandi"; - }; - rkitover = { - email = "rkitover@gmail.com"; - github = "rkitover"; - githubId = 77611; - name = "Rafael Kitover"; - }; - rkoe = { - email = "rk@simple-is-better.org"; - github = "rkoe"; - githubId = 2507744; - name = "Roland Koebler"; - }; - rkrzr = { - email = "ops+nixpkgs@channable.com"; - github = "rkrzr"; - githubId = 82817; - name = "Robert Kreuzer"; - }; - rlupton20 = { - email = "richard.lupton@gmail.com"; - github = "rlupton20"; - githubId = 13752145; - name = "Richard Lupton"; - }; - rmcgibbo = { - email = "rmcgibbo@gmail.com"; - matrix = "@rmcgibbo:matrix.org"; - github = "rmcgibbo"; - githubId = 641278; - name = "Robert T. McGibbon"; - }; - rnhmjoj = { - email = "rnhmjoj@inventati.org"; - matrix = "@rnhmjoj:maxwell.ydns.eu"; - github = "rnhmjoj"; - githubId = 2817565; - name = "Michele Guerini Rocco"; - keys = [{ - fingerprint = "92B2 904F D293 C94D C4C9 3E6B BFBA F4C9 75F7 6450"; - }]; - }; - roastiek = { - email = "r.dee.b.b@gmail.com"; - github = "roastiek"; - githubId = 422802; - name = "Rostislav Beneš"; - }; - rob = { - email = "rob.vermaas@gmail.com"; - github = "rbvermaa"; - githubId = 353885; - name = "Rob Vermaas"; - }; - robaca = { - email = "carsten@r0hrbach.de"; - github = "robaca"; - githubId = 580474; - name = "Carsten Rohrbach"; - }; - robberer = { - email = "robberer@freakmail.de"; - github = "robberer"; - githubId = 6204883; - name = "Longrin Wischnewski"; - }; - robbinch = { - email = "robbinch33@gmail.com"; - github = "robbinch"; - githubId = 12312980; - name = "Robbin C."; - }; - robbins = { - email = "nejrobbins@gmail.com"; - github = "robbins"; - githubId = 31457698; - name = "Nathanael Robbins"; - }; - roberth = { - email = "nixpkgs@roberthensing.nl"; - matrix = "@roberthensing:matrix.org"; - github = "roberth"; - githubId = 496447; - name = "Robert Hensing"; - }; - robertodr = { - email = "roberto.diremigio@gmail.com"; - github = "robertodr"; - githubId = 3708689; - name = "Roberto Di Remigio"; - }; - robertoszek = { - email = "robertoszek@robertoszek.xyz"; - github = "robertoszek"; - githubId = 1080963; - name = "Roberto"; - }; - robgssp = { - email = "robgssp@gmail.com"; - github = "robgssp"; - githubId = 521306; - name = "Rob Glossop"; - }; - roblabla = { - email = "robinlambertz+dev@gmail.com"; - github = "roblabla"; - githubId = 1069318; - name = "Robin Lambertz"; - }; - roconnor = { - email = "roconnor@theorem.ca"; - github = "roconnor"; - githubId = 852967; - name = "Russell O'Connor"; - }; - rodrgz = { - email = "erik@rodgz.com"; - github = "rodrgz"; - githubId = 53882428; - name = "Erik Rodriguez"; - }; - roelvandijk = { - email = "roel@lambdacube.nl"; - github = "roelvandijk"; - githubId = 710906; - name = "Roel van Dijk"; - }; - roman = { - email = "open-source@roman-gonzalez.info"; - github = "roman"; - githubId = 7335; - name = "Roman Gonzalez"; - }; - romildo = { - email = "malaquias@gmail.com"; - github = "romildo"; - githubId = 1217934; - name = "José Romildo Malaquias"; - }; - ronanmacf = { - email = "macfhlar@tcd.ie"; - github = "RonanMacF"; - githubId = 25930627; - name = "Ronan Mac Fhlannchadha"; - }; - rongcuid = { - email = "rongcuid@outlook.com"; - github = "rongcuid"; - githubId = 1312525; - name = "Rongcui Dong"; - }; - roosemberth = { - email = "roosembert.palacios+nixpkgs@posteo.ch"; - matrix = "@roosemberth:orbstheorem.ch"; - github = "roosemberth"; - githubId = 3621083; - name = "Roosembert (Roosemberth) Palacios"; - keys = [{ - fingerprint = "78D9 1871 D059 663B 6117 7532 CAAA ECE5 C224 2BB7"; - }]; - }; - rople380 = { - name = "rople380"; - github = "rople380"; - githubId = 55679162; - keys = [{ - fingerprint = "1401 1B63 393D 16C1 AA9C C521 8526 B757 4A53 6236"; - }]; - }; - RossComputerGuy = { - name = "Tristan Ross"; - email = "tristan.ross@midstall.com"; - github = "RossComputerGuy"; - githubId = 19699320; - }; - rowanG077 = { - email = "goemansrowan@gmail.com"; - github = "rowanG077"; - githubId = 7439756; - name = "Rowan Goemans"; - }; - royneary = { - email = "christian@ulrich.earth"; - github = "royneary"; - githubId = 1942810; - name = "Christian Ulrich"; - }; - rpearce = { - email = "me@robertwpearce.com"; - github = "rpearce"; - githubId = 592876; - name = "Robert W. Pearce"; - }; - rprecenth = { - email = "rasmus@precenth.eu"; - github = "Prillan"; - githubId = 1675190; - name = "Rasmus Précenth"; - }; - rprospero = { - email = "rprospero+nix@gmail.com"; - github = "rprospero"; - githubId = 1728853; - name = "Adam Washington"; - }; - rps = { - email = "robbpseaton@gmail.com"; - github = "robertseaton"; - githubId = 221121; - name = "Robert P. Seaton"; - }; - rraval = { - email = "ronuk.raval@gmail.com"; - github = "rraval"; - githubId = 373566; - name = "Ronuk Raval"; - }; - rrbutani = { - email = "rrbutani+nix@gmail.com"; - github = "rrbutani"; - githubId = 7833358; - matrix = "@rbutani:matrix.org"; - keys = [{ - fingerprint = "7DCA 5615 8AB2 621F 2F32 9FF4 1C7C E491 479F A273"; - }]; - name = "Rahul Butani"; - }; - rski = { - name = "rski"; - email = "rom.skiad+nix@gmail.com"; - github = "rski"; - githubId = 2960312; - }; - rsynnest = { - email = "contact@rsynnest.com"; - github = "rsynnest"; - githubId = 4392850; - name = "Roland Synnestvedt"; - }; - rszibele = { - email = "richard@szibele.com"; - github = "rszibele"; - githubId = 1387224; - name = "Richard Szibele"; - }; - rtburns-jpl = { - email = "rtburns@jpl.nasa.gov"; - github = "rtburns-jpl"; - githubId = 47790121; - name = "Ryan Burns"; - }; - rtreffer = { - email = "treffer+nixos@measite.de"; - github = "rtreffer"; - githubId = 61306; - name = "Rene Treffer"; - }; - ruby0b = { - github = "ruby0b"; - githubId = 106119328; - name = "ruby0b"; - }; - rubyowo = { - name = "Rei Star"; - email = "perhaps-you-know@what-is.ml"; - github = "rubyowo"; - githubId = 105302757; - }; - Ruixi-rebirth = { - name = "Ruixi-rebirth"; - email = "ruixirebirth@gmail.com"; - github = "Ruixi-rebirth"; - githubId = 75824585; - }; - rumpelsepp = { - name = "Stefan Tatschner"; - email = "stefan@rumpelsepp.org"; - github = "rumpelsepp"; - githubId = 1961699; - }; - rushmorem = { - email = "rushmore@webenchanter.com"; - github = "rushmorem"; - githubId = 4958190; - name = "Rushmore Mushambi"; - }; - russell = { - email = "russell.sim@gmail.com"; - github = "russell"; - githubId = 2660; - name = "Russell Sim"; - }; - ruuda = { - email = "dev+nix@veniogames.com"; - github = "ruuda"; - githubId = 506953; - name = "Ruud van Asseldonk"; - }; - rvarago = { - email = "rafael.varago@gmail.com"; - github = "rvarago"; - githubId = 7365864; - name = "Rafael Varago"; - }; - rvl = { - email = "dev+nix@rodney.id.au"; - github = "rvl"; - githubId = 1019641; - name = "Rodney Lorrimar"; - }; - rvlander = { - email = "rvlander@gaetanandre.eu"; - github = "rvlander"; - githubId = 5236428; - name = "Gaëtan André"; - }; - rvnstn = { - email = "github@rvnstn.de"; - github = "rvnstn"; - githubId = 2364742; - name = "Tobias Ravenstein"; - }; - rvolosatovs = { - email = "rvolosatovs@riseup.net"; - github = "rvolosatovs"; - githubId = 12877905; - name = "Roman Volosatovs"; - }; - rxiao = { - email = "ben.xiao@me.com"; - github = "benxiao"; - githubId = 10908495; - name = "Ran Xiao"; - }; - ryanartecona = { - email = "ryanartecona@gmail.com"; - github = "ryanartecona"; - githubId = 889991; - name = "Ryan Artecona"; - }; - ryanorendorff = { - github = "ryanorendorff"; - githubId = 12442942; - name = "Ryan Orendorff"; - }; - ryansydnor = { - email = "ryan.t.sydnor@gmail.com"; - github = "ryansydnor"; - githubId = 1832096; - name = "Ryan Sydnor"; - }; - ryantm = { - email = "ryan@ryantm.com"; - matrix = "@ryantm:matrix.org"; - github = "ryantm"; - githubId = 4804; - name = "Ryan Mulligan"; - }; - ryantrinkle = { - email = "ryan.trinkle@gmail.com"; - github = "ryantrinkle"; - githubId = 1156448; - name = "Ryan Trinkle"; - }; - rybern = { - email = "ryan.bernstein@columbia.edu"; - github = "rybern"; - githubId = 4982341; - name = "Ryan Bernstein"; - }; - rycee = { - email = "robert@rycee.net"; - github = "rycee"; - githubId = 798147; - name = "Robert Helgesson"; - keys = [{ - fingerprint = "36CA CF52 D098 CC0E 78FB 0CB1 3573 356C 25C4 24D4"; - }]; - }; - ryneeverett = { - email = "ryneeverett@gmail.com"; - github = "ryneeverett"; - githubId = 3280280; - name = "Ryne Everett"; - }; - rytone = { - email = "max@ryt.one"; - github = "rastertail"; - githubId = 8082305; - name = "Maxwell Beck"; - keys = [{ - fingerprint = "D260 79E3 C2BC 2E43 905B D057 BB3E FA30 3760 A0DB"; - }]; - }; - rzetterberg = { - email = "richard.zetterberg@gmail.com"; - github = "rzetterberg"; - githubId = 766350; - name = "Richard Zetterberg"; - }; - s1341 = { - email = "s1341@shmarya.net"; - matrix = "@s1341:matrix.org"; - name = "Shmarya Rubenstein"; - github = "s1341"; - githubId = 5682183; - }; - sagikazarmark = { - name = "Mark Sagi-Kazar"; - email = "mark.sagikazar@gmail.com"; - matrix = "@mark.sagikazar:matrix.org"; - github = "sagikazarmark"; - githubId = 1226384; - keys = [{ - fingerprint = "E628 C811 6FB8 1657 F706 4EA4 F251 ADDC 9D04 1C7E"; - }]; - }; - samalws = { - email = "sam@samalws.com"; - name = "Sam Alws"; - github = "samalws"; - githubId = 20981725; - }; - samb96 = { - email = "samb96@gmail.com"; - github = "samb96"; - githubId = 819426; - name = "Sam Bickley"; - }; - samdoshi = { - email = "sam@metal-fish.co.uk"; - github = "samdoshi"; - githubId = 112490; - name = "Sam Doshi"; - }; - samdroid-apps = { - email = "sam@sam.today"; - github = "samdroid-apps"; - githubId = 6022042; - name = "Sam Parkinson"; - }; - samhug = { - email = "s@m-h.ug"; - github = "samhug"; - githubId = 171470; - name = "Sam Hug"; - }; - samlich = { - email = "nixos@samli.ch"; - github = "samlich"; - githubId = 1349989; - name = "samlich"; - keys = [{ - fingerprint = "AE8C 0836 FDF6 3FFC 9580 C588 B156 8953 B193 9F1C"; - }]; - }; - samlukeyes123 = { - email = "samlukeyes123@gmail.com"; - github = "SamLukeYes"; - githubId = 12882091; - name = "Sam L. Yes"; - }; - samrose = { - email = "samuel.rose@gmail.com"; - github = "samrose"; - githubId = 115821; - name = "Sam Rose"; - }; - samuela = { - email = "skainsworth@gmail.com"; - github = "samuela"; - githubId = 226872; - name = "Samuel Ainsworth"; - }; - samueldr = { - email = "samuel@dionne-riel.com"; - matrix = "@samueldr:matrix.org"; - github = "samueldr"; - githubId = 132835; - name = "Samuel Dionne-Riel"; - }; - samuelrivas = { - email = "samuelrivas@gmail.com"; - github = "samuelrivas"; - githubId = 107703; - name = "Samuel Rivas"; - }; - samw = { - email = "sam@wlcx.cc"; - github = "wlcx"; - githubId = 3065381; - name = "Sam Willcocks"; - }; - samyak = { - name = "Samyak Sarnayak"; - email = "samyak201@gmail.com"; - github = "Samyak2"; - githubId = 34161949; - keys = [{ - fingerprint = "155C F413 0129 C058 9A5F 5524 3658 73F2 F0C6 153B"; - }]; - }; - sander = { - email = "s.vanderburg@tudelft.nl"; - github = "svanderburg"; - githubId = 1153271; - name = "Sander van der Burg"; - }; - sarcasticadmin = { - email = "rob@sarcasticadmin.com"; - github = "sarcasticadmin"; - githubId = 30531572; - name = "Robert James Hernandez"; - }; - sargon = { - email = "danielehlers@mindeye.net"; - github = "sargon"; - githubId = 178904; - name = "Daniel Ehlers"; - }; - saschagrunert = { - email = "mail@saschagrunert.de"; - github = "saschagrunert"; - githubId = 695473; - name = "Sascha Grunert"; - }; - saulecabrera = { - name = "Saúl Cabrera"; - email = "saulecabrera@gmail.com"; - github = "saulecabrera"; - githubId = 1423601; - }; - sauyon = { - email = "s@uyon.co"; - github = "sauyon"; - githubId = 2347889; - name = "Sauyon Lee"; - }; - savannidgerinel = { - email = "savanni@luminescent-dreams.com"; - github = "savannidgerinel"; - githubId = 8534888; - name = "Savanni D'Gerinel"; - }; - savyajha = { - email = "savya.jha@hawkradius.com"; - github = "savyajha"; - githubId = 3996019; - name = "Savyasachee Jha"; - }; - sayanarijit = { - email = "sayanarijit@gmail.com"; - github = "sayanarijit"; - githubId = 11632726; - name = "Arijit Basu"; - }; - sb0 = { - email = "sb@m-labs.hk"; - github = "sbourdeauducq"; - githubId = 720864; - name = "Sébastien Bourdeauducq"; - }; - sbellem = { - email = "sbellem@gmail.com"; - github = "sbellem"; - githubId = 125458; - name = "Sylvain Bellemare"; - }; - sbond75 = { - name = "sbond75"; - github = "sbond75"; - githubId = 43617712; - }; - sboosali = { - email = "SamBoosalis@gmail.com"; - github = "sboosali"; - githubId = 2320433; - name = "Sam Boosalis"; - }; - sbruder = { - email = "nixos@sbruder.de"; - github = "sbruder"; - githubId = 15986681; - name = "Simon Bruder"; - }; - scalavision = { - email = "scalavision@gmail.com"; - github = "scalavision"; - githubId = 3958212; - name = "Tom Sorlie"; - }; - schmitthenner = { - email = "development@schmitthenner.eu"; - github = "fkz"; - githubId = 354463; - name = "Fabian Schmitthenner"; - }; - schmittlauch = { - name = "Trolli Schmittlauch"; - email = "t.schmittlauch+nixos@orlives.de"; - github = "schmittlauch"; - githubId = 1479555; - }; - schneefux = { - email = "schneefux+nixos_pkg@schneefux.xyz"; - github = "schneefux"; - githubId = 15379000; - name = "schneefux"; - }; - schnusch = { - github = "schnusch"; - githubId = 5104601; - name = "schnusch"; - }; - sciencentistguy = { - email = "jamie@quigley.xyz"; - name = "Jamie Quigley"; - github = "Sciencentistguy"; - githubId = 4983935; - keys = [{ - fingerprint = "30BB FF3F AB0B BB3E 0435 F83C 8E8F F66E 2AE8 D970"; - }]; - }; - scode = { - email = "peter.schuller@infidyne.com"; - github = "scode"; - githubId = 59476; - name = "Peter Schuller"; - }; - scoder12 = { - name = "Spencer Pogorzelski"; - github = "Scoder12"; - githubId = 34356756; - }; - scolobb = { - email = "sivanov@colimite.fr"; - github = "scolobb"; - githubId = 11320; - name = "Sergiu Ivanov"; - }; - screendriver = { - email = "nix@echooff.de"; - github = "screendriver"; - githubId = 149248; - name = "Christian Rackerseder"; - }; - Scriptkiddi = { - email = "nixos@scriptkiddi.de"; - matrix = "@fritz.otlinghaus:helsinki-systems.de"; - github = "Scriptkiddi"; - githubId = 3598650; - name = "Fritz Otlinghaus"; - }; - Scrumplex = { - name = "Sefa Eyeoglu"; - email = "contact@scrumplex.net"; - matrix = "@Scrumplex:duckhub.io"; - github = "Scrumplex"; - githubId = 11587657; - keys = [{ - fingerprint = "E173 237A C782 296D 98F5 ADAC E13D FD4B 4712 7951"; - }]; - }; - scubed2 = { - email = "scubed2@gmail.com"; - github = "scubed2"; - githubId = 7401858; - name = "Sterling Stein"; - }; - sdier = { - email = "scott@dier.name"; - matrix = "@sdier:matrix.org"; - github = "sdier"; - githubId = 11613056; - name = "Scott Dier"; - }; - SeanZicari = { - email = "sean.zicari@gmail.com"; - github = "SeanZicari"; - githubId = 2343853; - name = "Sean Zicari"; - }; - seb314 = { - email = "sebastian@seb314.com"; - github = "seb314"; - githubId = 19472270; - name = "Sebastian"; - }; - sebastianblunt = { - name = "Sebastian Blunt"; - email = "nix@sebastianblunt.com"; - github = "sebastianblunt"; - githubId = 47431204; - }; - sebbadk = { - email = "sebastian@sebba.dk"; - github = "SEbbaDK"; - githubId = 1567527; - name = "Sebastian Hyberts"; - }; - sebbel = { - email = "hej@sebastian-ball.de"; - github = "sebbel"; - githubId = 1940568; - name = "Sebastian Ball"; - }; - seberm = { - email = "seberm@seberm.com"; - github = "seberm"; - githubId = 212597; - name = "Otto Sabart"; - keys = [{ - fingerprint = "0AF6 4C3B 1F12 14B3 8C8C 5786 1FA2 DBE6 7438 7CC3"; - }]; - }; - sebtm = { - email = "mail@sebastian-sellmeier.de"; - github = "SebTM"; - githubId = 17243347; - name = "Sebastian Sellmeier"; - }; - sefidel = { - name = "sefidel"; - email = "contact@sefidel.net"; - matrix = "@sef:exotic.sh"; - github = "sefidel"; - githubId = 71049646; - keys = [{ - fingerprint = "8BDF DFB5 6842 2393 82A0 441B 9238 BC70 9E05 516A"; - }]; - }; - sei40kr = { - name = "Seong Yong-ju"; - email = "sei40kr@gmail.com"; - github = "sei40kr"; - githubId = 11665236; - }; - sellout = { - email = "greg@technomadic.org"; - github = "sellout"; - githubId = 33031; - name = "Greg Pfeil"; - }; - sengaya = { - email = "tlo@sengaya.de"; - github = "sengaya"; - githubId = 1286668; - name = "Thilo Uttendorfer"; - }; - sephalon = { - email = "me@sephalon.net"; - github = "sephalon"; - githubId = 893474; - name = "Stefan Wiehler"; - }; - sephi = { - name = "Sylvain Fankhauser"; - email = "sephi@fhtagn.top"; - github = "sephii"; - githubId = 754333; - keys = [{ - fingerprint = "2A9D 8E76 5EE2 237D 7B6B A2A5 4228 AB9E C061 2ADA"; - }]; - }; - sepi = { - email = "raffael@mancini.lu"; - github = "sepi"; - githubId = 529649; - name = "Raffael Mancini"; - }; - seppeljordan = { - email = "sebastian.jordan.mail@googlemail.com"; - github = "seppeljordan"; - githubId = 4805746; - name = "Sebastian Jordan"; - }; - seqizz = { - email = "seqizz@gmail.com"; - github = "seqizz"; - githubId = 307899; - name = "Gurkan Gur"; - }; - serge = { - email = "sb@canva.com"; - github = "serge-belov"; - githubId = 38824235; - name = "Serge Belov"; - }; - serge_sans_paille = { - email = "serge.guelton@telecom-bretagne.eu"; - github = "serge-sans-paille"; - githubId = 863807; - name = "Serge Guelton"; - }; - sersorrel = { - email = "ash@sorrel.sh"; - github = "sersorrel"; - githubId = 9433472; - name = "ash"; - }; - servalcatty = { - email = "servalcat@pm.me"; - github = "servalcatty"; - githubId = 51969817; - name = "Serval"; - keys = [{ - fingerprint = "A317 37B3 693C 921B 480C C629 4A2A AAA3 82F8 294C"; - }]; - }; - seylerius = { - name = "Sable Seyler"; - email = "sable@seyleri.us"; - github = "seylerius"; - githubId = 1145981; - keys = [{ - fingerprint = "7246 B6E1 ABB9 9A48 4395 FD11 DC26 B921 A9E9 DBDE"; - }]; - }; - sfrijters = { - email = "sfrijters@gmail.com"; - github = "SFrijters"; - githubId = 918365; - name = "Stefan Frijters"; - }; - sgo = { - email = "stig@stig.io"; - github = "stigtsp"; - githubId = 75371; - name = "Stig Palmquist"; - }; - sgraf = { - email = "sgraf1337@gmail.com"; - github = "sgraf812"; - githubId = 1151264; - name = "Sebastian Graf"; - }; - shadaj = { - github = "shadaj"; - githubId = 543055; - name = "Shadaj Laddad"; - }; - shadowrz = { - email = "shadowrz+nixpkgs@disroot.org"; - matrix = "@ShadowRZ:matrixim.cc"; - github = "ShadowRZ"; - githubId = 23130178; - name = "夜坂雅"; - }; - shahrukh330 = { - email = "shahrukh330@gmail.com"; - github = "shahrukh330"; - githubId = 1588288; - name = "Shahrukh Khan"; - }; - shamilton = { - email = "sgn.hamilton@protonmail.com"; - github = "SCOTT-HAMILTON"; - githubId = 24496705; - name = "Scott Hamilton"; - }; - ShamrockLee = { - name = "Shamrock Lee"; - github = "ShamrockLee"; - githubId = 44064051; - }; - shanesveller = { - email = "shane@sveller.dev"; - github = "shanesveller"; - githubId = 831; - keys = [{ - fingerprint = "F83C 407C ADC4 5A0F 1F2F 44E8 9210 C218 023C 15CD"; - }]; - name = "Shane Sveller"; - }; - shardy = { - email = "shardul@baral.ca"; - github = "shardulbee"; - githubId = 16765155; - name = "Shardul Baral"; - }; - sharzy = { - email = "me@sharzy.in"; - github = "SharzyL"; - githubId = 46294732; - name = "Sharzy"; - }; - shawn8901 = { - email = "shawn8901@googlemail.com"; - github = "Shawn8901"; - githubId = 12239057; - name = "Shawn8901"; - }; - shawndellysse = { - email = "sdellysse@gmail.com"; - github = "sdellysse"; - githubId = 293035; - name = "Shawn Dellysse"; - }; - shazow = { - email = "andrey.petrov@shazow.net"; - github = "shazow"; - githubId = 6292; - name = "Andrey Petrov"; - }; - sheenobu = { - email = "sheena.artrip@gmail.com"; - github = "sheenobu"; - githubId = 1443459; - name = "Sheena Artrip"; - }; - sheepforce = { - email = "phillip.seeber@googlemail.com"; - github = "sheepforce"; - githubId = 16844216; - name = "Phillip Seeber"; - }; - sheganinans = { - email = "sheganinans@gmail.com"; - github = "sheganinans"; - githubId = 2146203; - name = "Aistis Raulinaitis"; - }; - shell = { - email = "cam.turn@gmail.com"; - github = "VShell"; - githubId = 251028; - name = "Shell Turner"; - }; - shikanime = { - name = "William Phetsinorath"; - email = "deva.shikanime@protonmail.com"; - github = "shikanime"; - githubId = 22115108; - }; - shiryel = { - email = "contact@shiryel.com"; - name = "Shiryel"; - github = "shiryel"; - githubId = 35617139; - keys = [{ - fingerprint = "AB63 4CD9 3322 BD42 6231 F764 C404 1EA6 B326 33DE"; - }]; - }; - shlevy = { - email = "shea@shealevy.com"; - github = "shlevy"; - githubId = 487050; - name = "Shea Levy"; - }; - shmish111 = { - email = "shmish111@gmail.com"; - github = "shmish111"; - githubId = 934267; - name = "David Smith"; - }; - shnarazk = { - email = "shujinarazaki@protonmail.com"; - github = "shnarazk"; - githubId = 997855; - name = "Narazaki Shuji"; - }; - shofius = { - name = "Sam Hofius"; - email = "sam@samhofi.us"; - github = "kf5grd"; - githubId = 18297490; - }; - shou = { - email = "x+g@shou.io"; - github = "Shou"; - githubId = 819413; - name = "Benedict Aas"; - }; - shreerammodi = { - name = "Shreeram Modi"; - email = "shreerammodi10@gmail.com"; - github = "shrimpram"; - githubId = 67710369; - keys = [{ - fingerprint = "EA88 EA07 26E9 6CBF 6365 3966 163B 16EE 76ED 24CE"; - }]; - }; - shyim = { - email = "s.sayakci@gmail.com"; - github = "shyim"; - githubId = 6224096; - name = "Soner Sayakci"; - }; - siddharthist = { - email = "langston.barrett@gmail.com"; - github = "langston-barrett"; - githubId = 4294323; - name = "Langston Barrett"; - }; - sielicki = { - name = "Nicholas Sielicki"; - email = "nix@opensource.nslick.com"; - github = "sielicki"; - githubId = 4522995; - matrix = "@sielicki:matrix.org"; - }; - siers = { - email = "veinbahs+nixpkgs@gmail.com"; - github = "siers"; - githubId = 235147; - name = "Raitis Veinbahs"; - }; - sifmelcara = { - email = "ming@culpring.com"; - github = "sifmelcara"; - githubId = 10496191; - name = "Ming Chuan"; - }; - sigma = { - email = "yann.hodique@gmail.com"; - github = "sigma"; - githubId = 16090; - name = "Yann Hodique"; - }; - sikmir = { - email = "sikmir@disroot.org"; - github = "sikmir"; - githubId = 688044; - name = "Nikolay Korotkiy"; - keys = [{ - fingerprint = "ADF4 C13D 0E36 1240 BD01 9B51 D1DE 6D7F 6936 63A5"; - }]; - }; - simarra = { - name = "simarra"; - email = "loic.martel@protonmail.com"; - github = "Simarra"; - githubId = 14372987; - }; - simonchatts = { - email = "code@chatts.net"; - github = "simonchatts"; - githubId = 11135311; - name = "Simon Chatterjee"; - }; - simoneruffini = { - email = "simone.ruffini@tutanota.com"; - github = "simoneruffini"; - githubId = 50401154; - name = "Simone Ruffini"; - }; - simonkampe = { - email = "simon.kampe+nix@gmail.com"; - github = "simonkampe"; - githubId = 254799; - name = "Simon Kämpe"; - }; - simonvandel = { - email = "simon.vandel@gmail.com"; - github = "simonvandel"; - githubId = 2770647; - name = "Simon Vandel Sillesen"; - }; - sioodmy = { - name = "Antoni Sokołowski"; - github = "sioodmy"; - githubId = 81568712; - }; - siph = { - name = "Chris Dawkins"; - email = "dawkins.chris.dev@gmail.com"; - github = "siph"; - githubId = 6619112; - }; - sir4ur0n = { - github = "sir4ur0n"; - githubId = 1204125; - name = "sir4ur0n"; - }; - siraben = { - email = "bensiraphob@gmail.com"; - matrix = "@siraben:matrix.org"; - github = "siraben"; - githubId = 8219659; - name = "Siraphob Phipathananunth"; - }; - siriobalmelli = { - email = "sirio@b-ad.ch"; - github = "siriobalmelli"; - githubId = 23038812; - name = "Sirio Balmelli"; - keys = [{ - fingerprint = "B234 EFD4 2B42 FE81 EE4D 7627 F72C 4A88 7F9A 24CA"; - }]; - }; - sirseruju = { - email = "sir.seruju@yandex.ru"; - github = "SirSeruju"; - githubId = 74881555; - name = "Fofanov Sergey"; - }; - sivteck = { - email = "sivaram1992@gmail.com"; - github = "sivteck"; - githubId = 8017899; - name = "Sivaram Balakrishnan"; - }; - sjagoe = { - email = "simon@simonjagoe.com"; - github = "sjagoe"; - githubId = 80012; - name = "Simon Jagoe"; - }; - sjau = { - email = "nixos@sjau.ch"; - github = "sjau"; - githubId = 848812; - name = "Stephan Jau"; - }; - sjfloat = { - email = "steve+nixpkgs@jonescape.com"; - github = "sjfloat"; - githubId = 216167; - name = "Steve Jones"; - }; - sjmackenzie = { - email = "setori88@gmail.com"; - github = "sjmackenzie"; - githubId = 158321; - name = "Stewart Mackenzie"; - }; - skeidel = { - email = "svenkeidel@gmail.com"; - github = "svenkeidel"; - githubId = 266500; - name = "Sven Keidel"; - }; - skykanin = { - github = "skykanin"; - githubId = 3789764; - name = "skykanin"; - }; - sleexyz = { - email = "freshdried@gmail.com"; - github = "sleexyz"; - githubId = 1505617; - name = "Sean Lee"; - }; - SlothOfAnarchy = { - email = "slothofanarchy1@gmail.com"; - matrix = "@michel.weitbrecht:helsinki-systems.de"; - github = "SlothOfAnarchy"; - githubId = 12828415; - name = "Michel Weitbrecht"; - }; - smakarov = { - email = "setser200018@gmail.com"; - github = "SeTSeR"; - githubId = 12733495; - name = "Sergey Makarov"; - keys = [{ - fingerprint = "6F8A 18AE 4101 103F 3C54 24B9 6AA2 3A11 93B7 064B"; - }]; - }; - smancill = { - email = "smancill@smancill.dev"; - github = "smancill"; - githubId = 238528; - name = "Sebastián Mancilla"; - }; - smaret = { - email = "sebastien.maret@icloud.com"; - github = "smaret"; - githubId = 95471; - name = "Sébastien Maret"; - keys = [{ - fingerprint = "4242 834C D401 86EF 8281 4093 86E3 0E5A 0F5F C59C"; - }]; - }; - smasher164 = { - email = "aindurti@gmail.com"; - github = "smasher164"; - githubId = 12636891; - name = "Akhil Indurti"; - }; - smironov = { - email = "grrwlf@gmail.com"; - github = "grwlf"; - githubId = 4477729; - name = "Sergey Mironov"; - }; - smitop = { - name = "Smitty van Bodegom"; - email = "me@smitop.com"; - matrix = "@smitop:kde.org"; - github = "syvb"; - githubId = 10530973; - }; - sna = { - email = "abouzahra.9@wright.edu"; - github = "S-NA"; - githubId = 20214715; - name = "S. Nordin Abouzahra"; - }; - snaar = { - email = "snaar@snaar.net"; - github = "snaar"; - githubId = 602439; - name = "Serguei Narojnyi"; - }; - snapdgn = { - email = "snapdgn@proton.me"; - name = "Nitish Kumar"; - github = "snapdgn"; - githubId = 85608760; - }; - snglth = { - email = "illia@ishestakov.com"; - github = "snglth"; - githubId = 8686360; - name = "Illia Shestakov"; - }; - snicket2100 = { - github = "snicket2100"; - githubId = 57048005; - name = "snicket2100"; - }; - sno2wman = { - name = "SnO2WMaN"; - email = "me@sno2wman.net"; - github = "SnO2WMaN"; - githubId = 15155608; - }; - snpschaaf = { - email = "philipe.schaaf@secunet.com"; - name = "Philippe Schaaf"; - github = "snpschaaf"; - githubId = 105843013; - }; - snyh = { - email = "snyh@snyh.org"; - github = "snyh"; - githubId = 1437166; - name = "Xia Bin"; - }; - softinio = { - email = "code@softinio.com"; - github = "softinio"; - githubId = 3371635; - name = "Salar Rahmanian"; - }; - sohalt = { - email = "nixos@sohalt.net"; - github = "Sohalt"; - githubId = 2157287; - name = "sohalt"; - }; - SohamG = { - email = "sohamg2@gmail.com"; - name = "Soham S Gumaste"; - github = "SohamG"; - githubId = 7116239; - keys = [{ - fingerprint = "E067 520F 5EF2 C175 3F60 50C0 BA46 725F 6A26 7442"; - }]; - }; - solson = { - email = "scott@solson.me"; - matrix = "@solson:matrix.org"; - github = "solson"; - githubId = 26806; - name = "Scott Olson"; - }; - somasis = { - email = "kylie@somas.is"; - github = "somasis"; - githubId = 264788; - name = "Kylie McClain"; - }; - SomeoneSerge = { - email = "sergei.kozlukov@aalto.fi"; - matrix = "@ss:someonex.net"; - github = "SomeoneSerge"; - githubId = 9720532; - name = "Sergei K"; - }; - sophrosyne = { - email = "joshuaortiz@tutanota.com"; - github = "sophrosyne97"; - githubId = 53029739; - name = "Joshua Ortiz"; - }; - sorki = { - email = "srk@48.io"; - github = "sorki"; - githubId = 115308; - name = "Richard Marko"; - }; - sorpaas = { - email = "hi@that.world"; - github = "sorpaas"; - githubId = 6277322; - name = "Wei Tang"; - }; - soywod = { - name = "Clément DOUIN"; - email = "clement.douin@posteo.net"; - matrix = "@soywod:matrix.org"; - github = "soywod"; - githubId = 10437171; - keys = [{ - fingerprint = "75F0 AB7C FE01 D077 AEE6 CAFD 353E 4A18 EE0F AB72"; - }]; - }; - spacefrogg = { - email = "spacefrogg-nixos@meterriblecrew.net"; - github = "spacefrogg"; - githubId = 167881; - name = "Michael Raitza"; - }; - spacekookie = { - email = "kookie@spacekookie.de"; - github = "spacekookie"; - githubId = 7669898; - name = "Katharina Fey"; - }; - spease = { - email = "peasteven@gmail.com"; - github = "spease"; - githubId = 2825204; - name = "Steven Pease"; - }; - spencerjanssen = { - email = "spencerjanssen@gmail.com"; - matrix = "@sjanssen:matrix.org"; - github = "spencerjanssen"; - githubId = 2600039; - name = "Spencer Janssen"; - }; - spinus = { - email = "tomasz.czyz@gmail.com"; - github = "spinus"; - githubId = 950799; - name = "Tomasz Czyż"; - }; - sprock = { - email = "rmason@mun.ca"; - github = "sprock"; - githubId = 6391601; - name = "Roger Mason"; - }; - spwhitt = { - email = "sw@swhitt.me"; - github = "spwhitt"; - githubId = 1414088; - name = "Spencer Whitt"; - }; - squalus = { - email = "squalus@squalus.net"; - github = "squalus"; - githubId = 36899624; - name = "squalus"; - }; - squarepear = { - email = "contact@jeffreyharmon.dev"; - github = "SquarePear"; - githubId = 16364318; - name = "Jeffrey Harmon"; - }; - srapenne = { - email = "solene@perso.pw"; - github = "rapenne-s"; - githubId = 248016; - name = "Solène Rapenne"; - }; - srghma = { - email = "srghma@gmail.com"; - github = "srghma"; - githubId = 7573215; - name = "Sergei Khoma"; - }; - srgom = { - github = "SRGOM"; - githubId = 8103619; - name = "SRGOM"; - }; - srhb = { - email = "sbrofeldt@gmail.com"; - matrix = "@srhb:matrix.org"; - github = "srhb"; - githubId = 219362; - name = "Sarah Brofeldt"; - }; - srounce = { - name = "Samuel Rounce"; - email = "me@samuelrounce.co.uk"; - github = "srounce"; - githubId = 60792; - }; - SShrike = { - email = "severen@shrike.me"; - github = "severen"; - githubId = 4061736; - name = "Severen Redwood"; - }; - sstef = { - email = "stephane@nix.frozenid.net"; - github = "haskelious"; - githubId = 8668915; - name = "Stephane Schitter"; - }; - staccato = { - name = "staccato"; - email = "moveq@riseup.net"; - github = "braaandon"; - githubId = 86573128; - }; - stackshadow = { - email = "stackshadow@evilbrain.de"; - github = "stackshadow"; - githubId = 7512804; - name = "Martin Langlotz"; - }; - starcraft66 = { - name = "Tristan Gosselin-Hane"; - email = "starcraft66@gmail.com"; - github = "starcraft66"; - githubId = 1858154; - keys = [{ - fingerprint = "8597 4506 EC69 5392 0443 0805 9D98 CDAC FF04 FD78"; - }]; - }; - stargate01 = { - email = "christoph.honal@web.de"; - github = "StarGate01"; - githubId = 6362238; - name = "Christoph Honal"; - }; - star-szr = { - email = "nixpkgs@scottr.mailworks.org"; - github = "star-szr"; - githubId = 327943; - name = "Scott Zhu Reeves"; - }; - stasjok = { - name = "Stanislav Asunkin"; - email = "nixpkgs@stasjok.ru"; - github = "stasjok"; - githubId = 1353637; - }; - steamwalker = { - email = "steamwalker@xs4all.nl"; - github = "steamwalker"; - githubId = 94006354; - name = "steamwalker"; - }; - steell = { - email = "steve@steellworks.com"; - github = "Steell"; - githubId = 1699155; - name = "Steve Elliott"; - }; - stefanfehrenbach = { - email = "stefan.fehrenbach@gmail.com"; - github = "fehrenbach"; - githubId = 203168; - name = "Stefan Fehrenbach"; - }; - stehessel = { - email = "stephan@stehessel.de"; - github = "stehessel"; - githubId = 55607356; - name = "Stephan Heßelmann"; - }; - steinybot = { - name = "Jason Pickens"; - email = "jasonpickensnz@gmail.com"; - matrix = "@steinybot:matrix.org"; - github = "steinybot"; - githubId = 4659562; - keys = [{ - fingerprint = "2709 1DEC CC42 4635 4299 569C 21DE 1CAE 5976 2A0F"; - }]; - }; - stelcodes = { - email = "stel@stel.codes"; - github = "stelcodes"; - githubId = 22163194; - name = "Stel Abrego"; - }; - stepbrobd = { - name = "StepBroBD"; - github = "StepBroBD"; - githubId = 81826728; - email = "Hi@StepBroBD.com"; - matrix = "@stepbrobd:matrix.org"; - keys = [{ - fingerprint = "5D8B FA8B 286A C2EF 6EE4 8598 F742 B72C 8926 1A51"; - }]; - }; - stepech = { - name = "stepech"; - github = "stepech"; - githubId = 29132060; - matrix = "@stepech:matrix.org"; - }; - stephank = { - email = "nix@stephank.nl"; - matrix = "@skochen:matrix.org"; - github = "stephank"; - githubId = 89950; - name = "Stéphan Kochen"; - }; - stephenmw = { - email = "stephen@q5comm.com"; - github = "stephenmw"; - githubId = 231788; - name = "Stephen Weinberg"; - }; - stephenwithph = { - name = "StephenWithPH"; - github = "StephenWithPH"; - githubId = 2990492; - }; - sterfield = { - email = "sterfield@gmail.com"; - github = "sterfield"; - githubId = 5747061; - name = "Guillaume Loetscher"; - }; - sternenseemann = { - email = "sternenseemann@systemli.org"; - github = "sternenseemann"; - githubId = 3154475; - name = "Lukas Epple"; - }; - steshaw = { - name = "Steven Shaw"; - email = "steven@steshaw.org"; - github = "steshaw"; - githubId = 45735; - keys = [{ - fingerprint = "0AFE 77F7 474D 1596 EE55 7A29 1D9A 17DF D23D CB91"; - }]; - }; - stesie = { - email = "stesie@brokenpipe.de"; - github = "stesie"; - githubId = 113068; - name = "Stefan Siegl"; - }; - stevebob = { - email = "stephen@sherra.tt"; - github = "gridbugs"; - githubId = 417118; - name = "Stephen Sherratt"; - }; - steve-chavez = { - email = "stevechavezast@gmail.com"; - github = "steve-chavez"; - githubId = 1829294; - name = "Steve Chávez"; - }; - steveej = { - email = "mail@stefanjunker.de"; - github = "steveeJ"; - githubId = 1181362; - name = "Stefan Junker"; - }; - stevenroose = { - email = "github@stevenroose.org"; - github = "stevenroose"; - githubId = 853468; - name = "Steven Roose"; - }; - stianlagstad = { - email = "stianlagstad@gmail.com"; - github = "stianlagstad"; - githubId = 4340859; - name = "Stian Lågstad"; - }; - StijnDW = { - email = "nixdev@rinsa.eu"; - github = "Stekke"; - githubId = 1751956; - name = "Stijn DW"; - }; - StillerHarpo = { - email = "engelflorian@posteo.de"; - github = "StillerHarpo"; - githubId = 25526706; - name = "Florian Engel"; - keys = [{ fingerprint = "4E2D9B26940E0DABF376B7AF76762421D45837DE"; }]; - matrix = "@qe7ftcyrpg:matrix.org"; - }; - stites = { - email = "sam@stites.io"; - github = "stites"; - githubId = 1694705; - name = "Sam Stites"; - }; - strager = { - email = "strager.nds@gmail.com"; - github = "strager"; - githubId = 48666; - name = "Matthew \"strager\" Glazar"; - }; - strikerlulu = { - email = "strikerlulu7@gmail.com"; - github = "strikerlulu"; - githubId = 38893265; - name = "StrikerLulu"; - }; - stumoss = { - email = "samoss@gmail.com"; - github = "stumoss"; - githubId = 638763; - name = "Stuart Moss"; - }; - stunkymonkey = { - email = "account@buehler.rocks"; - github = "Stunkymonkey"; - githubId = 1315818; - name = "Felix Bühler"; - }; - stupremee = { - email = "jutus.k@protonmail.com"; - github = "Stupremee"; - githubId = 39732259; - name = "Justus K"; - }; - SubhrajyotiSen = { - email = "subhrajyoti12@gmail.com"; - github = "SubhrajyotiSen"; - githubId = 12984845; - name = "Subhrajyoti Sen"; - }; - sudosubin = { - email = "sudosubin@gmail.com"; - github = "sudosubin"; - githubId = 32478597; - name = "Subin Kim"; - }; - suhr = { - email = "suhr@i2pmail.org"; - github = "suhr"; - githubId = 65870; - name = "Сухарик"; - }; - sumnerevans = { - email = "me@sumnerevans.com"; - github = "sumnerevans"; - githubId = 16734772; - name = "Sumner Evans"; - }; - suominen = { - email = "kimmo@suominen.com"; - github = "suominen"; - githubId = 1939855; - name = "Kimmo Suominen"; - }; - superbo = { - email = "supernbo@gmail.com"; - github = "SuperBo"; - githubId = 2666479; - name = "Y Nguyen"; - }; - SuperSandro2000 = { - email = "sandro.jaeckel@gmail.com"; - matrix = "@sandro:supersandro.de"; - github = "SuperSandro2000"; - githubId = 7258858; - name = "Sandro Jäckel"; - }; - SuprDewd = { - email = "suprdewd@gmail.com"; - github = "SuprDewd"; - githubId = 187109; - name = "Bjarki Ágúst Guðmundsson"; - }; - surfaceflinger = { - email = "nat@nekopon.pl"; - github = "surfaceflinger"; - githubId = 44725111; - name = "nat"; - }; - suryasr007 = { - email = "94suryateja@gmail.com"; - github = "suryasr007"; - githubId = 10533926; - name = "Surya Teja V"; - }; - suvash = { - email = "suvash+nixpkgs@gmail.com"; - github = "suvash"; - githubId = 144952; - name = "Suvash Thapaliya"; - }; - sveitser = { - email = "sveitser@gmail.com"; - github = "sveitser"; - githubId = 1040871; - name = "Mathis Antony"; - }; - svend = { - email = "svend@svends.net"; - github = "svend"; - githubId = 306190; - name = "Svend Sorensen"; - }; - sven-of-cord = { - email = "sven@cord.com"; - github = "sven-of-cord"; - githubId = 98333944; - name = "Sven Over"; - }; - svrana = { - email = "shaw@vranix.com"; - github = "svrana"; - githubId = 850665; - name = "Shaw Vrana"; - }; - svsdep = { - email = "svsdep@gmail.com"; - github = "svsdep"; - githubId = 36695359; - name = "Vasyl Solovei"; - }; - swarren83 = { - email = "shawn.w.warren@gmail.com"; - github = "swarren83"; - githubId = 4572854; - name = "Shawn Warren"; - }; - swdunlop = { - email = "swdunlop@gmail.com"; - github = "swdunlop"; - githubId = 120188; - name = "Scott W. Dunlop"; - }; - sweber = { - email = "sweber2342+nixpkgs@gmail.com"; - github = "sweber83"; - githubId = 19905904; - name = "Simon Weber"; - }; - sweenu = { - name = "sweenu"; - email = "contact@sweenu.xyz"; - github = "sweenu"; - githubId = 7051978; - }; - swflint = { - email = "swflint@flintfam.org"; - github = "swflint"; - githubId = 1771109; - name = "Samuel W. Flint"; - }; - swistak35 = { - email = "me@swistak35.com"; - github = "swistak35"; - githubId = 332289; - name = "Rafał Łasocha"; - }; - syberant = { - email = "sybrand@neuralcoding.com"; - github = "syberant"; - githubId = 20063502; - name = "Sybrand Aarnoutse"; - }; - symphorien = { - email = "symphorien_nixpkgs@xlumurb.eu"; - matrix = "@symphorien:xlumurb.eu"; - github = "symphorien"; - githubId = 12595971; - name = "Guillaume Girol"; - }; - synthetica = { - email = "nix@hilhorst.be"; - github = "Synthetica9"; - githubId = 7075751; - name = "Patrick Hilhorst"; - }; - szczyp = { - email = "qb@szczyp.com"; - github = "Szczyp"; - githubId = 203195; - name = "Szczyp"; - }; - szlend = { - email = "pub.nix@zlender.si"; - github = "szlend"; - githubId = 7301807; - name = "Simon Žlender"; - }; - sztupi = { - email = "attila.sztupak@gmail.com"; - github = "sztupi"; - githubId = 143103; - name = "Attila Sztupak"; - }; - t184256 = { - email = "monk@unboiled.info"; - github = "t184256"; - githubId = 5991987; - name = "Alexander Sosedkin"; - }; - t4ccer = { - email = "t4ccer@gmail.com"; - github = "t4ccer"; - githubId = 64430288; - name = "Tomasz Maciosowski"; - keys = [{ - fingerprint = "6866 981C 4992 4D64 D154 E1AC 19E5 A2D8 B1E4 3F19"; - }]; - }; - tadeokondrak = { - email = "me@tadeo.ca"; - github = "tadeokondrak"; - githubId = 4098453; - name = "Tadeo Kondrak"; - keys = [{ - fingerprint = "0F2B C0C7 E77C 5B42 AC5B 4C18 FBE6 07FC C495 16D3"; - }]; - }; - tadfisher = { - email = "tadfisher@gmail.com"; - github = "tadfisher"; - githubId = 129148; - name = "Tad Fisher"; - }; - taeer = { - email = "taeer@necsi.edu"; - github = "Radvendii"; - githubId = 1239929; - name = "Taeer Bar-Yam"; - }; - taha = { - email = "xrcrod@gmail.com"; - github = "tgharib"; - githubId = 6457015; - name = "Taha Gharib"; - }; - taikx4 = { - email = "taikx4@taikx4szlaj2rsdupcwabg35inbny4jk322ngeb7qwbbhd5i55nf5yyd.onion"; - github = "taikx4"; - githubId = 94917129; - name = "taikx4"; - keys = [{ - fingerprint = "6B02 8103 C4E5 F68C D77C 9E54 CCD5 2C7B 37BB 837E"; - }]; - }; - tailhook = { - email = "paul@colomiets.name"; - github = "tailhook"; - githubId = 321799; - name = "Paul Colomiets"; - }; - takagiy = { - email = "takagiy.4dev@gmail.com"; - github = "takagiy"; - githubId = 18656090; - name = "Yuki Takagi"; - }; - taketwo = { - email = "alexandrov88@gmail.com"; - github = "taketwo"; - githubId = 1241736; - name = "Sergey Alexandrov"; - }; - takikawa = { - email = "asumu@igalia.com"; - github = "takikawa"; - githubId = 64192; - name = "Asumu Takikawa"; - }; - taktoa = { - email = "taktoa@gmail.com"; - matrix = "@taktoa:matrix.org"; - github = "taktoa"; - githubId = 553443; - name = "Remy Goldschmidt"; - }; - taku0 = { - email = "mxxouy6x3m_github@tatapa.org"; - github = "taku0"; - githubId = 870673; - name = "Takuo Yonezawa"; - }; - talkara = { - email = "taito.horiuchi@relexsolutions.com"; - github = "talkara"; - githubId = 51232929; - name = "Taito Horiuchi"; - }; - talyz = { - email = "kim.lindberger@gmail.com"; - matrix = "@talyz:matrix.org"; - github = "talyz"; - githubId = 63433; - name = "Kim Lindberger"; - }; - taneb = { - email = "nvd1234@gmail.com"; - github = "Taneb"; - githubId = 1901799; - name = "Nathan van Doorn"; - }; - tari = { - email = "peter@taricorp.net"; - github = "tari"; - githubId = 506181; - name = "Peter Marheine"; - }; - tasmo = { - email = "tasmo@tasmo.de"; - github = "tasmo"; - githubId = 102685; - name = "Thomas Friese"; - }; - taylor1791 = { - email = "nixpkgs@tayloreverding.com"; - github = "taylor1791"; - githubId = 555003; - name = "Taylor Everding"; - }; - tazjin = { - email = "mail@tazj.in"; - github = "tazjin"; - githubId = 1552853; - name = "Vincent Ambo"; - }; - tbenst = { - email = "nix@tylerbenster.com"; - github = "tbenst"; - githubId = 863327; - name = "Tyler Benster"; - }; - tboerger = { - email = "thomas@webhippie.de"; - matrix = "@tboerger:matrix.org"; - github = "tboerger"; - githubId = 156964; - name = "Thomas Boerger"; - }; - tcbravo = { - email = "tomas.bravo@protonmail.ch"; - github = "tcbravo"; - githubId = 66133083; - name = "Tomas Bravo"; - }; - tchab = { - email = "dev@chabs.name"; - github = "t-chab"; - githubId = 2120966; - name = "t-chab"; - }; - tchekda = { - email = "contact@tchekda.fr"; - github = "Tchekda"; - githubId = 23559888; - keys = [{ - fingerprint = "44CE A8DD 3B31 49CD 6246 9D8F D0A0 07ED A4EA DA0F"; - }]; - name = "David Tchekachev"; - }; - tcheronneau = { - email = "nix@mcth.fr"; - github = "tcheronneau"; - githubId = 7914437; - name = "Thomas Cheronneau"; - }; - tckmn = { - email = "andy@tck.mn"; - github = "tckmn"; - githubId = 2389333; - name = "Andy Tockman"; - }; - techknowlogick = { - email = "techknowlogick@gitea.io"; - github = "techknowlogick"; - githubId = 164197; - name = "techknowlogick"; - }; - Technical27 = { - github = "Technical27"; - githubId = 38222826; - name = "Aamaruvi Yogamani"; - }; - teh = { - email = "tehunger@gmail.com"; - github = "teh"; - githubId = 139251; - name = "Tom Hunger"; - }; - tehmatt = { - name = "tehmatt"; - email = "nix@programsareproofs.com"; - github = "tehmatt"; - githubId = 3358866; - }; - tejasag = { - name = "Tejas Agarwal"; - email = "tejasagarwalbly@gmail.com"; - github = "tejasag"; - githubId = 67542663; - }; - tejing = { - name = "Jeff Huffman"; - email = "tejing@tejing.com"; - matrix = "@tejing:matrix.org"; - github = "tejing1"; - githubId = 5663576; - keys = [{ fingerprint = "6F0F D43B 80E5 583E 60FC 51DC 4936 D067 EB12 AB32"; }]; - }; - telotortium = { - email = "rirelan@gmail.com"; - github = "telotortium"; - githubId = 1755789; - name = "Robert Irelan"; - }; - tennox = { - email = "tennox+nix@txlab.io"; - github = "tennox"; - githubId = 2084639; - name = "Manu"; - }; - teozkr = { - email = "teo@nullable.se"; - github = "nightkr"; - githubId = 649832; - name = "Teo Klestrup Röijezon"; - }; - terin = { - email = "terinjokes@gmail.com"; - github = "terinjokes"; - githubId = 273509; - name = "Terin Stock"; - }; - terlar = { - email = "terlar@gmail.com"; - github = "terlar"; - githubId = 280235; - name = "Terje Larsen"; - }; - terrorjack = { - email = "astrohavoc@gmail.com"; - github = "TerrorJack"; - githubId = 3889585; - name = "Cheng Shao"; - }; - tesq0 = { - email = "mikolaj.galkowski@gmail.com"; - github = "tesq0"; - githubId = 26417242; - name = "Mikolaj Galkowski"; - }; - TethysSvensson = { - email = "freaken@freaken.dk"; - github = "TethysSvensson"; - githubId = 4294434; - name = "Tethys Svensson"; - }; - teto = { - email = "mcoudron@hotmail.com"; - github = "teto"; - githubId = 886074; - name = "Matthieu Coudron"; - }; - teutat3s = { - email = "teutates@mailbox.org"; - matrix = "@teutat3s:pub.solar"; - github = "teutat3s"; - githubId = 10206665; - name = "teutat3s"; - keys = [{ - fingerprint = "81A1 1C61 F413 8C84 9139 A4FA 18DA E600 A6BB E705"; - }]; - }; - tex = { - email = "milan.svoboda@centrum.cz"; - github = "tex"; - githubId = 27386; - name = "Milan Svoboda"; - }; - tfc = { - email = "jacek@galowicz.de"; - matrix = "@jonge:ukvly.org"; - github = "tfc"; - githubId = 29044; - name = "Jacek Galowicz"; - }; - tfmoraes = { - name = "Thiago Franco de Moraes"; - github = "tfmoraes"; - githubId = 351108; - }; - tgunnoe = { - email = "t@gvno.net"; - github = "tgunnoe"; - githubId = 7254833; - name = "Taylor Gunnoe"; - }; - tg-x = { - email = "*@tg-x.net"; - github = "tg-x"; - githubId = 378734; - name = "TG ⊗ Θ"; - }; - th0rgal = { - email = "thomas.marchand@tuta.io"; - github = "Th0rgal"; - githubId = 41830259; - name = "Thomas Marchand"; - }; - thall = { - email = "niclas.thall@gmail.com"; - github = "thall"; - githubId = 102452; - name = "Niclas Thall"; - }; - thammers = { - email = "jawr@gmx.de"; - github = "tobias-hammerschmidt"; - githubId = 2543259; - name = "Tobias Hammerschmidt"; - }; - thanegill = { - email = "me@thanegill.com"; - github = "thanegill"; - githubId = 1141680; - name = "Thane Gill"; - }; - thblt = { - name = "Thibault Polge"; - email = "thibault@thb.lt"; - matrix = "@thbltp:matrix.org"; - github = "thblt"; - githubId = 2453136; - keys = [{ - fingerprint = "D2A2 F0A1 E7A8 5E6F B711 DEE5 63A4 4817 A52E AB7B"; - }]; - }; - the-argus = { - email = "i.mcfarlane2002@gmail.com"; - github = "the-argus"; - name = "Ian McFarlane"; - githubId = 70479099; - matrix = "@eyes1238:matrix.org"; - }; - TheBrainScrambler = { - email = "esthromeris@riseup.net"; - github = "TheBrainScrambler"; - githubId = 34945377; - name = "John Smith"; - }; - thedavidmeister = { - email = "thedavidmeister@gmail.com"; - github = "thedavidmeister"; - githubId = 629710; - name = "David Meister"; - }; - thefenriswolf = { - email = "stefan.rohrbacher97@gmail.com"; - github = "thefenriswolf"; - githubId = 8547242; - name = "Stefan Rohrbacher"; - }; - thefloweringash = { - email = "lorne@cons.org.nz"; - github = "thefloweringash"; - githubId = 42933; - name = "Andrew Childs"; - }; - thehedgeh0g = { - name = "The Hedgehog"; - email = "hedgehog@mrhedgehog.xyz"; - matrix = "@mrhedgehog:jupiterbroadcasting.com"; - github = "theHedgehog0"; - githubId = 35778371; - keys = [{ - fingerprint = "38A0 29B0 4A7E 4C13 A4BB 86C8 7D51 0786 6B1C 6752"; - }]; - }; - thekostins = { - name = "Konstantin"; - email = "anisimovkosta19@gmail.com"; - github = "TheKostins"; - githubId = 39405421; - keys = [{ - fingerprint = "B216 7B33 E248 097F D82A 991D C94D 589A 4D0D CDD2"; - }]; - }; - thelegy = { - email = "mail+nixos@0jb.de"; - github = "thelegy"; - githubId = 3105057; - name = "Jan Beinke"; - }; - thenonameguy = { - email = "thenonameguy24@gmail.com"; - name = "Krisztian Szabo"; - github = "thenonameguy"; - githubId = 2217181; - }; - therealansh = { - email = "tyagiansh23@gmail.com"; - github = "therealansh"; - githubId = 57180880; - name = "Ansh Tyagi"; - }; - therishidesai = { - email = "desai.rishi1@gmail.com"; - github = "therishidesai"; - githubId = 5409166; - name = "Rishi Desai"; - }; - thesola10 = { - email = "me@thesola.io"; - github = "Thesola10"; - githubId = 7287268; - keys = [{ - fingerprint = "1D05 13A6 1AC4 0D8D C6D6 5F2C 8924 5619 BEBB 95BA"; - }]; - name = "Karim Vergnes"; - }; - thetallestjj = { - email = "me+nixpkgs@jeroen-jetten.com"; - github = "TheTallestJJ"; - githubId = 6579555; - name = "Jeroen Jetten"; - }; - theuni = { - email = "ct@flyingcircus.io"; - github = "ctheune"; - githubId = 1220572; - name = "Christian Theune"; - }; - thiagokokada = { - email = "thiagokokada@gmail.com"; - github = "thiagokokada"; - githubId = 844343; - name = "Thiago K. Okada"; - matrix = "@k0kada:matrix.org"; - }; - thibaultlemaire = { - email = "thibault.lemaire@protonmail.com"; - github = "ThibaultLemaire"; - githubId = 21345269; - name = "Thibault Lemaire"; - }; - thibautmarty = { - email = "github@thibautmarty.fr"; - matrix = "@thibaut:thibautmarty.fr"; - github = "ThibautMarty"; - githubId = 3268082; - name = "Thibaut Marty"; - }; - thielema = { - name = "Henning Thielemann"; - email = "nix@henning-thielemann.de"; - github = "thielema"; - githubId = 898989; - }; - thled = { - name = "Thomas Le Duc"; - email = "dev@tleduc.de"; - github = "thled"; - githubId = 28220902; - }; - thmzlt = { - email = "git@thomazleite.com"; - github = "thmzlt"; - githubId = 7709; - name = "Thomaz Leite"; - }; - thomasdesr = { - email = "git@hive.pw"; - github = "thomasdesr"; - githubId = 681004; - name = "Thomas Desrosiers"; - }; - thomasjm = { - email = "tom@codedown.io"; - github = "thomasjm"; - githubId = 1634990; - name = "Tom McLaughlin"; - }; - ThomasMader = { - email = "thomas.mader@gmail.com"; - github = "ThomasMader"; - githubId = 678511; - name = "Thomas Mader"; - }; - thornycrackers = { - email = "codyfh@gmail.com"; - github = "thornycrackers"; - githubId = 4313010; - name = "Cody Hiar"; - }; - thoughtpolice = { - email = "aseipp@pobox.com"; - github = "thoughtpolice"; - githubId = 3416; - name = "Austin Seipp"; - }; - thpham = { - email = "thomas.pham@ithings.ch"; - github = "thpham"; - githubId = 224674; - name = "Thomas Pham"; - }; - Thra11 = { - email = "tahall256@protonmail.ch"; - github = "Thra11"; - githubId = 1391883; - name = "Tom Hall"; - }; - thubrecht = { - email = "tom@hubrecht.ovh"; - github = "Tom-Hubrecht"; - githubId = 26650391; - name = "Tom Hubrecht"; - }; - Thunderbottom = { - email = "chinmaydpai@gmail.com"; - github = "Thunderbottom"; - githubId = 11243138; - name = "Chinmay D. Pai"; - keys = [{ - fingerprint = "7F3E EEAA EE66 93CC 8782 042A 7550 7BE2 56F4 0CED"; - }]; - }; - thyol = { - name = "thyol"; - email = "thyol@pm.me"; - github = "thyol"; - githubId = 81481634; - }; - tiagolobocastro = { - email = "tiagolobocastro@gmail.com"; - github = "tiagolobocastro"; - githubId = 1618946; - name = "Tiago Castro"; - }; - tie = { - name = "Ivan Trubach"; - email = "mr.trubach@icloud.com"; - github = "tie"; - githubId = 14792994; - }; - tilcreator = { - name = "TilCreator"; - email = "contact.nixos@tc-j.de"; - matrix = "@tilcreator:matrix.org"; - github = "TilCreator"; - githubId = 18621411; - }; - tilpner = { - email = "till@hoeppner.ws"; - github = "tilpner"; - githubId = 4322055; - name = "Till Höppner"; - }; - timbertson = { - email = "tim@gfxmonk.net"; - github = "timbertson"; - githubId = 14172; - name = "Tim Cuthbertson"; - }; - timma = { - email = "kunduru.it.iitb@gmail.com"; - github = "ktrsoft"; - githubId = 12712927; - name = "Timma"; - }; - timokau = { - email = "timokau@zoho.com"; - github = "timokau"; - githubId = 3799330; - name = "Timo Kaufmann"; - }; - timor = { - email = "timor.dd@googlemail.com"; - github = "timor"; - githubId = 174156; - name = "timor"; - }; - timput = { - email = "tim@timput.com"; - github = "TimPut"; - githubId = 2845239; - name = "Tim Put"; - }; - timstott = { - email = "stott.timothy@gmail.com"; - github = "timstott"; - githubId = 1334474; - name = "Timothy Stott"; - }; - tiramiseb = { - email = "sebastien@maccagnoni.eu"; - github = "tiramiseb"; - githubId = 1292007; - name = "Sébastien Maccagnoni"; - }; - tirex = { - email = "szymon@kliniewski.pl"; - name = "Szymon Kliniewski"; - github = "NoneTirex"; - githubId = 26038207; - }; - titanous = { - email = "jonathan@titanous.com"; - github = "titanous"; - githubId = 13026; - name = "Jonathan Rudenberg"; - }; - tjni = { - email = "43ngvg@masqt.com"; - matrix = "@tni:matrix.org"; - name = "Theodore Ni"; - github = "tjni"; - githubId = 3806110; - keys = [{ - fingerprint = "4384 B8E1 299F C028 1641 7B8F EC30 EFBE FA7E 84A4"; - }]; - }; - tkerber = { - email = "tk@drwx.org"; - github = "tkerber"; - githubId = 5722198; - name = "Thomas Kerber"; - keys = [{ - fingerprint = "556A 403F B0A2 D423 F656 3424 8489 B911 F9ED 617B"; - }]; - }; - tljuniper = { - email = "tljuniper1@gmail.com"; - github = "tljuniper"; - githubId = 48209000; - name = "Anna Gillert"; - }; - tmarkovski = { - email = "tmarkovski@gmail.com"; - github = "tmarkovski"; - githubId = 1280118; - name = "Tomislav Markovski"; - }; - tmarkus = { - email = "tobias@markus-regensburg.de"; - github = "hesiod"; - githubId = 3159881; - name = "Tobias Markus"; - }; - tmountain = { - email = "tinymountain@gmail.com"; - github = "tmountain"; - githubId = 135297; - name = "Travis Whitton"; - }; - tmplt = { - email = "tmplt@dragons.rocks"; - github = "tmplt"; - githubId = 6118602; - name = "Viktor"; - }; - tnias = { - email = "phil@grmr.de"; - matrix = "@tnias:stratum0.org"; - github = "tnias"; - githubId = 9853194; - name = "Philipp Bartsch"; - }; - toastal = { - email = "toastal+nix@posteo.net"; - matrix = "@toastal:mozilla.org"; - github = "toastal"; - githubId = 561087; - name = "toastal"; - keys = [{ - fingerprint = "7944 74B7 D236 DAB9 C9EF E7F9 5CCE 6F14 66D4 7C9E"; - }]; - }; - tobiasBora = { - email = "tobias.bora.list@gmail.com"; - github = "tobiasBora"; - githubId = 2164118; - name = "Tobias Bora"; - }; - tobim = { - email = "nix@tobim.fastmail.fm"; - github = "tobim"; - githubId = 858790; - name = "Tobias Mayer"; - }; - tokudan = { - email = "git@danielfrank.net"; - github = "tokudan"; - githubId = 692610; - name = "Daniel Frank"; - }; - tomahna = { - email = "kevin.rauscher@tomahna.fr"; - github = "Tomahna"; - githubId = 8577941; - name = "Kevin Rauscher"; - }; - tomberek = { - email = "tomberek@gmail.com"; - matrix = "@tomberek:matrix.org"; - github = "tomberek"; - githubId = 178444; - name = "Thomas Bereknyei"; - }; - tomfitzhenry = { - email = "tom@tom-fitzhenry.me.uk"; - github = "tomfitzhenry"; - githubId = 61303; - name = "Tom Fitzhenry"; - }; - tomhoule = { - email = "secondary+nixpkgs@tomhoule.com"; - github = "tomhoule"; - githubId = 13155277; - name = "Tom Houle"; - }; - tomodachi94 = { - email = "tomodachi94+nixpkgs@protonmail.com"; - matrix = "@tomodachi94:matrix.org"; - github = "tomodachi94"; - githubId = 68489118; - name = "Tomodachi94"; - }; - tomsiewert = { - email = "tom@siewert.io"; - matrix = "@tom:frickel.earth"; - github = "tomsiewert"; - githubId = 8794235; - name = "Tom Siewert"; - }; - tomsmeets = { - email = "tom.tsmeets@gmail.com"; - github = "TomSmeets"; - githubId = 6740669; - name = "Tom Smeets"; - }; - tonyshkurenko = { - email = "support@twingate.com"; - github = "antonshkurenko"; - githubId = 8597964; - name = "Anton Shkurenko"; - }; - toonn = { - email = "nixpkgs@toonn.io"; - matrix = "@toonn:matrix.org"; - github = "toonn"; - githubId = 1486805; - name = "Toon Nolten"; - }; - toschmidt = { - email = "tobias.schmidt@in.tum.de"; - github = "toschmidt"; - githubId = 27586264; - name = "Tobias Schmidt"; - }; - totoroot = { - name = "Matthias Thym"; - email = "git@thym.at"; - github = "totoroot"; - githubId = 39650930; - }; - ToxicFrog = { - email = "toxicfrog@ancilla.ca"; - github = "ToxicFrog"; - githubId = 90456; - name = "Rebecca (Bex) Kelly"; - }; - tpw_rules = { - name = "Thomas Watson"; - email = "twatson52@icloud.com"; - matrix = "@tpw_rules:matrix.org"; - github = "tpwrules"; - githubId = 208010; - }; - travisbhartwell = { - email = "nafai@travishartwell.net"; - github = "travisbhartwell"; - githubId = 10110; - name = "Travis B. Hartwell"; - }; - travisdavis-ops = { - email = "travisdavismedia@gmail.com"; - github = "TravisDavis-ops"; - githubId = 52011418; - name = "Travis Davis"; - }; - traxys = { - email = "quentin+dev@familleboyer.net"; - github = "traxys"; - githubId = 5623227; - name = "Quentin Boyer"; - }; - TredwellGit = { - email = "tredwell@tutanota.com"; - github = "TredwellGit"; - githubId = 61860346; - name = "Tredwell"; - }; - treemo = { - email = "matthieu.chevrier@treemo.fr"; - github = "treemo"; - githubId = 207457; - name = "Matthieu Chevrier"; - }; - trepetti = { - email = "trepetti@cs.columbia.edu"; - github = "trepetti"; - githubId = 25440339; - name = "Tom Repetti"; - }; - trevorj = { - email = "nix@trevor.joynson.io"; - github = "akatrevorjay"; - githubId = 1312290; - name = "Trevor Joynson"; - }; - tricktron = { - email = "tgagnaux@gmail.com"; - github = "tricktron"; - githubId = 16036882; - name = "Thibault Gagnaux"; - }; - trino = { - email = "muehlhans.hubert@ekodia.de"; - github = "hmuehlhans"; - githubId = 9870613; - name = "Hubert Mühlhans"; - }; - trobert = { - email = "thibaut.robert@gmail.com"; - github = "trobert"; - githubId = 504580; - name = "Thibaut Robert"; - }; - troydm = { - email = "d.geurkov@gmail.com"; - github = "troydm"; - githubId = 483735; - name = "Dmitry Geurkov"; - }; - truh = { - email = "jakob-nixos@truh.in"; - github = "truh"; - githubId = 1183303; - name = "Jakob Klepp"; - }; - trundle = { - name = "Andreas Stührk"; - email = "andy@hammerhartes.de"; - github = "Trundle"; - githubId = 332418; - }; - tscholak = { - email = "torsten.scholak@googlemail.com"; - github = "tscholak"; - githubId = 1568873; - name = "Torsten Scholak"; - }; - tshaynik = { - email = "tshaynik@protonmail.com"; - github = "tshaynik"; - githubId = 15064765; - name = "tshaynik"; - }; - ttuegel = { - email = "ttuegel@mailbox.org"; - github = "ttuegel"; - githubId = 563054; - name = "Thomas Tuegel"; - }; - tu-maurice = { - email = "valentin.gehrke+nixpkgs@zom.bi"; - github = "tu-maurice"; - githubId = 16151097; - name = "Valentin Gehrke"; - }; - Tungsten842 = { - name = "Tungsten842"; - email = "886724vf@anonaddy.me"; - github = "Tungsten842"; - githubId = 24614168; - }; - turbomack = { - email = "marek.faj@gmail.com"; - github = "turboMaCk"; - githubId = 2130305; - name = "Marek Fajkus"; - }; - turion = { - email = "programming@manuelbaerenz.de"; - github = "turion"; - githubId = 303489; - name = "Manuel Bärenz"; - }; - tuxinaut = { - email = "trash4you@tuxinaut.de"; - github = "tuxinaut"; - githubId = 722482; - name = "Denny Schäfer"; - keys = [{ - fingerprint = "C752 0E49 4D92 1740 D263 C467 B057 455D 1E56 7270"; - }]; - }; - tv = { - email = "tv@krebsco.de"; - github = "4z3"; - githubId = 427872; - name = "Tomislav Viljetić"; - }; - tvestelind = { - email = "tomas.vestelind@fripost.org"; - github = "tvestelind"; - githubId = 699403; - name = "Tomas Vestelind"; - }; - tviti = { - email = "tviti@hawaii.edu"; - github = "tviti"; - githubId = 2251912; - name = "Taylor Viti"; - }; - tvorog = { - email = "marszaripov@gmail.com"; - github = "TvoroG"; - githubId = 1325161; - name = "Marsel Zaripov"; - }; - tweber = { - email = "tw+nixpkgs@360vier.de"; - github = "thorstenweber83"; - githubId = 9413924; - name = "Thorsten Weber"; - }; - twey = { - email = "twey@twey.co.uk"; - github = "Twey"; - githubId = 101639; - name = "James ‘Twey’ Kay"; - }; - twhitehead = { - name = "Tyson Whitehead"; - email = "twhitehead@gmail.com"; - github = "twhitehead"; - githubId = 787843; - keys = [{ - fingerprint = "E631 8869 586F 99B4 F6E6 D785 5942 58F0 389D 2802"; - }]; - }; - twitchyliquid64 = { - name = "Tom"; - email = "twitchyliquid64@ciphersink.net"; - github = "twitchyliquid64"; - githubId = 6328589; - }; - tylerjl = { - email = "tyler+nixpkgs@langlois.to"; - github = "tylerjl"; - githubId = 1733846; - matrix = "@ty:tjll.net"; - name = "Tyler Langlois"; - }; - typetetris = { - email = "ericwolf42@mail.com"; - github = "typetetris"; - githubId = 1983821; - name = "Eric Wolf"; - }; - uakci = { - name = "uakci"; - email = "uakci@uakci.pl"; - github = "uakci"; - githubId = 6961268; - }; - udono = { - email = "udono@virtual-things.biz"; - github = "udono"; - githubId = 347983; - name = "Udo Spallek"; - }; - ulrikstrid = { - email = "ulrik.strid@outlook.com"; - github = "ulrikstrid"; - githubId = 1607770; - name = "Ulrik Strid"; - }; - unclechu = { - name = "Viacheslav Lotsmanov"; - email = "lotsmanov89@gmail.com"; - github = "unclechu"; - githubId = 799353; - keys = [{ - fingerprint = "EE59 5E29 BB5B F2B3 5ED2 3F1C D276 FF74 6700 7335"; - }]; - }; - unhammer = { - email = "unhammer@fsfe.org"; - github = "unhammer"; - githubId = 56868; - name = "Kevin Brubeck Unhammer"; - keys = [{ - fingerprint = "50D4 8796 0B86 3F05 4B6A 12F9 7426 06DE 766A C60C"; - }]; - }; - uniquepointer = { - email = "uniquepointer@mailbox.org"; - matrix = "@uniquepointer:matrix.org"; - github = "uniquepointer"; - githubId = 71751817; - name = "uniquepointer"; - }; - unode = { - email = "alves.rjc@gmail.com"; - matrix = "@renato_alves:matrix.org"; - github = "unode"; - githubId = 122319; - name = "Renato Alves"; - }; - unrooted = { - name = "Konrad Klawikowski"; - email = "konrad.root.klawikowski@gmail.com"; - github = "unrooted"; - githubId = 30440603; - }; - unsolvedcypher = { - name = "Matthew M"; - github = "UnsolvedCypher"; - githubId = 3170853; - }; - uralbash = { - email = "root@uralbash.ru"; - github = "uralbash"; - githubId = 619015; - name = "Svintsov Dmitry"; - }; - urandom = { - email = "colin@urandom.co.uk"; - matrix = "@urandom0:matrix.org"; - github = "urandom2"; - githubId = 2526260; - keys = [{ - fingerprint = "04A3 A2C6 0042 784A AEA7 D051 0447 A663 F7F3 E236"; - }]; - name = "Colin Arnott"; - }; - urbas = { - email = "matej.urbas@gmail.com"; - github = "urbas"; - githubId = 771193; - name = "Matej Urbas"; - }; - uri-canva = { - email = "uri@canva.com"; - github = "uri-canva"; - githubId = 33242106; - name = "Uri Baghin"; - }; - urlordjames = { - email = "urlordjames@gmail.com"; - github = "urlordjames"; - githubId = 32751441; - name = "urlordjames"; - }; - ursi = { - email = "masondeanm@aol.com"; - github = "ursi"; - githubId = 17836748; - name = "Mason Mackaman"; - }; - uskudnik = { - email = "urban.skudnik@gmail.com"; - github = "uskudnik"; - githubId = 120451; - name = "Urban Skudnik"; - }; - usrfriendly = { - name = "Arin Lares"; - email = "arinlares@gmail.com"; - github = "usrfriendly"; - githubId = 2502060; - }; - utdemir = { - email = "me@utdemir.com"; - github = "utdemir"; - githubId = 928084; - name = "Utku Demir"; - }; - uthar = { - email = "galkowskikasper@gmail.com"; - github = "Uthar"; - githubId = 15697697; - name = "Kasper Gałkowski"; - }; - utkarshgupta137 = { - email = "utkarshgupta137@gmail.com"; - github = "utkarshgupta137"; - githubId = 5155100; - name = "Utkarsh Gupta"; - }; - uvnikita = { - email = "uv.nikita@gmail.com"; - github = "uvNikita"; - githubId = 1084748; - name = "Nikita Uvarov"; - }; - uwap = { - email = "me@uwap.name"; - github = "uwap"; - githubId = 2212422; - name = "uwap"; - }; - V = { - name = "V"; - email = "v@anomalous.eu"; - github = "deviant"; - githubId = 68829907; - }; - vaci = { - email = "vaci@vaci.org"; - github = "vaci"; - githubId = 6882568; - name = "Vaci"; - }; - vaibhavsagar = { - email = "vaibhavsagar@gmail.com"; - matrix = "@vaibhavsagar:matrix.org"; - github = "vaibhavsagar"; - githubId = 1525767; - name = "Vaibhav Sagar"; - }; - valebes = { - email = "valebes@gmail.com"; - github = "valebes"; - githubId = 10956211; - name = "Valerio Besozzi"; - }; - valeriangalliat = { - email = "val@codejam.info"; - github = "valeriangalliat"; - githubId = 3929133; - name = "Valérian Galliat"; - }; - valodim = { - email = "look@my.amazin.horse"; - matrix = "@Valodim:stratum0.org"; - github = "Valodim"; - githubId = 27813; - name = "Vincent Breitmoser"; - }; - vamega = { - email = "github@madiathv.com"; - github = "vamega"; - githubId = 223408; - name = "Varun Madiath"; - }; - vandenoever = { - email = "jos@vandenoever.info"; - github = "vandenoever"; - githubId = 608417; - name = "Jos van den Oever"; - }; - vanilla = { - email = "osu_vanilla@126.com"; - github = "VergeDX"; - githubId = 25173827; - name = "Vanilla"; - keys = [{ - fingerprint = "2649 340C C909 F821 D251 6714 3750 028E D04F A42E"; - }]; - }; - vanschelven = { - email = "klaas@vanschelven.com"; - github = "vanschelven"; - githubId = 223833; - name = "Klaas van Schelven"; - }; - vanzef = { - email = "vanzef@gmail.com"; - github = "vanzef"; - githubId = 12428837; - name = "Ivan Solyankin"; - }; - varunpatro = { - email = "varun.kumar.patro@gmail.com"; - github = "varunpatro"; - githubId = 6943308; - name = "Varun Patro"; - }; - vbgl = { - email = "Vincent.Laporte@gmail.com"; - github = "vbgl"; - githubId = 2612464; - name = "Vincent Laporte"; - }; - vbmithr = { - email = "vb@luminar.eu.org"; - github = "vbmithr"; - githubId = 797581; - name = "Vincent Bernardoff"; - }; - vbrandl = { - name = "Valentin Brandl"; - email = "mail+nixpkgs@vbrandl.net"; - github = "vbrandl"; - githubId = 20639051; - }; - vcanadi = { - email = "vito.canadi@gmail.com"; - github = "vcanadi"; - githubId = 8889722; - name = "Vitomir Čanadi"; - }; - vcunat = { - name = "Vladimír Čunát"; - # vcunat@gmail.com predominated in commits before 2019/03 - email = "v@cunat.cz"; - matrix = "@vcunat:matrix.org"; - github = "vcunat"; - githubId = 1785925; - keys = [{ - fingerprint = "B600 6460 B60A 80E7 8206 2449 E747 DF1F 9575 A3AA"; - }]; - }; - vdemeester = { - email = "vincent@sbr.pm"; - github = "vdemeester"; - githubId = 6508; - name = "Vincent Demeester"; - }; - vdot0x23 = { - name = "Victor Büttner"; - email = "nix.victor@0x23.dk"; - github = "vdot0x23"; - githubId = 40716069; - }; - veehaitch = { - name = "Vincent Haupert"; - email = "mail@vincent-haupert.de"; - github = "veehaitch"; - githubId = 15069839; - keys = [{ - fingerprint = "4D23 ECDF 880D CADF 5ECA 4458 874B D6F9 16FA A742"; - }]; - }; - vel = { - email = "llathasa@outlook.com"; - github = "q60"; - githubId = 61933599; - name = "vel"; - }; - velovix = { - email = "xaviosx@gmail.com"; - github = "velovix"; - githubId = 2856634; - name = "Tyler Compton"; - }; - veprbl = { - email = "veprbl@gmail.com"; - github = "veprbl"; - githubId = 245573; - name = "Dmitry Kalinkin"; - }; - victormignot = { - email = "root@victormignot.fr"; - github = "victormignot"; - githubId = 58660971; - name = "Victor Mignot"; - keys = [{ - fingerprint = "CA5D F91A D672 683A 1F65 BBC9 0317 096D 20E0 067B"; - }]; - }; - vidbina = { - email = "vid@bina.me"; - github = "vidbina"; - githubId = 335406; - name = "David Asabina"; - }; - vidister = { - email = "v@vidister.de"; - github = "vidister"; - githubId = 11413574; - name = "Fiona Weber"; - }; - vifino = { - email = "vifino@tty.sh"; - github = "vifino"; - githubId = 5837359; - name = "Adrian Pistol"; - }; - vikanezrimaya = { - email = "vika@fireburn.ru"; - github = "vikanezrimaya"; - githubId = 7953163; - name = "Vika Shleina"; - keys = [{ - fingerprint = "B3C0 DA1A C18B 82E8 CA8B B1D1 4F62 CD07 CE64 796A"; - }]; - }; - vincentbernat = { - email = "vincent@bernat.ch"; - github = "vincentbernat"; - githubId = 631446; - name = "Vincent Bernat"; - keys = [{ - fingerprint = "AEF2 3487 66F3 71C6 89A7 3600 95A4 2FE8 3535 25F9"; - }]; - }; - vinnymeller = { - email = "vinnymeller@proton.me"; - github = "vinnymeller"; - githubId = 19894025; - name = "Vinny Meller"; - }; - vinymeuh = { - email = "vinymeuh@gmail.com"; - github = "vinymeuh"; - githubId = 118959; - name = "VinyMeuh"; - }; - viraptor = { - email = "nix@viraptor.info"; - github = "viraptor"; - githubId = 188063; - name = "Stanisław Pitucha"; - }; - virchau13 = { - email = "virchau13@hexular.net"; - github = "virchau13"; - githubId = 16955157; - name = "Vir Chaudhury"; - }; - viric = { - email = "viric@viric.name"; - github = "viric"; - githubId = 66664; - name = "Lluís Batlle i Rossell"; - }; - virusdave = { - email = "dave.nicponski@gmail.com"; - github = "virusdave"; - githubId = 6148271; - name = "Dave Nicponski"; - }; - vizanto = { - email = "danny@prime.vc"; - github = "vizanto"; - githubId = 326263; - name = "Danny Wilson"; - }; - vklquevs = { - email = "vklquevs@gmail.com"; - github = "vklquevs"; - githubId = 1771234; - name = "vklquevs"; - }; - vlaci = { - email = "laszlo.vasko@outlook.com"; - github = "vlaci"; - githubId = 1771332; - name = "László Vaskó"; - }; - vlinkz = { - email = "vmfuentes64@gmail.com"; - github = "vlinkz"; - githubId = 20145996; - name = "Victor Fuentes"; - }; - vlstill = { - email = "xstill@fi.muni.cz"; - github = "vlstill"; - githubId = 4070422; - name = "Vladimír Štill"; - }; - vmandela = { - email = "venkat.mandela@gmail.com"; - github = "vmandela"; - githubId = 849772; - name = "Venkateswara Rao Mandela"; - }; - vmchale = { - email = "tmchale@wisc.edu"; - github = "vmchale"; - githubId = 13259982; - name = "Vanessa McHale"; - }; - - voidless = { - email = "julius.schmitt@yahoo.de"; - github = "voidIess"; - githubId = 45292658; - name = "Julius Schmitt"; - }; - vojta001 = { - email = "vojtech.kane@gmail.com"; - github = "vojta001"; - githubId = 7038383; - name = "Vojta Káně"; - }; - volhovm = { - email = "volhovm.cs@gmail.com"; - github = "volhovm"; - githubId = 5604643; - name = "Mikhail Volkhov"; - }; - vonfry = { - email = "nixos@vonfry.name"; - github = "Vonfry"; - githubId = 3413119; - name = "Vonfry"; - }; - vq = { - email = "vq@erq.se"; - github = "vq"; - githubId = 230381; - name = "Daniel Nilsson"; - }; - vrinek = { - email = "vrinek@hey.com"; - github = "vrinek"; - name = "Kostas Karachalios"; - githubId = 81346; - }; - vrthra = { - email = "rahul@gopinath.org"; - github = "vrthra"; - githubId = 70410; - name = "Rahul Gopinath"; - }; - vskilet = { - email = "victor@sene.ovh"; - github = "Vskilet"; - githubId = 7677567; - name = "Victor SENE"; - }; - vtuan10 = { - email = "mail@tuan-vo.de"; - github = "vtuan10"; - githubId = 16415673; - name = "Van Tuan Vo"; - }; - vyorkin = { - email = "vasiliy.yorkin@gmail.com"; - github = "vyorkin"; - githubId = 988849; - name = "Vasiliy Yorkin"; - }; - vyp = { - email = "elisp.vim@gmail.com"; - github = "vyp"; - githubId = 3889405; - name = "vyp"; - }; - wackbyte = { - name = "wackbyte"; - email = "wackbyte@pm.me"; - github = "wackbyte"; - githubId = 29505620; - keys = [{ - fingerprint = "E595 7FE4 FEF6 714B 1AD3 1483 937F 2AE5 CCEF BF59"; - }]; - }; - waelwindows = { - email = "waelwindows9922@gmail.com"; - github = "Waelwindows"; - githubId = 5228243; - name = "waelwindows"; - }; - waiting-for-dev = { - email = "marc@lamarciana.com"; - github = "waiting-for-dev"; - githubId = 52650; - name = "Marc Busqué"; - }; - wakira = { - name = "Sheng Wang"; - email = "sheng@a64.work"; - github = "wakira"; - githubId = 2338339; - keys = [{ - fingerprint = "47F7 009E 3AE3 1DA7 988E 12E1 8C9B 0A8F C0C0 D862"; - }]; - }; - wamserma = { - name = "Markus S. Wamser"; - email = "github-dev@mail2013.wamser.eu"; - github = "wamserma"; - githubId = 60148; - }; - water-sucks = { - email = "varun@cvte.org"; - name = "Varun Narravula"; - github = "water-sucks"; - githubId = 68445574; - }; - waynr = { - name = "Wayne Warren"; - email = "wayne.warren.s@gmail.com"; - github = "waynr"; - githubId = 1441126; - }; - wchresta = { - email = "wchresta.nix@chrummibei.ch"; - github = "wchresta"; - githubId = 34962284; - name = "wchresta"; - }; - wd15 = { - email = "daniel.wheeler2@gmail.com"; - github = "wd15"; - githubId = 1986844; - name = "Daniel Wheeler"; - }; - wdavidw = { - name = "David Worms"; - email = "david@adaltas.com"; - github = "wdavidw"; - githubId = 46896; - }; - WeebSorceress = { - name = "WeebSorceress"; - email = "hello@weebsorceress.anonaddy.me"; - matrix = "@weebsorceress:matrix.org"; - github = "WeebSorceress"; - githubId = 106774777; - keys = [{ - fingerprint = "659A 9BC3 F904 EC24 1461 2EFE 7F57 3443 17F0 FA43"; - }]; - }; - wegank = { - name = "Weijia Wang"; - email = "contact@weijia.wang"; - github = "wegank"; - githubId = 9713184; - }; - welteki = { - email = "welteki@pm.me"; - github = "welteki"; - githubId = 16267532; - name = "Han Verstraete"; - keys = [{ - fingerprint = "2145 955E 3F5E 0C95 3458 41B5 11F7 BAEA 8567 43FF"; - }]; - }; - wenngle = { - name = "Zeke Stephens"; - email = "zekestephens@gmail.com"; - github = "wenngle"; - githubId = 63376671; - }; - wentam = { - name = "Matt Egeler"; - email = "wentam42@gmail.com"; - github = "wentam"; - githubId = 901583; - }; - wentasah = { - name = "Michal Sojka"; - email = "wsh@2x.cz"; - github = "wentasah"; - githubId = 140542; - }; - wesleyjrz = { - email = "dev@wesleyjrz.com"; - name = "Wesley V. Santos Jr."; - github = "wesleyjrz"; - githubId = 60184588; - }; - wesnel = { - name = "Wesley Nelson"; - email = "wgn@wesnel.dev"; - github = "wesnel"; - githubId = 43357387; - keys = [{ - fingerprint = "F844 80B2 0CA9 D6CC C7F5 2479 A776 D2AD 099E 8BC0"; - }]; - }; - wheelsandmetal = { - email = "jakob@schmutz.co.uk"; - github = "wheelsandmetal"; - githubId = 13031455; - name = "Jakob Schmutz"; - }; - WhiteBlackGoose = { - email = "wbg@angouri.org"; - github = "WhiteBlackGoose"; - githubId = 31178401; - name = "WhiteBlackGoose"; - keys = [{ - fingerprint = "640B EDDE 9734 310A BFA3 B257 52ED AE6A 3995 AFAB"; - }]; - }; - WhittlesJr = { - email = "alex.joseph.whitt@gmail.com"; - github = "WhittlesJr"; - githubId = 19174984; - name = "Alex Whitt"; - }; - whonore = { - email = "wolfhonore@gmail.com"; - github = "whonore"; - githubId = 7121530; - name = "Wolf Honoré"; - }; - wildsebastian = { - name = "Sebastian Wild"; - email = "sebastian@wild-siena.com"; - github = "wildsebastian"; - githubId = 1215623; - keys = [{ - fingerprint = "DA03 D6C6 3F58 E796 AD26 E99B 366A 2940 479A 06FC"; - }]; - }; - willcohen = { - github = "willcohen"; - githubId = 5185341; - name = "Will Cohen"; - }; - williamvds = { - email = "nixpkgs@williamvds.me"; - github = "williamvds"; - githubId = 26379999; - name = "William Vigolo"; - keys = [{ - fingerprint = "9848 B216 BCBE 29BB 1C6A E0D5 7A4D F5A8 CDBD 49C7"; - }]; - }; - willibutz = { - email = "willibutz@posteo.de"; - github = "WilliButz"; - githubId = 20464732; - name = "Willi Butz"; - }; - wilsonehusin = { - name = "Wilson E. Husin"; - email = "wilsonehusin@gmail.com"; - github = "wilsonehusin"; - githubId = 14004487; - }; - winpat = { - email = "patrickwinter@posteo.ch"; - github = "winpat"; - githubId = 6016963; - name = "Patrick Winter"; - }; - winter = { - email = "nixos@winter.cafe"; - github = "winterqt"; - githubId = 78392041; - name = "Winter"; - }; - wintrmvte = { - name = "Jakub Lutczyn"; - email = "kubalutczyn@gmail.com"; - github = "wintrmvte"; - githubId = 41823252; - }; - wirew0rm = { - email = "alex@wirew0rm.de"; - github = "wirew0rm"; - githubId = 1202371; - name = "Alexander Krimm"; - }; - wishfort36 = { - github = "wishfort36"; - githubId = 42300264; - name = "wishfort36"; - }; - witchof0x20 = { - name = "Jade"; - email = "jade@witchof.space"; - github = "witchof0x20"; - githubId = 36118348; - keys = [{ - fingerprint = "69C9 876B 5797 1B2E 11C5 7C39 80A1 F76F C9F9 54AE"; - }]; - }; - wizeman = { - email = "rcorreia@wizy.org"; - github = "wizeman"; - githubId = 168610; - name = "Ricardo M. Correia"; - }; - wjlroe = { - email = "willroe@gmail.com"; - github = "wjlroe"; - githubId = 43315; - name = "William Roe"; - }; - wldhx = { - email = "wldhx+nixpkgs@wldhx.me"; - github = "wldhx"; - githubId = 15619766; - name = "wldhx"; - }; - wmertens = { - email = "Wout.Mertens@gmail.com"; - github = "wmertens"; - githubId = 54934; - name = "Wout Mertens"; - }; - wnklmnn = { - email = "pascal@wnklmnn.de"; - github = "wnklmnn"; - githubId = 9423014; - name = "Pascal Winkelmann"; - }; - woffs = { - email = "github@woffs.de"; - github = "woffs"; - githubId = 895853; - name = "Frank Doepper"; - }; - wohanley = { - email = "me@wohanley.com"; - github = "wohanley"; - githubId = 1322287; - name = "William O'Hanley"; - }; - woky = { - email = "pampu.andrei@pm.me"; - github = "andreisergiu98"; - githubId = 11740700; - name = "Andrei Pampu"; - }; - wolfangaukang = { - email = "clone.gleeful135+nixpkgs@anonaddy.me"; - github = "WolfangAukang"; - githubId = 8378365; - name = "P. R. d. O."; - }; - womfoo = { - email = "kranium@gikos.net"; - github = "womfoo"; - githubId = 1595132; - name = "Kranium Gikos Mendoza"; - }; - worldofpeace = { - email = "worldofpeace@protonmail.ch"; - github = "worldofpeace"; - githubId = 28888242; - name = "WORLDofPEACE"; - }; - wozeparrot = { - email = "wozeparrot@gmail.com"; - github = "wozeparrot"; - githubId = 25372613; - name = "Woze Parrot"; - }; - wr0belj = { - name = "Jakub Wróbel"; - email = "wrobel.jakub@protonmail.com"; - github = "wr0belj"; - githubId = 40501814; - }; - wraithm = { - name = "Matthew Wraith"; - email = "wraithm@gmail.com"; - github = "wraithm"; - githubId = 1512913; - }; - wrmilling = { - name = "Winston R. Milling"; - email = "Winston@Milli.ng"; - github = "wrmilling"; - githubId = 6162814; - keys = [{ - fingerprint = "21E1 6B8D 2EE8 7530 6A6C 9968 D830 77B9 9F8C 6643"; - }]; - }; - wscott = { - email = "wsc9tt@gmail.com"; - github = "wscott"; - githubId = 31487; - name = "Wayne Scott"; - }; - wucke13 = { - email = "wucke13@gmail.com"; - github = "wucke13"; - githubId = 20400405; - name = "Wucke"; - }; - wulfsta = { - email = "wulfstawulfsta@gmail.com"; - github = "Wulfsta"; - githubId = 13378502; - name = "Wulfsta"; - }; - wunderbrick = { - name = "Andrew Phipps"; - email = "lambdafuzz@tutanota.com"; - github = "wunderbrick"; - githubId = 52174714; - }; - wuyoli = { - name = "wuyoli"; - email = "wuyoli@tilde.team"; - github = "wuyoli"; - githubId = 104238274; - }; - wykurz = { - email = "wykurz@gmail.com"; - github = "wykurz"; - githubId = 483465; - name = "Mateusz Wykurz"; - }; - wyndon = { - matrix = "@wyndon:envs.net"; - github = "wyndon"; - githubId = 72203260; - name = "wyndon"; - }; - wyvie = { - email = "elijahrum@gmail.com"; - github = "alicerum"; - githubId = 3992240; - name = "Elijah Rum"; - }; - x3ro = { - name = "^x3ro"; - email = "nix@x3ro.dev"; - github = "x3rAx"; - githubId = 2268851; - }; - xanderio = { - name = "Alexander Sieg"; - email = "alex@xanderio.de"; - github = "xanderio"; - githubId = 6298052; - }; - xaverdh = { - email = "hoe.dom@gmx.de"; - github = "xaverdh"; - githubId = 11050617; - name = "Dominik Xaver Hörl"; - }; - xavierzwirtz = { - email = "me@xavierzwirtz.com"; - github = "xavierzwirtz"; - githubId = 474343; - name = "Xavier Zwirtz"; - }; - xbreak = { - email = "xbreak@alphaware.se"; - github = "xbreak"; - githubId = 13489144; - name = "Calle Rosenquist"; - }; - xdhampus = { - name = "Hampus"; - github = "xdHampus"; - githubId = 16954508; - }; - xe = { - email = "me@christine.website"; - matrix = "@withoutwithin:matrix.org"; - github = "Xe"; - githubId = 529003; - name = "Christine Dodrill"; - }; - xeji = { - email = "xeji@cat3.de"; - github = "xeji"; - githubId = 36407913; - name = "Uli Baum"; - }; - xfix = { - email = "konrad@borowski.pw"; - matrix = "@xfix:matrix.org"; - github = "xfix"; - githubId = 1297598; - name = "Konrad Borowski"; - }; - xfnw = { - email = "xfnw+nixos@riseup.net"; - github = "xfnw"; - githubId = 66233223; - name = "Owen"; - }; - xgroleau = { - email = "xgroleau@gmail.com"; - github = "xgroleau"; - githubId = 31734358; - name = "Xavier Groleau"; - }; - xiorcale = { - email = "quentin.vaucher@pm.me"; - github = "xiorcale"; - githubId = 17534323; - name = "Quentin Vaucher"; - }; - xlambein = { - email = "xlambein@gmail.com"; - github = "xlambein"; - githubId = 5629059; - name = "Xavier Lambein"; - }; - xnaveira = { - email = "xnaveira@gmail.com"; - github = "xnaveira"; - githubId = 2534411; - name = "Xavier Naveira"; - }; - xnwdd = { - email = "nwdd+nixos@no.team"; - github = "xNWDD"; - githubId = 3028542; - name = "Guillermo NWDD"; - }; - xrelkd = { - github = "xrelkd"; - githubId = 46590321; - name = "xrelkd"; - }; - xurei = { - email = "olivier.bourdoux@gmail.com"; - github = "xurei"; - githubId = 621695; - name = "Olivier Bourdoux"; - }; - xvapx = { - email = "marti.serra.coscollano@gmail.com"; - github = "xvapx"; - githubId = 11824817; - name = "Marti Serra"; - }; - xworld21 = { - github = "xworld21"; - githubId = 1962985; - name = "Vincenzo Mantova"; - }; - xyenon = { - name = "XYenon"; - email = "i@xyenon.bid"; - github = "XYenon"; - githubId = 20698483; - }; - xzfc = { - email = "xzfcpw@gmail.com"; - github = "xzfc"; - githubId = 5121426; - name = "Albert Safin"; - }; - y0no = { - email = "y0no@y0no.fr"; - github = "y0no"; - githubId = 2242427; - name = "Yoann Ono"; - }; - yajo = { - email = "yajo.sk8@gmail.com"; - github = "yajo"; - githubId = 973709; - name = "Jairo Llopis"; - }; - yana = { - email = "yana@riseup.net"; - github = "yanalunaterra"; - githubId = 1643293; - name = "Yana Timoshenko"; - }; - yanganto = { - name = "Antonio Yang"; - email = "yanganto@gmail.com"; - github = "yanganto"; - githubId = 10803111; - }; - yarny = { - github = "Yarny0"; - githubId = 41838844; - name = "Yarny"; - }; - yarr = { - email = "savraz@gmail.com"; - github = "Eternity-Yarr"; - githubId = 3705333; - name = "Dmitry V."; - }; - yayayayaka = { - email = "nixpkgs@uwu.is"; - matrix = "@lara:uwu.is"; - github = "yayayayaka"; - githubId = 73759599; - name = "Lara A."; - }; - ydlr = { - name = "ydlr"; - email = "ydlr@ydlr.io"; - github = "ydlr"; - githubId = 58453832; - keys = [{ - fingerprint = "FD0A C425 9EF5 4084 F99F 9B47 2ACC 9749 7C68 FAD4"; - }]; - }; - yesbox = { - email = "jesper.geertsen.jonsson@gmail.com"; - github = "yesbox"; - githubId = 4113027; - name = "Jesper Geertsen Jonsson"; - }; - yinfeng = { - email = "lin.yinfeng@outlook.com"; - github = "linyinfeng"; - githubId = 11229748; - name = "Lin Yinfeng"; - }; - yisuidenghua = { - email = "bileiner@gmail.com"; - name = "Milena Yisui"; - github = "YisuiDenghua"; - githubId = 102890144; - }; - yl3dy = { - email = "aleksandr.kiselyov@gmail.com"; - github = "yl3dy"; - githubId = 1311192; - name = "Alexander Kiselyov"; - }; - ylecornec = { - email = "yves.stan.lecornec@tweag.io"; - github = "ylecornec"; - githubId = 5978566; - name = "Yves-Stan Le Cornec"; - }; - ylh = { - email = "nixpkgs@ylh.io"; - github = "ylh"; - githubId = 9125590; - name = "Yestin L. Harrison"; - }; - ylwghst = { - email = "ylwghst@onionmail.info"; - github = "ylwghst"; - githubId = 26011724; - name = "Burim Augustin Berisa"; - }; - ymarkus = { - name = "Yannick Markus"; - email = "nixpkgs@ymarkus.dev"; - github = "ymarkus"; - githubId = 62380378; - }; - ymatsiuk = { - name = "Yurii Matsiuk"; - github = "ymatsiuk"; - githubId = 24990891; - keys = [{ - fingerprint = "7BB8 84B5 74DA FDB1 E194 ED21 6130 2290 2986 01AA"; - }]; - }; - ymeister = { - name = "Yuri Meister"; - github = "ymeister"; - githubId = 47071325; - }; - yochai = { - email = "yochai@titat.info"; - github = "yochai"; - githubId = 1322201; - name = "Yochai"; - }; - yoctocell = { - email = "public@yoctocell.xyz"; - github = "yoctocell"; - githubId = 40352765; - name = "Yoctocell"; - }; - yorickvp = { - email = "yorickvanpelt@gmail.com"; - matrix = "@yorickvp:matrix.org"; - github = "yorickvP"; - githubId = 647076; - name = "Yorick van Pelt"; - }; - yrashk = { - email = "yrashk@gmail.com"; - github = "yrashk"; - githubId = 452; - name = "Yurii Rashkovskii"; - }; - yrd = { - name = "Yannik Rödel"; - email = "nix@yannik.info"; - github = "yrd"; - githubId = 1820447; - }; - yshym = { - name = "Yevhen Shymotiuk"; - email = "yshym@pm.me"; - github = "yshym"; - githubId = 44244245; - }; - ysndr = { - email = "me@ysndr.de"; - github = "ysndr"; - githubId = 7040031; - name = "Yannik Sander"; - }; - yuka = { - email = "yuka@yuka.dev"; - matrix = "@yuka:yuka.dev"; - github = "yu-re-ka"; - githubId = 86169957; - name = "Yureka"; - }; - Yumasi = { - email = "gpagnoux@gmail.com"; - github = "Yumasi"; - githubId = 24368641; - name = "Guillaume Pagnoux"; - keys = [{ - fingerprint = "85F8 E850 F8F2 F823 F934 535B EC50 6589 9AEA AF4C"; - }]; - }; - yureien = { - email = "contact@sohamsen.me"; - github = "Yureien"; - githubId = 17357089; - name = "Soham Sen"; - }; - yuriaisaka = { - email = "yuri.aisaka+nix@gmail.com"; - github = "yuriaisaka"; - githubId = 687198; - name = "Yuri Aisaka"; - }; - yurkobb = { - name = "Yury Bulka"; - email = "setthemfree@privacyrequired.com"; - github = "yurkobb"; - githubId = 479389; - }; - yurrriq = { - email = "eric@ericb.me"; - github = "yurrriq"; - githubId = 1866448; - name = "Eric Bailey"; - }; - yusdacra = { - email = "y.bera003.06@protonmail.com"; - matrix = "@yusdacra:nixos.dev"; - github = "yusdacra"; - githubId = 19897088; - name = "Yusuf Bera Ertan"; - keys = [{ - fingerprint = "9270 66BD 8125 A45B 4AC4 0326 6180 7181 F60E FCB2"; - }]; - }; - yuu = { - email = "yuunix@grrlz.net"; - matrix = "@yuu:matrix.org"; - github = "yuuyins"; - githubId = 86538850; - name = "Yuu Yin"; - keys = [{ - fingerprint = "9F19 3AE8 AA25 647F FC31 46B5 416F 303B 43C2 0AC3"; - }]; - }; - yvesf = { - email = "yvesf+nix@xapek.org"; - github = "yvesf"; - githubId = 179548; - name = "Yves Fischer"; - }; - yvt = { - email = "i@yvt.jp"; - github = "yvt"; - githubId = 5253988; - name = "yvt"; - }; - zachcoyle = { - email = "zach.coyle@gmail.com"; - github = "zachcoyle"; - githubId = 908716; - name = "Zach Coyle"; - }; - Zaechus = { - email = "zaechus@proton.me"; - github = "Zaechus"; - githubId = 19353212; - name = "Maxwell Anderson"; - }; - zagy = { - email = "cz@flyingcircus.io"; - github = "zagy"; - githubId = 568532; - name = "Christian Zagrodnick"; - }; - zahrun = { - email = "zahrun@murena.io"; - github = "zahrun"; - githubId = 10415894; - name = "Zahrun"; - }; - zakame = { - email = "zakame@zakame.net"; - github = "zakame"; - githubId = 110625; - name = "Zak B. Elep"; - }; - zakkor = { - email = "edward.dalbon@gmail.com"; - github = "zakkor"; - githubId = 6191421; - name = "Edward d'Albon"; - }; - zalakain = { - email = "ping@umazalakain.info"; - github = "umazalakain"; - githubId = 1319905; - name = "Uma Zalakain"; - }; - zanculmarktum = { - name = "Azure Zanculmarktum"; - email = "zanculmarktum@gmail.com"; - github = "zanculmarktum"; - githubId = 16958511; - }; - zane = { - name = "Zane van Iperen"; - email = "zane@zanevaniperen.com"; - github = "vs49688"; - githubId = 4423262; - keys = [{ - fingerprint = "61AE D40F 368B 6F26 9DAE 3892 6861 6B2D 8AC4 DCC5"; - }]; - }; - zaninime = { - email = "francesco@zanini.me"; - github = "zaninime"; - githubId = 450885; - name = "Francesco Zanini"; - }; - zarelit = { - email = "david@zarel.net"; - github = "zarelit"; - githubId = 3449926; - name = "David Costa"; - }; - zauberpony = { - email = "elmar@athmer.org"; - github = "elmarx"; - githubId = 250877; - name = "Elmar Athmer"; - }; - zbioe = { - name = "Iury Fukuda"; - email = "zbioe@protonmail.com"; - github = "zbioe"; - githubId = 7332055; - }; - zebreus = { - matrix = "@lennart:cicen.net"; - email = "lennarteichhorn+nixpkgs@gmail.com"; - github = "zebreus"; - githubId = 1557253; - name = "Lennart Eichhorn"; - }; - zendo = { - name = "zendo"; - email = "linzway@qq.com"; - github = "zendo"; - githubId = 348013; - }; - zenithal = { - name = "zenithal"; - email = "i@zenithal.me"; - github = "ZenithalHourlyRate"; - githubId = 19512674; - keys = [{ - fingerprint = "1127 F188 280A E312 3619 3329 87E1 7EEF 9B18 B6C9"; - }]; - }; - zeratax = { - email = "mail@zera.tax"; - github = "zeratax"; - githubId = 5024958; - name = "Jona Abdinghoff"; - keys = [{ - fingerprint = "44F7 B797 9D3A 27B1 89E0 841E 8333 735E 784D F9D4"; - }]; - }; - zeri = { - name = "zeri"; - matrix = "@zeri:matrix.org"; - github = "zeri42"; - githubId = 68825133; - }; - zfnmxt = { - name = "zfnmxt"; - email = "zfnmxt@zfnmxt.com"; - github = "zfnmxt"; - githubId = 37446532; - }; - zgrannan = { - email = "zgrannan@gmail.com"; - github = "zgrannan"; - githubId = 1141948; - name = "Zack Grannan"; - }; - zhaofengli = { - email = "hello@zhaofeng.li"; - matrix = "@zhaofeng:zhaofeng.li"; - github = "zhaofengli"; - githubId = 2189609; - name = "Zhaofeng Li"; - }; - ziguana = { - name = "Zig Uana"; - email = "git@ziguana.dev"; - github = "ziguana"; - githubId = 45833444; - }; - zimbatm = { - email = "zimbatm@zimbatm.com"; - github = "zimbatm"; - githubId = 3248; - name = "zimbatm"; - }; - Zimmi48 = { - email = "theo.zimmermann@telecom-paris.fr"; - github = "Zimmi48"; - githubId = 1108325; - name = "Théo Zimmermann"; - }; - zoedsoupe = { - github = "zoedsoupe"; - githubId = 44469426; - name = "Zoey de Souza Pessanha"; - email = "zoey.spessanha@outlook.com"; - keys = [{ - fingerprint = "EAA1 51DB 472B 0122 109A CB17 1E1E 889C DBD6 A315"; - }]; - }; - zohl = { - email = "zohl@fmap.me"; - github = "zohl"; - githubId = 6067895; - name = "Al Zohali"; - }; - zokrezyl = { - email = "zokrezyl@gmail.com"; - github = "zokrezyl"; - githubId = 51886259; - name = "Zokre Zyl"; - }; - zombiezen = { - name = "Ross Light"; - email = "ross@zombiezen.com"; - github = "zombiezen"; - githubId = 181535; - }; - zookatron = { - email = "tim@zookatron.com"; - github = "zookatron"; - githubId = 1772064; - name = "Tim Zook"; - }; - zopieux = { - email = "zopieux@gmail.com"; - github = "zopieux"; - githubId = 81353; - name = "Alexandre Macabies"; - }; - zowoq = { - github = "zowoq"; - githubId = 59103226; - name = "zowoq"; - }; - zraexy = { - email = "zraexy@gmail.com"; - github = "zraexy"; - githubId = 8100652; - name = "David Mell"; - }; - zseri = { - name = "zseri"; - email = "zseri.devel@ytrizja.de"; - github = "fogti"; - githubId = 1618343; - keys = [{ - fingerprint = "7AFB C595 0D3A 77BD B00F 947B 229E 63AE 5644 A96D"; - }]; - }; - ztzg = { - email = "dd@crosstwine.com"; - github = "ztzg"; - githubId = 393108; - name = "Damien Diederen"; - }; - zupo = { - name = "Nejc Zupan"; - email = "nejczupan+nix@gmail.com"; - github = "zupo"; - githubId = 311580; - }; - zuzuleinen = { - email = "andrey.boar@gmail.com"; - name = "Andrei Boar"; - github = "zuzuleinen"; - githubId = 944919; - }; - zx2c4 = { - email = "Jason@zx2c4.com"; - github = "zx2c4"; - githubId = 10643; - name = "Jason A. Donenfeld"; - }; - zyansheep = { - email = "zyansheep@protonmail.com"; - github = "zyansheep"; - githubId = 20029431; - name = "Zyansheep"; - }; - zygot = { - email = "stefan.bordei13@gmail.com"; - github = "stefan-bordei"; - githubId = 71881325; - name = "Stefan Bordei"; - }; - zzamboni = { - email = "diego@zzamboni.org"; - github = "zzamboni"; - githubId = 32876; - name = "Diego Zamboni"; - }; -} -/* Keep the list alphabetically sorted. */ diff --git a/maintainers/scripts/all-tarballs.nix b/maintainers/scripts/all-tarballs.nix deleted file mode 100644 index 6a4de8a4b95..00000000000 --- a/maintainers/scripts/all-tarballs.nix +++ /dev/null @@ -1,16 +0,0 @@ -/* Helper expression for copy-tarballs. This returns (nearly) all - tarballs used the free packages in Nixpkgs. - - Typical usage: - - $ copy-tarballs.pl --expr 'import ' -*/ - -import ../../pkgs/top-level/release.nix - { # Don't apply ‘hydraJob’ to jobs, because then we can't get to the - # dependency graph. - scrubJobs = false; - # No need to evaluate on i686. - supportedSystems = [ "x86_64-linux" ]; - limitedSupportedSystems = []; - } diff --git a/maintainers/scripts/check-maintainers-sorted.nix b/maintainers/scripts/check-maintainers-sorted.nix deleted file mode 100644 index 3de4e07550c..00000000000 --- a/maintainers/scripts/check-maintainers-sorted.nix +++ /dev/null @@ -1,57 +0,0 @@ -let - lib = import ../../lib; - inherit (lib) - add attrNames elemAt foldl' genList length replaceStrings sort toLower trace; - - maintainers = import ../maintainer-list.nix; - simplify = replaceStrings [ "-" "_" ] [ "" "" ]; - compare = a: b: simplify (toLower a) < simplify (toLower b); - namesSorted = - sort - (a: b: a.key < b.key) - (map - (n: let pos = builtins.unsafeGetAttrPos n maintainers; - in assert pos == null -> throw "maintainers entry ${n} is malformed"; - { name = n; line = pos.line; key = toLower (simplify n); }) - (attrNames maintainers)); - before = { name, line, key }: - foldl' - (acc: n: if n.key < key && (acc == null || n.key > acc.key) then n else acc) - null - namesSorted; - errors = foldl' add 0 - (map - (i: let a = elemAt namesSorted i; - b = elemAt namesSorted (i + 1); - lim = let t = before a; in if t == null then "the initial {" else t.name; - in if a.line >= b.line - then trace - ("maintainer ${a.name} (line ${toString a.line}) should be listed " - + "after ${lim}, not after ${b.name} (line ${toString b.line})") - 1 - else 0) - (genList (i: i) (length namesSorted - 1))); -in -assert errors == 0; "all good!" - -# generate edit commands to sort the list. -# may everything following the last current entry (closing } ff) in the wrong place -# with lib; -# concatStringsSep -# "\n" -# (let first = foldl' (acc: n: if n.line < acc then n.line else acc) 999999999 namesSorted; -# commands = map -# (i: let e = elemAt namesSorted i; -# begin = foldl' -# (acc: n: if n.line < e.line && n.line > acc then n.line else acc) -# 1 -# namesSorted; -# end = -# foldl' (acc: n: if n.line > e.line && n.line < acc then n.line else acc) -# 999999999 -# namesSorted; -# in "${toString e.line},${toString (end - 1)} p") -# (genList (i: i) (length namesSorted)); -# in map -# (c: "sed -ne '${c}' maintainers/maintainer-list.nix") -# ([ "1,${toString (first - 1)} p" ] ++ commands)) diff --git a/maintainers/scripts/convert-to-import-cargo-lock.sh b/maintainers/scripts/convert-to-import-cargo-lock.sh deleted file mode 100755 index b38825d4d3e..00000000000 --- a/maintainers/scripts/convert-to-import-cargo-lock.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env nix-shell -#!nix-shell -I nixpkgs=. -i bash -p "import ./maintainers/scripts/convert-to-import-cargo-lock" nix-prefetch-git - -convert-to-import-cargo-lock "$@" diff --git a/maintainers/scripts/convert-to-import-cargo-lock/.gitignore b/maintainers/scripts/convert-to-import-cargo-lock/.gitignore deleted file mode 100644 index ea8c4bf7f35..00000000000 --- a/maintainers/scripts/convert-to-import-cargo-lock/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target diff --git a/maintainers/scripts/convert-to-import-cargo-lock/Cargo.lock b/maintainers/scripts/convert-to-import-cargo-lock/Cargo.lock deleted file mode 100644 index b69fbc59ae8..00000000000 --- a/maintainers/scripts/convert-to-import-cargo-lock/Cargo.lock +++ /dev/null @@ -1,106 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "anyhow" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800" - -[[package]] -name = "basic-toml" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e819b667739967cd44d308b8c7b71305d8bb0729ac44a248aa08f33d01950b4" -dependencies = [ - "serde", -] - -[[package]] -name = "convert-to-import-cargo-lock" -version = "0.1.0" -dependencies = [ - "anyhow", - "basic-toml", - "serde", - "serde_json", -] - -[[package]] -name = "itoa" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" - -[[package]] -name = "proc-macro2" -version = "1.0.51" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "ryu" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" - -[[package]] -name = "serde" -version = "1.0.152" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.152" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.93" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cad406b69c91885b5107daf2c29572f6c8cdb3c66826821e286c533490c0bc76" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "syn" -version = "1.0.107" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "unicode-ident" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" diff --git a/maintainers/scripts/convert-to-import-cargo-lock/Cargo.toml b/maintainers/scripts/convert-to-import-cargo-lock/Cargo.toml deleted file mode 100644 index 41f5729f01a..00000000000 --- a/maintainers/scripts/convert-to-import-cargo-lock/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "convert-to-import-cargo-lock" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -anyhow = { version = "1.0.69" } -basic-toml = "0.1.1" -serde = { version = "1.0.152", features = ["derive"] } -serde_json = "1.0.93" diff --git a/maintainers/scripts/convert-to-import-cargo-lock/default.nix b/maintainers/scripts/convert-to-import-cargo-lock/default.nix deleted file mode 100644 index f4c1f553d64..00000000000 --- a/maintainers/scripts/convert-to-import-cargo-lock/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -with import ../../../. { }; - -rustPlatform.buildRustPackage { - name = "convert-to-import-cargo-lock"; - - src = lib.cleanSourceWith { - src = ./.; - filter = name: type: - let - name' = builtins.baseNameOf name; - in - name' != "default.nix" && name' != "target"; - }; - - cargoLock.lockFile = ./Cargo.lock; -} diff --git a/maintainers/scripts/convert-to-import-cargo-lock/shell.nix b/maintainers/scripts/convert-to-import-cargo-lock/shell.nix deleted file mode 100644 index 8e913fdcd8b..00000000000 --- a/maintainers/scripts/convert-to-import-cargo-lock/shell.nix +++ /dev/null @@ -1,5 +0,0 @@ -with import ../../../. { }; - -mkShell { - packages = [ rustc cargo clippy rustfmt ] ++ lib.optional stdenv.isDarwin libiconv; -} diff --git a/maintainers/scripts/convert-to-import-cargo-lock/src/main.rs b/maintainers/scripts/convert-to-import-cargo-lock/src/main.rs deleted file mode 100644 index 6eb6768d14e..00000000000 --- a/maintainers/scripts/convert-to-import-cargo-lock/src/main.rs +++ /dev/null @@ -1,241 +0,0 @@ -#![warn(clippy::pedantic)] -#![allow(clippy::too_many_lines)] - -use anyhow::anyhow; -use serde::Deserialize; -use std::{collections::HashMap, env, fs, path::PathBuf, process::Command}; - -#[derive(Deserialize)] -struct CargoLock<'a> { - #[serde(rename = "package", borrow)] - packages: Vec>, - metadata: Option>, -} - -#[derive(Deserialize)] -struct Package<'a> { - name: &'a str, - version: &'a str, - source: Option<&'a str>, - checksum: Option<&'a str>, -} - -#[derive(Deserialize)] -struct PrefetchOutput { - sha256: String, -} - -fn main() -> anyhow::Result<()> { - let mut hashes = HashMap::new(); - - let attr_count = env::args().len() - 1; - - for (i, attr) in env::args().skip(1).enumerate() { - println!("converting {attr} ({}/{attr_count})", i + 1); - - convert(&attr, &mut hashes)?; - } - - Ok(()) -} - -fn convert(attr: &str, hashes: &mut HashMap) -> anyhow::Result<()> { - let package_path = nix_eval(format!("{attr}.meta.position"))? - .and_then(|p| p.split_once(':').map(|(f, _)| PathBuf::from(f))); - - if package_path.is_none() { - eprintln!("can't automatically convert {attr}: doesn't exist"); - return Ok(()); - } - - let package_path = package_path.unwrap(); - - if package_path.with_file_name("Cargo.lock").exists() { - eprintln!("skipping {attr}: already has a vendored Cargo.lock"); - return Ok(()); - } - - let mut src = PathBuf::from( - String::from_utf8( - Command::new("nix-build") - .arg("-A") - .arg(format!("{attr}.src")) - .output()? - .stdout, - )? - .trim(), - ); - - if !src.exists() { - eprintln!("can't automatically convert {attr}: src doesn't exist (bad attr?)"); - return Ok(()); - } else if !src.metadata()?.is_dir() { - eprintln!("can't automatically convert {attr}: src isn't a directory"); - return Ok(()); - } - - if let Some(mut source_root) = nix_eval(format!("{attr}.sourceRoot"))?.map(PathBuf::from) { - source_root = source_root.components().skip(1).collect(); - src.push(source_root); - } - - let cargo_lock_path = src.join("Cargo.lock"); - - if !cargo_lock_path.exists() { - eprintln!("can't automatically convert {attr}: src doesn't contain Cargo.lock"); - return Ok(()); - } - - let cargo_lock_content = fs::read_to_string(cargo_lock_path)?; - - let cargo_lock: CargoLock = basic_toml::from_str(&cargo_lock_content)?; - - let mut git_dependencies = Vec::new(); - - for package in cargo_lock.packages.iter().filter(|p| { - p.source.is_some() - && p.checksum - .or_else(|| { - cargo_lock - .metadata - .as_ref()? - .get( - format!("checksum {} {} ({})", p.name, p.version, p.source.unwrap()) - .as_str(), - ) - .copied() - }) - .is_none() - }) { - let (typ, original_url) = package - .source - .unwrap() - .split_once('+') - .expect("dependency should have well-formed source url"); - - if let Some(hash) = hashes.get(original_url) { - continue; - } - - assert_eq!( - typ, "git", - "packages without checksums should be git dependencies" - ); - - let (mut url, rev) = original_url - .split_once('#') - .expect("git dependency should have commit"); - - // TODO: improve - if let Some((u, _)) = url.split_once('?') { - url = u; - } - - let prefetch_output: PrefetchOutput = serde_json::from_slice( - &Command::new("nix-prefetch-git") - .args(["--url", url, "--rev", rev, "--quiet", "--fetch-submodules"]) - .output()? - .stdout, - )?; - - let output_hash = String::from_utf8( - Command::new("nix") - .args([ - "--extra-experimental-features", - "nix-command", - "hash", - "to-sri", - "--type", - "sha256", - &prefetch_output.sha256, - ]) - .output()? - .stdout, - )?; - - let hash = output_hash.trim().to_string(); - - git_dependencies.push(( - format!("{}-{}", package.name, package.version), - output_hash.trim().to_string().clone(), - )); - - hashes.insert(original_url.to_string(), hash); - } - - fs::write( - package_path.with_file_name("Cargo.lock"), - cargo_lock_content, - )?; - - let mut package_lines: Vec<_> = fs::read_to_string(&package_path)? - .lines() - .map(String::from) - .collect(); - - let (cargo_deps_line_index, cargo_deps_line) = package_lines - .iter_mut() - .enumerate() - .find(|(_, l)| { - l.trim_start().starts_with("cargoHash") || l.trim_start().starts_with("cargoSha256") - }) - .expect("package should contain cargoHash/cargoSha256"); - - let spaces = " ".repeat(cargo_deps_line.len() - cargo_deps_line.trim_start().len()); - - if git_dependencies.is_empty() { - *cargo_deps_line = format!("{spaces}cargoLock.lockFile = ./Cargo.lock;"); - } else { - *cargo_deps_line = format!("{spaces}cargoLock = {{"); - - let mut index_iter = cargo_deps_line_index + 1..; - - package_lines.insert( - index_iter.next().unwrap(), - format!("{spaces} lockFile = ./Cargo.lock;"), - ); - - package_lines.insert( - index_iter.next().unwrap(), - format!("{spaces} outputHashes = {{"), - ); - - for ((dep, hash), index) in git_dependencies.drain(..).zip(&mut index_iter) { - package_lines.insert(index, format!("{spaces} {dep:?} = {hash:?};")); - } - - package_lines.insert(index_iter.next().unwrap(), format!("{spaces} }};")); - package_lines.insert(index_iter.next().unwrap(), format!("{spaces}}};")); - } - - if package_lines.last().map(String::as_str) != Some("") { - package_lines.push(String::new()); - } - - fs::write(package_path, package_lines.join("\n"))?; - - Ok(()) -} - -fn nix_eval(attr: impl AsRef) -> anyhow::Result> { - let output = String::from_utf8( - Command::new("nix-instantiate") - .args(["--eval", "-A", attr.as_ref()]) - .output()? - .stdout, - )?; - - let trimmed = output.trim(); - - if trimmed.is_empty() || trimmed == "null" { - Ok(None) - } else { - Ok(Some( - trimmed - .strip_prefix('"') - .and_then(|p| p.strip_suffix('"')) - .ok_or_else(|| anyhow!("couldn't parse nix-instantiate output: {output:?}"))? - .to_string(), - )) - } -} diff --git a/maintainers/scripts/db-to-md.sh b/maintainers/scripts/db-to-md.sh deleted file mode 100755 index aa2a2775b6d..00000000000 --- a/maintainers/scripts/db-to-md.sh +++ /dev/null @@ -1,88 +0,0 @@ -#! /usr/bin/env nix-shell -#! nix-shell -I nixpkgs=. -i bash -p pandoc - -# This script is temporarily needed while we transition the manual to -# CommonMark. It converts DocBook files into our CommonMark flavour. - -debug= -files=() - -while [ "$#" -gt 0 ]; do - i="$1"; shift 1 - case "$i" in - --debug) - debug=1 - ;; - *) - files+=("$i") - ;; - esac -done - -echo "WARNING: This is an experimental script and might not preserve all formatting." > /dev/stderr -echo "Please report any issues you discover." > /dev/stderr - -outExtension="md" -if [[ $debug ]]; then - outExtension="json" -fi - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" - -# NOTE: Keep in sync with Nixpkgs manual (/doc/Makefile). -# TODO: Remove raw-attribute when we can get rid of DocBook altogether. -pandoc_commonmark_enabled_extensions=+attributes+fenced_divs+footnotes+bracketed_spans+definition_lists+pipe_tables+raw_attribute -targetLang="commonmark${pandoc_commonmark_enabled_extensions}+smart" -if [[ $debug ]]; then - targetLang=json -fi -pandoc_flags=( - # Not needed: - # - diagram-generator.lua (we do not support that in NixOS manual to limit dependencies) - # - media extraction (was only required for diagram generator) - # - myst-reader/roles.lua (only relevant for MyST → DocBook) - # - link-manpages.lua (links should only be added to display output) - # - docbook-writer/rst-roles.lua (only relevant for → DocBook) - # - docbook-writer/labelless-link-is-xref.lua (only relevant for → DocBook) - "--lua-filter=$DIR/../../doc/build-aux/pandoc-filters/docbook-reader/citerefentry-to-rst-role.lua" - "--lua-filter=$DIR/../../doc/build-aux/pandoc-filters/myst-writer/roles.lua" - "--lua-filter=$DIR/doc/unknown-code-language.lua" - -f docbook - -t "$targetLang" - --tab-stop=2 - --wrap=none -) - -for file in "${files[@]}"; do - if [[ ! -f "$file" ]]; then - echo "db-to-md.sh: $file does not exist" > /dev/stderr - exit 1 - else - rootElement=$(xmllint --xpath 'name(//*)' "$file") - - if [[ $rootElement = chapter ]]; then - extension=".chapter.$outExtension" - elif [[ $rootElement = section ]]; then - extension=".section.$outExtension" - else - echo "db-to-md.sh: $file contains an unsupported root element $rootElement" > /dev/stderr - exit 1 - fi - - outFile="${file%".section.xml"}" - outFile="${outFile%".chapter.xml"}" - outFile="${outFile%".xml"}$extension" - temp1=$(mktemp) - $DIR/doc/escape-code-markup.py "$file" "$temp1" - if [[ $debug ]]; then - echo "Converted $file to $temp1" > /dev/stderr - fi - temp2=$(mktemp) - $DIR/doc/replace-xrefs-by-empty-links.py "$temp1" "$temp2" - if [[ $debug ]]; then - echo "Converted $temp1 to $temp2" > /dev/stderr - fi - pandoc "$temp2" -o "$outFile" "${pandoc_flags[@]}" - echo "Converted $file to $outFile" > /dev/stderr - fi -done diff --git a/maintainers/scripts/dep-licenses.sh b/maintainers/scripts/dep-licenses.sh deleted file mode 100755 index 816dcf6d7f7..00000000000 --- a/maintainers/scripts/dep-licenses.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh - -attr=$1 - -: ${NIXPKGS=/etc/nixos/nixpkgs} - -tmp=$(mktemp --tmpdir -d nixpkgs-dep-license.XXXXXX) - -exitHandler() { - exitCode=$? - rm -rf "$tmp" - return $exitCode -} - -trap "exitHandler" EXIT - -# fetch the trace and the drvPath of the attribute. -nix-instantiate $NIXPKGS -A $attr --show-trace > "$tmp/drvPath" 2> "$tmp/trace" || { - cat 1>&2 - "$tmp/trace" < "$tmp/filter.sed" - -if test $(wc -l "$tmp/filter.sed" | sed 's/ .*//') == 0; then - echo 1>&2 " -No derivation mentionned in the stack trace. Either your derivation does -not use stdenv.mkDerivation or you forgot to use the stdenv adapter named -traceDrvLicenses. - -- defaultStdenv = allStdenvs.stdenv; -+ defaultStdenv = traceDrvLicenses allStdenvs.stdenv; -" - exit 1 -fi - - -# remove all dependencies which are using stdenv.mkDerivation -echo ' -d -' >> "$tmp/filter.sed" - -nix-store -q --tree $(cat "$tmp/drvPath") | sed -f "$tmp/filter.sed" - -exit 0; diff --git a/maintainers/scripts/eval-release.sh b/maintainers/scripts/eval-release.sh deleted file mode 100755 index b588c767b6a..00000000000 --- a/maintainers/scripts/eval-release.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -if [[ -z "$VERBOSE" ]]; then - echo "You may set VERBOSE=1 to see debug output or to any other non-empty string to make this script completely silent" -fi -unset HOME NIXPKGS_CONFIG # Force empty config - -# With the default heap size (380MB), nix-instantiate fails: -# Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS -export GC_INITIAL_HEAP_SIZE=${GC_INITIAL_HEAP_SIZE:-2000000000} # 2GB -nix-instantiate --strict --eval-only --xml --show-trace "$(dirname "$0")"/eval-release.nix 2>&1 > /dev/null diff --git a/maintainers/scripts/find-tarballs.nix b/maintainers/scripts/find-tarballs.nix deleted file mode 100644 index 685a33d137c..00000000000 --- a/maintainers/scripts/find-tarballs.nix +++ /dev/null @@ -1,50 +0,0 @@ -# This expression returns a list of all fetchurl calls used by ‘expr’. - -with import ../.. { }; -with lib; - -{ expr }: - -let - - root = expr; - - uniqueUrls = map (x: x.file) (genericClosure { - startSet = map (file: { key = file.url; inherit file; }) urls; - operator = const [ ]; - }); - - urls = map (drv: { url = head (drv.urls or [ drv.url ]); hash = drv.outputHash; isPatch = (drv?postFetch && drv.postFetch != ""); type = drv.outputHashAlgo; name = drv.name; }) fetchurlDependencies; - - fetchurlDependencies = - filter - (drv: drv.outputHash or "" != "" && drv.outputHashMode or "flat" == "flat" - && (drv ? url || drv ? urls)) - dependencies; - - dependencies = map (x: x.value) (genericClosure { - startSet = map keyDrv (derivationsIn' root); - operator = { key, value }: map keyDrv (immediateDependenciesOf value); - }); - - derivationsIn' = x: - if !canEval x then [] - else if isDerivation x then optional (canEval x.drvPath) x - else if isList x then concatLists (map derivationsIn' x) - else if isAttrs x then concatLists (mapAttrsToList (n: v: addErrorContext "while finding tarballs in '${n}':" (derivationsIn' v)) x) - else [ ]; - - keyDrv = drv: if canEval drv.drvPath then { key = drv.drvPath; value = drv; } else { }; - - immediateDependenciesOf = drv: - concatLists (mapAttrsToList (n: v: derivationsIn v) (removeAttrs drv (["meta" "passthru"] ++ optionals (drv?passthru) (attrNames drv.passthru)))); - - derivationsIn = x: - if !canEval x then [] - else if isDerivation x then optional (canEval x.drvPath) x - else if isList x then concatLists (map derivationsIn x) - else [ ]; - - canEval = val: (builtins.tryEval val).success; - -in uniqueUrls diff --git a/maintainers/scripts/fix-maintainers.pl b/maintainers/scripts/fix-maintainers.pl deleted file mode 100755 index 81f6450c5fa..00000000000 --- a/maintainers/scripts/fix-maintainers.pl +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env nix-shell -#!nix-shell -i perl -p perl -p perlPackages.LWP -p perlPackages.LWPProtocolHttps -p perlPackages.LWPUserAgent -p perlPackages.JSON -p perlPackages.PathTiny -use LWP::UserAgent; -use JSON; -use Path::Tiny; -use strict; -use warnings; - -my $maintainers_list_nix = "../maintainer-list.nix"; -my $maintainers_json = from_json(`nix-instantiate --json --eval --expr 'builtins.fromJSON (builtins.toJSON (import $maintainers_list_nix))'`); - -STDOUT->autoflush(1); - -my $ua = LWP::UserAgent->new(); - -keys %$maintainers_json; # reset the internal iterator so a prior each() doesn't affect the loop -while(my($k, $v) = each %$maintainers_json) { - my $current_user = %$v{'github'}; - if (!defined $current_user) { - print "$k has no github handle\n"; - next; - } - my $github_id = %$v{'githubId'}; - if (!defined $github_id) { - print "$k has no githubId\n"; - next; - } - my $url = 'https://api.github.com/user/' . $github_id; - my $resp = $ua->get( - $url, - "Authorization" => "Token $ENV{GH_TOKEN}" - ); - - if ($resp->header("X-RateLimit-Remaining") == 0) { - my $ratelimit_reset = $resp->header("X-RateLimit-Reset"); - print "Request limit exceeded, waiting until " . scalar localtime $ratelimit_reset . "\n"; - sleep($ratelimit_reset - time() + 5); - } - if ($resp->code != 200) { - print $current_user . " likely deleted their github account\n"; - next; - } - my $resp_json = from_json($resp->content); - my $api_user = %$resp_json{"login"}; - if ($current_user ne $api_user) { - print $current_user . " is now known on github as " . $api_user . ". Editing maintainer-list.nix…\n"; - my $file = path($maintainers_list_nix); - my $data = $file->slurp_utf8; - $data =~ s/github = "$current_user";$/github = "$api_user";/m; - $file->spew_utf8($data); - } -} diff --git a/maintainers/scripts/hydra-eval-failures.py b/maintainers/scripts/hydra-eval-failures.py deleted file mode 100755 index b7518b12857..00000000000 --- a/maintainers/scripts/hydra-eval-failures.py +++ /dev/null @@ -1,112 +0,0 @@ -#!/usr/bin/env nix-shell -#!nix-shell -i python3 -p "python3.withPackages(ps: with ps; [ requests pyquery click ])" - -# To use, just execute this script with --help to display help. - -import subprocess -import json -import sys - -import click -import requests -from pyquery import PyQuery as pq - -def map_dict (f, d): - for k,v in d.items(): - d[k] = f(v) - -maintainers_json = subprocess.check_output([ - 'nix-instantiate', '-A', 'lib.maintainers', '--eval', '--strict', '--json' -]) -maintainers = json.loads(maintainers_json) -MAINTAINERS = map_dict(lambda v: v.get('github', None), maintainers) - -def get_response_text(url): - return pq(requests.get(url).text) # IO - -EVAL_FILE = { - 'nixos': 'nixos/release.nix', - 'nixpkgs': 'pkgs/top-level/release.nix', -} - - -def get_maintainers(attr_name): - try: - nixname = attr_name.split('.') - meta_json = subprocess.check_output([ - 'nix-instantiate', - '--eval', - '--strict', - '-A', - '.'.join(nixname[1:]) + '.meta', - EVAL_FILE[nixname[0]], - '--arg', - 'nixpkgs', - './.', - '--json']) - meta = json.loads(meta_json) - return meta.get('maintainers', []) - except: - return [] - -def filter_github_users(maintainers): - github_only = [] - for i in maintainers: - if i.get('github'): - github_only.append(i) - return github_only - -def print_build(table_row): - a = pq(table_row)('a')[1] - print("- [ ] [{}]({})".format(a.text, a.get('href')), flush=True) - - job_maintainers = filter_github_users(get_maintainers(a.text)) - if job_maintainers: - print(" - maintainers: {}".format(" ".join(map(lambda u: '@' + u.get('github'), job_maintainers)))) - # TODO: print last three persons that touched this file - # TODO: pinpoint the diff that broke this build, or maybe it's transient or maybe it never worked? - - sys.stdout.flush() - -@click.command() -@click.option( - '--jobset', - default="nixos/release-19.09", - help='Hydra project like nixos/release-19.09') -def cli(jobset): - """ - Given a Hydra project, inspect latest evaluation - and print a summary of failed builds - """ - - url = "https://hydra.nixos.org/jobset/{}".format(jobset) - - # get the last evaluation - click.echo(click.style( - 'Getting latest evaluation for {}'.format(url), fg='green')) - d = get_response_text(url) - evaluations = d('#tabs-evaluations').find('a[class="row-link"]') - latest_eval_url = evaluations[0].get('href') - - # parse last evaluation page - click.echo(click.style( - 'Parsing evaluation {}'.format(latest_eval_url), fg='green')) - d = get_response_text(latest_eval_url + '?full=1') - - # TODO: aborted evaluations - # TODO: dependency failed without propagated builds - print('\nFailures:') - for tr in d('img[alt="Failed"]').parents('tr'): - print_build(tr) - - print('\nDependency failures:') - for tr in d('img[alt="Dependency failed"]').parents('tr'): - print_build(tr) - - - -if __name__ == "__main__": - try: - cli() - except Exception as e: - import pdb;pdb.post_mortem() diff --git a/maintainers/scripts/hydra_eval_check b/maintainers/scripts/hydra_eval_check deleted file mode 100755 index c8e03424f32..00000000000 --- a/maintainers/scripts/hydra_eval_check +++ /dev/null @@ -1,13 +0,0 @@ -#! /bin/sh - -# give absolute path of release.nix as argument -hydra_eval_jobs \ - --argstr system x86_64-linux \ - --argstr system i686-linux \ - --argstr system x86_64-darwin \ - --argstr system i686-cygwin \ - --argstr system x86_64-cygwin \ - --argstr system i686-freebsd \ - --arg officialRelease false \ - --arg nixpkgs "{ outPath = builtins.storePath ./. ; rev = 1234; }" \ - $@ diff --git a/maintainers/scripts/luarocks-packages.csv b/maintainers/scripts/luarocks-packages.csv deleted file mode 100644 index e93ceeebc94..00000000000 --- a/maintainers/scripts/luarocks-packages.csv +++ /dev/null @@ -1,111 +0,0 @@ -name,src,ref,server,version,luaversion,maintainers -alt-getopt,,,,,,arobyn -bit32,,,,5.3.0-1,5.1,lblasc -argparse,https://github.com/luarocks/argparse.git,,,,, -basexx,https://github.com/teto/basexx.git,,,,, -binaryheap,https://github.com/Tieske/binaryheap.lua,,,,,vcunat -busted,,,,,, -cassowary,,,,,,marsam alerque -cldr,,,,,,alerque -compat53,,,,0.7-1,,vcunat -cosmo,,,,,,marsam -coxpcall,,,,1.17.0-1,, -cqueues,,,,,,vcunat -cyan,,,,,, -cyrussasl,https://github.com/JorjBauer/lua-cyrussasl.git,,,,, -digestif,https://github.com/astoff/digestif.git,,,0.2-1,5.3, -dkjson,,,,,, -fennel,,,,,,misterio77 -fifo,,,,,, -fluent,,,,,,alerque -gitsigns.nvim,https://github.com/lewis6991/gitsigns.nvim.git,,,,5.1, -haskell-tools.nvim,,,,,, -http,,,,0.3-0,,vcunat -inspect,,,,,, -jsregexp,,,,,, -ldbus,,,http://luarocks.org/dev,,, -ldoc,https://github.com/stevedonovan/LDoc.git,,,,, -lgi,,,,,, -linenoise,https://github.com/hoelzro/lua-linenoise.git,,,,, -ljsyscall,,,,,5.1,lblasc -lmathx,,,,,5.3,alexshpilkin -lmpfrlib,,,,,5.3,alexshpilkin -loadkit,,,,,,alerque -lpeg,,,,,,vyp -lpeg_patterns,,,,,, -lpeglabel,,,,1.6.0,, -lpty,,,,,, -lrexlib-gnu,,,,,, -lrexlib-pcre,,,,,,vyp -lrexlib-posix,,,,,, -lua-cjson,,,,,, -lua-cmsgpack,,,,,, -lua-curl,,,,,, -lua-iconv,,,,,, -lua-lsp,,,,,, -lua-messagepack,,,,,, -lua-protobuf,,,,,,lockejan -lua-resty-http,,,,,, -lua-resty-jwt,,,,,, -lua-resty-openidc,,,,,, -lua-resty-openssl,,,,,, -lua-resty-session,,,,,, -lua-subprocess,https://github.com/0x0ade/lua-subprocess,,,,5.1,scoder12 -lua-term,,,,,, -lua-toml,,,,,, -lua-zlib,,,,,,koral -lua_cliargs,https://github.com/amireh/lua_cliargs.git,,,,, -luabitop,https://github.com/teto/luabitop.git,,,,, -luacheck,,,,,, -luacov,,,,,, -luadbi,,,,,, -luadbi-mysql,,,,,, -luadbi-postgresql,,,,,, -luadbi-sqlite3,,,,,, -luaepnf,,,,,, -luaevent,,,,,, -luaexpat,,,,1.4.1-1,,arobyn flosse -luaffi,,,http://luarocks.org/dev,,, -luafilesystem,,,,1.8.0-1,,flosse -lualdap,,,,,,aanderse -lualogging,,,,,, -luaossl,,,,,5.1, -luaposix,,,,34.1.1-1,,vyp lblasc -luarepl,,,,,, -luasec,,,,,,flosse -luasocket,,,,,, -luasql-sqlite3,,,,,,vyp -luassert,,,,,, -luasystem,,,,,, -luaunbound,,,,,, -luaunit,,,,,,lockejan -luautf8,,,,,,pstn -luazip,,,,,, -lua-yajl,,,,,,pstn -luuid,,,,,, -luv,,,,1.44.2-1,, -lush.nvim,https://github.com/rktjmp/lush.nvim,,,,,teto -lyaml,,,,,,lblasc -markdown,,,,,, -mediator_lua,,,,,, -mpack,,,,,, -moonscript,https://github.com/leafo/moonscript.git,dev-1,,,,arobyn -nvim-client,https://github.com/neovim/lua-client.git,,,,, -nvim-cmp,https://github.com/hrsh7th/nvim-cmp,,,,, -penlight,https://github.com/lunarmodules/Penlight.git,,,,,alerque -plenary.nvim,https://github.com/nvim-lua/plenary.nvim.git,,,,5.1, -rapidjson,https://github.com/xpol/lua-rapidjson.git,,,,, -rest.nvim,,,,,5.1,teto -readline,,,,,, -say,https://github.com/Olivine-Labs/say.git,,,,, -serpent,,,,,,lockejan -sqlite,,,,,, -std._debug,https://github.com/lua-stdlib/_debug.git,,,,, -std.normalize,https://github.com/lua-stdlib/normalize.git,,,,, -stdlib,,,,41.2.2,,vyp -teal-language-server,,,http://luarocks.org/dev,,, -telescope.nvim,,,,,5.1, -telescope-manix,,,,,, -tl,,,,,,mephistophiles -vstruct,https://github.com/ToxicFrog/vstruct.git,,,,, -vusted,,,,,,figsoda diff --git a/maintainers/scripts/mdize-module.sh b/maintainers/scripts/mdize-module.sh deleted file mode 100755 index e2d2e5467aa..00000000000 --- a/maintainers/scripts/mdize-module.sh +++ /dev/null @@ -1,83 +0,0 @@ -#! /usr/bin/env nix-shell -#! nix-shell -I nixpkgs=. -i bash -p delta jq perl - -set -euo pipefail -shopt -s inherit_errexit - -cat <<'EOF' -This script attempts to automatically convert option descriptions from -DocBook syntax to markdown. Naturally this process is incomplete and -imperfect, so any changes generated by this script MUST be reviewed. - -Possible problems include: incorrectly replaced tags, badly formatted -markdown, DocBook tags this script doesn't recognize remaining in the -output and crashing the docs build, incorrect escaping of markdown -metacharacters, incorrect unescaping of XML entities—and the list goes on. - -Always review the generated changes! - -Some known limitations: - - Does not transform literalDocBook items - - Replacements can occur in non-option code, such as string literals - - -EOF - - - -build-options-json() { - nix-build --no-out-link --expr ' - let - sys = import ./nixos/default.nix { - configuration = {}; - }; - in - [ - sys.config.system.build.manual.optionsJSON - ] - ' -} - - - -git diff --quiet || { - echo "Worktree is dirty. Please stash or commit first." - exit 1 -} - -echo "Building options.json ..." -old_options=$(build-options-json) - -echo "Applying replacements ..." -perl -pi -e ' - BEGIN { - undef $/; - } - - s,([^`]*?),`$1`,smg; - s,([^»]*?),«$1»,smg; - s,([^`]*?),{file}`$1`,smg; - s,,{option}`$1`,smg; - s,([^`]*?),`$1`,smg; - s,([^`]*?),{command}`$1`,smg; - s,,<$1>,smg; - s,(.*?),[$2]($1),smg; - s,([^`]*?),`$1`,smg; - s,([^*]*?),*$1*,smg; - s,\s* - \s*(.*?)\s*\s* - \s*(.*?)\s*\s* - ,{manpage}`$1($2)`,smgx; - s,^( +description =),\1 lib.mdDoc,smg; -' "$@" - -echo "Building options.json again ..." -new_options=$(build-options-json) - - -! cmp -s {$old_options,$new_options}/share/doc/nixos/options.json && { - diff -U10 \ - <(jq . <$old_options/share/doc/nixos/options.json) \ - <(jq . <$new_options/share/doc/nixos/options.json) \ - | delta -} diff --git a/maintainers/scripts/nix-generate-from-cpan.nix b/maintainers/scripts/nix-generate-from-cpan.nix deleted file mode 100644 index bf48a531861..00000000000 --- a/maintainers/scripts/nix-generate-from-cpan.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ stdenv, lib, makeWrapper, perl, perlPackages }: - -stdenv.mkDerivation { - name = "nix-generate-from-cpan-3"; - - nativeBuildInputs = [ makeWrapper ]; - - buildInputs = with perlPackages; [ - perl GetoptLongDescriptive CPANPLUS Readonly LogLog4perl - ]; - - dontUnpack = true; - - installPhase = '' - mkdir -p $out/bin - cp ${./nix-generate-from-cpan.pl} $out/bin/nix-generate-from-cpan - patchShebangs $out/bin/nix-generate-from-cpan - wrapProgram $out/bin/nix-generate-from-cpan --set PERL5LIB $PERL5LIB - ''; - - meta = { - maintainers = with lib.maintainers; [ eelco ]; - description = "Utility to generate a Nix expression for a Perl package from CPAN"; - platforms = lib.platforms.unix; - }; -} diff --git a/maintainers/scripts/nixpkgs-lint.nix b/maintainers/scripts/nixpkgs-lint.nix deleted file mode 100644 index 873905373af..00000000000 --- a/maintainers/scripts/nixpkgs-lint.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ stdenv, lib, makeWrapper, perl, perlPackages }: - -stdenv.mkDerivation { - name = "nixpkgs-lint-1"; - - nativeBuildInputs = [ makeWrapper ]; - buildInputs = [ perl perlPackages.XMLSimple ]; - - dontUnpack = true; - buildPhase = "true"; - - installPhase = - '' - mkdir -p $out/bin - cp ${./nixpkgs-lint.pl} $out/bin/nixpkgs-lint - wrapProgram $out/bin/nixpkgs-lint --set PERL5LIB $PERL5LIB - ''; - - meta = with lib; { - maintainers = [ maintainers.eelco ]; - description = "A utility for Nixpkgs contributors to check Nixpkgs for common errors"; - platforms = platforms.unix; - }; -} diff --git a/maintainers/scripts/nixpkgs-lint.pl b/maintainers/scripts/nixpkgs-lint.pl deleted file mode 100755 index 43fb3941361..00000000000 --- a/maintainers/scripts/nixpkgs-lint.pl +++ /dev/null @@ -1,173 +0,0 @@ -#! /usr/bin/env nix-shell -#! nix-shell -i perl -p perl perlPackages.XMLSimple - -use strict; -use List::Util qw(min); -use XML::Simple qw(:strict); -use Getopt::Long qw(:config gnu_getopt); - -# Parse the command line. -my $path = ""; -my $filter = "*"; -my $maintainer; - -sub showHelp { - print <’) - -Examples: - \$ nixpkgs-lint -f /my/nixpkgs -p firefox - \$ nixpkgs-lint -f /my/nixpkgs -m eelco -EOF - exit 0; -} - -GetOptions("package|p=s" => \$filter, - "maintainer|m=s" => \$maintainer, - "file|f=s" => \$path, - "help" => sub { showHelp() } - ) or exit 1; - -# Evaluate Nixpkgs into an XML representation. -my $xml = `nix-env -f '$path' --arg overlays '[]' -qa '$filter' --xml --meta --drv-path`; -die "$0: evaluation of ‘$path’ failed\n" if $? != 0; - -my $info = XMLin($xml, KeyAttr => { 'item' => '+attrPath', 'meta' => 'name' }, ForceArray => 1, SuppressEmpty => '' ) or die "cannot parse XML output"; - -# Check meta information. -print "=== Package meta information ===\n\n"; -my $nrBadNames = 0; -my $nrMissingMaintainers = 0; -my $nrMissingPlatforms = 0; -my $nrMissingDescriptions = 0; -my $nrBadDescriptions = 0; -my $nrMissingLicenses = 0; - -foreach my $attr (sort keys %{$info->{item}}) { - my $pkg = $info->{item}->{$attr}; - - my $pkgName = $pkg->{name}; - my $pkgVersion = ""; - if ($pkgName =~ /(.*)(-[0-9].*)$/) { - $pkgName = $1; - $pkgVersion = $2; - } - - # Check the maintainers. - my @maintainers; - my $x = $pkg->{meta}->{maintainers}; - if (defined $x && $x->{type} eq "strings") { - @maintainers = map { $_->{value} } @{$x->{string}}; - } elsif (defined $x->{value}) { - @maintainers = ($x->{value}); - } - - if (defined $maintainer && scalar(grep { $_ =~ /$maintainer/i } @maintainers) == 0) { - delete $info->{item}->{$attr}; - next; - } - - if (scalar @maintainers == 0) { - print "$attr: Lacks a maintainer\n"; - $nrMissingMaintainers++; - } - - # Check the platforms. - if (!defined $pkg->{meta}->{platforms}) { - print "$attr: Lacks a platform\n"; - $nrMissingPlatforms++; - } - - # Package names should not be capitalised. - if ($pkgName =~ /^[A-Z]/) { - print "$attr: package name ‘$pkgName’ should not be capitalised\n"; - $nrBadNames++; - } - - if ($pkgVersion eq "") { - print "$attr: package has no version\n"; - $nrBadNames++; - } - - # Check the license. - if (!defined $pkg->{meta}->{license}) { - print "$attr: Lacks a license\n"; - $nrMissingLicenses++; - } - - # Check the description. - my $description = $pkg->{meta}->{description}->{value}; - if (!$description) { - print "$attr: Lacks a description\n"; - $nrMissingDescriptions++; - } else { - my $bad = 0; - if ($description =~ /^\s/) { - print "$attr: Description starts with whitespace\n"; - $bad = 1; - } - if ($description =~ /\s$/) { - print "$attr: Description ends with whitespace\n"; - $bad = 1; - } - if ($description =~ /\.$/) { - print "$attr: Description ends with a period\n"; - $bad = 1; - } - if (index(lc($description), lc($attr)) != -1) { - print "$attr: Description contains package name\n"; - $bad = 1; - } - $nrBadDescriptions++ if $bad; - } -} - -print "\n"; - -# Find packages that have the same name. -print "=== Package name collisions ===\n\n"; - -my %pkgsByName; - -foreach my $attr (sort keys %{$info->{item}}) { - my $pkg = $info->{item}->{$attr}; - #print STDERR "attr = $attr, name = $pkg->{name}\n"; - $pkgsByName{$pkg->{name}} //= []; - push @{$pkgsByName{$pkg->{name}}}, $pkg; -} - -my $nrCollisions = 0; -foreach my $name (sort keys %pkgsByName) { - my @pkgs = @{$pkgsByName{$name}}; - - # Filter attributes that are aliases of each other (e.g. yield the - # same derivation path). - my %drvsSeen; - @pkgs = grep { my $x = $drvsSeen{$_->{drvPath}}; $drvsSeen{$_->{drvPath}} = 1; !defined $x } @pkgs; - - # Filter packages that have a lower priority. - my $highest = min (map { $_->{meta}->{priority}->{value} // 0 } @pkgs); - @pkgs = grep { ($_->{meta}->{priority}->{value} // 0) == $highest } @pkgs; - - next if scalar @pkgs == 1; - - $nrCollisions++; - print "The following attributes evaluate to a package named ‘$name’:\n"; - print " ", join(", ", map { $_->{attrPath} } @pkgs), "\n\n"; -} - -print "=== Bottom line ===\n"; -print "Number of packages: ", scalar(keys %{$info->{item}}), "\n"; -print "Number of bad names: $nrBadNames\n"; -print "Number of missing maintainers: $nrMissingMaintainers\n"; -print "Number of missing platforms: $nrMissingPlatforms\n"; -print "Number of missing licenses: $nrMissingLicenses\n"; -print "Number of missing descriptions: $nrMissingDescriptions\n"; -print "Number of bad descriptions: $nrBadDescriptions\n"; -print "Number of name collisions: $nrCollisions\n"; diff --git a/maintainers/scripts/update-octave-shell.nix b/maintainers/scripts/update-octave-shell.nix deleted file mode 100644 index 51d4844c79f..00000000000 --- a/maintainers/scripts/update-octave-shell.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ nixpkgs ? import ../.. { } -}: -with nixpkgs; -let - pyEnv = python3.withPackages(ps: with ps; [ packaging requests toolz pyyaml ]); -in -mkShell { - packages = [ - pyEnv - nix-prefetch-scripts - ]; -} diff --git a/maintainers/scripts/vanity-manual-equalities.txt b/maintainers/scripts/vanity-manual-equalities.txt deleted file mode 100644 index 4a7bc3aea44..00000000000 --- a/maintainers/scripts/vanity-manual-equalities.txt +++ /dev/null @@ -1,7 +0,0 @@ -viric viriketo@gmail.com -Pjotr Prins pjotr.public01@thebird.nl -Pjotr Prins pjotr.public05@thebird.nl -Wouter den Breejen wbreejen -MarcWeber marcweber -Ricardo Correia Ricardo M. Correia -ertesx@gmx.de ertes diff --git a/maintainers/scripts/vanity.sh b/maintainers/scripts/vanity.sh deleted file mode 100755 index b879488165d..00000000000 --- a/maintainers/scripts/vanity.sh +++ /dev/null @@ -1,122 +0,0 @@ -#! /bin/sh - -export LANG=C LC_ALL=C LC_COLLATE=C - -# Load git log -raw_git_log="$(git log)" -git_data="$(echo "$raw_git_log" | grep 'Author:' | - sed -e 's/^ *Author://; s/\\//g; s/^ *//; s/ *$//; - s/ @ .*//; s/ *[<]/\t/; s/[>]//')" - -# Name - nick - email correspondence from log and from maintainer list -# Also there are a few manual entries -maintainers="$(cat "$(dirname "$0")/../maintainer-list.nix" | - grep '=' | sed -re 's/\\"/''/g; - s/[ ]*([^ =]*)[ ]*=[ ]*" *(.*[^ ]) *[<](.*)[>] *".*/\1\t\2\t\3/')" -git_lines="$( ( echo "$git_data"; - cat "$(dirname "$0")/vanity-manual-equalities.txt") | sort |uniq)" - -emails="$( - ( echo "$maintainers" | cut -f 3; echo "$git_data" | cut -f 2 ) | - sort | uniq | grep -E ".+@.+[.].+" - )" - -fetchGithubName () { - commitid="$( - echo "$raw_git_log" | grep -B3 "Author: .*[<]$1[>]" | head -n 3 | - grep '^commit ' | tail -n 1 | sed -e 's/^commit //' - )" - userid="$( - curl https://github.com/NixOS/nixpkgs/commit/"$commitid" 2>/dev/null | - grep committed -B10 | grep 'href="/' | - sed -re 's@.* href="/@@; s@".*@@' | - grep -v "/commit/" - )"; - echo "$userid" -} - -[ -n "$NIXPKGS_GITHUB_NAME_CACHE" ] && { - echo "$emails" | while read email; do - line="$(grep "$email " "$NIXPKGS_GITHUB_NAME_CACHE")" - [ -z "$line" ] && { - echo "$email $(fetchGithubName "$email")" >> \ - "$NIXPKGS_GITHUB_NAME_CACHE" - } - done -} - -# For RDF -normalize_name () { - sed -e 's/%/%25/g; s/ /%20/g; s/'\''/%27/g; s/"/%22/g; s/`/%60/g; s/\^/%5e/g; ' -} - -denormalize_name () { - sed -e 's/%20/ /g; s/%27/'\''/g; s/%22/"/g; s/%60/`/g; s/%5e/^/g; s/%25/%/g;'; -} - -n3="$(mktemp --suffix .n3)" - -# «The same person» relation and a sorting hint -# Full name is something with a space -( -echo "$git_lines" | sed -re 's@(.*)\t(.*)@ .@' -echo "$git_lines" | sed -re 's@(.*)\t(.*)@ .@' -echo "$maintainers" | sed -re 's@(.*)\t(.*)\t(.*)@ .@' -echo "$maintainers" | sed -re 's@(.*)\t(.*)\t(.*)@ .@' -echo "$maintainers" | sed -re 's@(.*)\t(.*)\t(.*)@ .@' -echo "$git_lines" | grep ' ' | cut -f 1 | sed -e 's@.*@ .@' -echo "$git_lines" | grep -v ' ' | cut -f 1 | sed -e 's@.*@ .@' -echo "$maintainers" | cut -f 2 | sed -e 's@.*@ .@' -[ -n "$NIXPKGS_GITHUB_NAME_CACHE" ] && cat "$NIXPKGS_GITHUB_NAME_CACHE" | - grep -v " $" | - sed -re 's@(.*)\t(.*)@ .@' -) | normalize_name | grep -E '' | sort | uniq > "$n3" - -# Get transitive closure -sparql="$(nix-build '' -Q -A apache-jena --no-out-link)/bin/sparql" -name_list="$( - "$sparql" --results=TSV --data="$n3" " - select ?x ?y ?g where { - ?x + ?y. - ?x ?g. - } - " | tail -n +2 | - sed -re 's@@@g;' | - sort -k 2,3 -t ' ' -)" -github_name_list="$( - "$sparql" --results=TSV --data="$n3" " - select ?x ?y where { - ?x (+ / ) ?y. - } - " | tail -n +2 | - sed -re 's@@@g;' -)" - -# Take first spelling option for every person -name_list_canonical="$(echo "$name_list" | cut -f 1,2 | uniq -f1)" - -cleaner_script="$(echo "$name_list_canonical" | denormalize_name | - sed -re 's/(.*)\t(.*)/s#^\2$#\1#g/g')" - -# Add github usernames -if [ -n "$NIXPKGS_GITHUB_NAME_CACHE" ]; then - github_adder_script="$(mktemp)" - echo "$github_name_list" | - grep -E "$(echo "$name_list_canonical" | cut -f 2 | - tr '\n' '|' )" | - sort | uniq | - sed -re 's/(.*)\t(.*)/s| \1$| \1\t\2|g;/' | - denormalize_name > "$github_adder_script" -else - github_adder_script='/dev/null' -fi - -echo "$name_list" | denormalize_name - -echo - -echo "$git_data" | cut -f 1 | - sed -e "$cleaner_script" | - sort | uniq -c | sort -k1n | sed -rf "$github_adder_script" | - sed -re 's/^ *([0-9]+) /\1\t/' diff --git a/maintainers/team-list.nix b/maintainers/team-list.nix deleted file mode 100644 index 88dbdd4dfcc..00000000000 --- a/maintainers/team-list.nix +++ /dev/null @@ -1,828 +0,0 @@ -/* List of maintainer teams. - name = { - # Required - members = [ maintainer1 maintainer2 ]; - scope = "Maintain foo packages."; - shortName = "foo"; - # Optional - enableFeatureFreezePing = true; - githubTeams = [ "my-subsystem" ]; - }; - - where - - - `members` is the list of maintainers belonging to the group, - - `scope` describes the scope of the group. - - `shortName` short human-readable name - - `enableFeatureFreezePing` will ping this team during the Feature Freeze announcements on releases - - There is limited mention capacity in a single post, so this should be reserved for critical components - or larger ecosystems within nixpkgs. - - `githubTeams` will ping specified GitHub teams as well - - More fields may be added in the future. - - When editing this file: - * keep the list alphabetically sorted - * test the validity of the format with: - nix-build lib/tests/teams.nix - */ - -{ lib }: -with lib.maintainers; { - acme = { - members = [ - aanderse - andrew-d - arianvp - emily - flokli - m1cr0man - ]; - scope = "Maintain ACME-related packages and modules."; - shortName = "ACME"; - enableFeatureFreezePing = true; - }; - - bazel = { - members = [ - mboes - marsam - uri-canva - cbley - olebedev - groodt - aherrmann - ylecornec - ]; - scope = "Bazel build tool & related tools https://bazel.build/"; - shortName = "Bazel"; - enableFeatureFreezePing = true; - }; - - beam = { - members = [ - ankhers - Br1ght0ne - DianaOlympos - gleber - happysalada - minijackson - yurrriq - ]; - githubTeams = [ - "beam" - ]; - scope = "Maintain BEAM-related packages and modules."; - shortName = "BEAM"; - enableFeatureFreezePing = true; - }; - - bitnomial = { - # Verify additions to this team with at least one already existing member of the team. - members = [ - cdepillabout - wraithm - ]; - scope = "Group registration for packages maintained by Bitnomial."; - shortName = "Bitnomial employees"; - }; - - blockchains = { - members = [ - mmahut - RaghavSood - ]; - scope = "Maintain Blockchain packages and modules."; - shortName = "Blockchains"; - }; - - c = { - members = [ - matthewbauer - mic92 - ]; - scope = "Maintain C libraries and tooling."; - shortName = "C"; - enableFeatureFreezePing = true; - }; - - c3d2 = { - members = [ - astro - SuperSandro2000 - revol-xut - oxapentane - ]; - scope = "Maintain packages used in the C3D2 hackspace"; - shortName = "c3d2"; - }; - - cinnamon = { - members = [ - bobby285271 - mkg20001 - ]; - scope = "Maintain Cinnamon desktop environment and applications made by the Linux Mint team."; - shortName = "Cinnamon"; - enableFeatureFreezePing = true; - }; - - chia = { - members = [ - lourkeur - ]; - scope = "Maintain the Chia blockchain and its dependencies"; - shortName = "Chia Blockchain"; - }; - - coq = { - members = [ - cohencyril - Zimmi48 - # gares has no entry in the maintainers list - siraben - vbgl - alizter - ]; - scope = "Maintain the Coq theorem prover and related packages."; - shortName = "Coq"; - enableFeatureFreezePing = true; - }; - - darwin = { - members = [ - toonn - ]; - githubTeams = [ - "darwin-maintainers" - ]; - scope = "Maintain Darwin compatibility of packages and Darwin-only packages."; - shortName = "Darwin"; - enableFeatureFreezePing = true; - }; - - cosmopolitan = { - members = [ - lourkeur - tomberek - ]; - scope = "Maintain the Cosmopolitan LibC and related programs."; - shortName = "Cosmopolitan"; - }; - - deepin = { - members = [ - rewine - ]; - scope = "Maintain deepin desktop environment and related packages."; - shortName = "DDE"; - enableFeatureFreezePing = true; - }; - - deshaw = { - # Verify additions to this team with at least one already existing member of the team. - members = [ - limeytexan - ]; - scope = "Group registration for D. E. Shaw employees who collectively maintain packages."; - shortName = "Shaw employees"; - }; - - determinatesystems = { - # Verify additions to this team with at least one already existing member of the team. - members = [ - cole-h - grahamc - hoverbear - lheckemann - ]; - scope = "Group registration for packages maintained by Determinate Systems."; - shortName = "Determinate Systems employees"; - }; - - dhall = { - members = [ - Gabriel439 - ehmry - ]; - scope = "Maintain Dhall and related packages."; - shortName = "Dhall"; - enableFeatureFreezePing = true; - }; - - docker = { - members = [ - roberth - utdemir - ]; - scope = "Maintain Docker and related tools."; - shortName = "DockerTools"; - }; - - docs = { - members = [ - asymmetric - ryantm - ]; - scope = "Maintain nixpkgs/NixOS documentation and tools for building it."; - shortName = "Docs"; - enableFeatureFreezePing = true; - }; - - emacs = { - members = [ - adisbladis - ]; - scope = "Maintain the Emacs editor and packages."; - shortName = "Emacs"; - }; - - enlightenment = { - members = [ - romildo - ]; - githubTeams = [ - "enlightenment" - ]; - scope = "Maintain Enlightenment desktop environment and related packages."; - shortName = "Enlightenment"; - enableFeatureFreezePing = true; - }; - - # Dummy group for the "everyone else" section - feature-freeze-everyone-else = { - members = [ ]; - githubTeams = [ - "nixpkgs-committers" - "release-engineers" - ]; - scope = "Dummy team for the #everyone else' section during feture freezes, not to be used as package maintainers!"; - shortName = "Everyone else"; - enableFeatureFreezePing = true; - }; - - freedesktop = { - members = [ jtojnar ]; - scope = "Maintain Freedesktop.org packages for graphical desktop."; - shortName = "freedesktop.org packaging"; - }; - - gcc = { - members = [ - synthetica - vcunat - ericson2314 - ]; - scope = "Maintain GCC (GNU Compiler Collection) compilers"; - shortName = "GCC"; - }; - - geospatial = { - members = [ - imincik - sikmir - ]; - scope = "Maintain geospatial packages."; - shortName = "Geospatial"; - }; - - golang = { - members = [ - kalbasit - mic92 - zowoq - qbit - ]; - githubTeams = [ - "golang" - ]; - scope = "Maintain Golang compilers."; - shortName = "Go"; - enableFeatureFreezePing = true; - }; - - gnome = { - members = [ - bobby285271 - hedning - jtojnar - dasj19 - maxeaubrey - ]; - githubTeams = [ - "gnome" - ]; - scope = "Maintain GNOME desktop environment and platform."; - shortName = "GNOME"; - enableFeatureFreezePing = true; - }; - - graalvm-ce = { - members = [ - bandresen - hlolli - glittershark - babariviere - ericdallo - thiagokokada - ]; - scope = "Maintain GraalVM Community Edition packages."; - shortName = "GraalVM-CE"; - }; - - haskell = { - members = [ - cdepillabout - expipiplus1 - maralorn - sternenseemann - ]; - githubTeams = [ - "haskell" - ]; - scope = "Maintain Haskell packages and infrastructure."; - shortName = "Haskell"; - enableFeatureFreezePing = true; - }; - - home-assistant = { - members = [ - fab - globin - hexa - mic92 - ]; - scope = "Maintain the Home Assistant ecosystem"; - shortName = "Home Assistant"; - }; - - iog = { - members = [ - cleverca22 - disassembler - jonringer - manveru - nrdxp - ]; - scope = "Input-Output Global employees, which maintain critical software"; - shortName = "Input-Output Global employees"; - }; - - jitsi = { - members = [ - cleeyv - ryantm - yuka - ]; - scope = "Maintain Jitsi."; - shortName = "Jitsi"; - }; - - kubernetes = { - members = [ - johanot - offline - saschagrunert - srhb - zowoq - ]; - scope = "Maintain the Kubernetes package and module"; - shortName = "Kubernetes"; - }; - - kodi = { - members = [ - aanderse - cpages - edwtjo - minijackson - peterhoeg - sephalon - ]; - scope = "Maintain Kodi and related packages."; - shortName = "Kodi"; - }; - - libretro = { - members = [ - aanderse - edwtjo - MP2E - thiagokokada - ]; - scope = "Maintain Libretro, RetroArch and related packages."; - shortName = "Libretro"; - }; - - linux-kernel = { - members = [ - TredwellGit - ma27 - nequissimus - qyliss - ]; - scope = "Maintain the Linux kernel."; - shortName = "Linux Kernel"; - }; - - lisp = { - members = [ - raskin - lukego - nagy - uthar - hraban - ]; - githubTeams = [ - "lisp" - ]; - scope = "Maintain the Lisp ecosystem."; - shortName = "lisp"; - enableFeatureFreezePing = true; - }; - - llvm = { - members = [ - dtzWill - ericson2314 - lovek323 - primeos - qyliss - raitobezarius - rrbutani - sternenseemann - ]; - scope = "Maintain LLVM package sets and related packages"; - shortName = "LLVM"; - enableFeatureFreezePing = true; - }; - - lumiguide = { - # Verify additions by approval of an already existing member of the team. - members = [ - roelvandijk - lucus16 - ]; - scope = "Group registration for LumiGuide employees who collectively maintain packages."; - shortName = "Lumiguide employees"; - }; - - lua = { - githubTeams = [ - "lua" - ]; - scope = "Maintain the lua ecosystem."; - shortName = "lua"; - enableFeatureFreezePing = true; - }; - - lumina = { - members = [ - romildo - ]; - githubTeams = [ - "lumina" - ]; - scope = "Maintain lumina desktop environment and related packages."; - shortName = "Lumina"; - enableFeatureFreezePing = true; - }; - - lxqt = { - members = [ - romildo - ]; - githubTeams = [ - "lxqt" - ]; - scope = "Maintain LXQt desktop environment and related packages."; - shortName = "LXQt"; - enableFeatureFreezePing = true; - }; - - marketing = { - members = [ - garbas - tomberek - ]; - scope = "Marketing of Nix/NixOS/nixpkgs."; - shortName = "Marketing"; - enableFeatureFreezePing = true; - }; - - mate = { - members = [ - j03 - romildo - ]; - scope = "Maintain Mate desktop environment and related packages."; - shortName = "MATE"; - enableFeatureFreezePing = true; - }; - - matrix = { - members = [ - ma27 - fadenb - mguentner - ekleog - ralith - dandellion - sumnerevans - ]; - scope = "Maintain the ecosystem around Matrix, a decentralized messenger."; - shortName = "Matrix"; - }; - - mobile = { - members = [ - samueldr - ]; - scope = "Maintain Mobile NixOS."; - shortName = "Mobile"; - }; - - nix = { - members = [ - Profpatsch - eelco - grahamc - pierron - ]; - scope = "Maintain the Nix package manager."; - shortName = "Nix/nix-cli ecosystem"; - enableFeatureFreezePing = true; - }; - - nixos-modules = { - members = [ - ericson2314 - infinisil - qyliss - roberth - ]; - scope = "Maintain nixpkgs module system internals."; - shortName = "NixOS Modules / internals"; - enableFeatureFreezePing = true; - }; - - node = { - members = [ - lilyinstarlight - marsam - winter - yuka - ]; - scope = "Maintain Node.js runtimes and build tooling."; - shortName = "Node.js"; - enableFeatureFreezePing = true; - }; - - numtide = { - members = [ - mic92 - flokli - jfroche - tazjin - zimbatm - ]; - scope = "Group registration for Numtide team members who collectively maintain packages."; - shortName = "Numtide team"; - }; - - openstack = { - members = [ - emilytrau - SuperSandro2000 - ]; - scope = "Maintain the ecosystem around OpenStack"; - shortName = "OpenStack"; - }; - - pantheon = { - members = [ - davidak - bobby285271 - ]; - githubTeams = [ - "pantheon" - ]; - scope = "Maintain Pantheon desktop environment and platform."; - shortName = "Pantheon"; - enableFeatureFreezePing = true; - }; - - perl = { - members = [ - sgo - ]; - scope = "Maintain the Perl interpreter and Perl packages."; - shortName = "Perl"; - enableFeatureFreezePing = true; - }; - - php = { - members = [ - aanderse - drupol - etu - globin - ma27 - talyz - ]; - githubTeams = [ - "php" - ]; - scope = "Maintain PHP related packages and extensions."; - shortName = "PHP"; - enableFeatureFreezePing = true; - }; - - podman = { - members = [ - adisbladis - saschagrunert - vdemeester - zowoq - ]; - githubTeams = [ - "podman" - ]; - scope = "Maintain Podman and CRI-O related packages and modules."; - shortName = "Podman"; - }; - - postgres = { - members = [ - thoughtpolice - ]; - scope = "Maintain the PostgreSQL package and plugins along with the NixOS module."; - shortName = "PostgreSQL"; - }; - - python = { - members = [ - fridh - hexa - jonringer - ]; - scope = "Maintain the Python interpreter and related packages."; - shortName = "Python"; - enableFeatureFreezePing = true; - }; - - qt-kde = { - members = [ - ttuegel - ]; - githubTeams = [ - "qt-kde" - ]; - scope = "Maintain the KDE desktop environment and Qt."; - shortName = "Qt / KDE"; - enableFeatureFreezePing = true; - }; - - r = { - members = [ - bcdarwin - jbedo - ]; - scope = "Maintain the R programming language and related packages."; - shortName = "R"; - enableFeatureFreezePing = true; - }; - - redcodelabs = { - members = [ - unrooted - wr0belj - wintrmvte - ]; - scope = "Maintain Red Code Labs related packages and modules."; - shortName = "Red Code Labs"; - }; - - release = { - members = [ ]; - githubTeams = [ - "nixos-release-managers" - ]; - scope = "Manage the current nixpkgs/NixOS release."; - shortName = "Release"; - }; - - rocm = { - members = [ - Madouura - Flakebi - ]; - githubTeams = [ - "rocm-maintainers" - ]; - scope = "Maintain ROCm and related packages."; - shortName = "ROCm"; - }; - - ruby = { - members = [ - marsam - ]; - scope = "Maintain the Ruby interpreter and related packages."; - shortName = "Ruby"; - enableFeatureFreezePing = true; - }; - - rust = { - members = [ - figsoda - mic92 - tjni - winter - zowoq - ]; - githubTeams = [ - "rust" - ]; - scope = "Maintain the Rust compiler toolchain and nixpkgs integration."; - shortName = "Rust"; - enableFeatureFreezePing = true; - }; - - sage = { - members = [ - timokau - omasanori - raskin - collares - ]; - scope = "Maintain SageMath and the dependencies that are likely to break it."; - shortName = "SageMath"; - }; - - sphinx = { - members = [ - SuperSandro2000 - ]; - scope = "Maintain Sphinx related packages."; - shortName = "Sphinx"; - }; - - serokell = { - # Verify additions by approval of an already existing member of the team. - members = [ - balsoft - ]; - scope = "Group registration for Serokell employees who collectively maintain packages."; - shortName = "Serokell employees"; - }; - - systemd = { - members = [ ]; - githubTeams = [ - "systemd" - ]; - scope = "Maintain systemd for NixOS."; - shortName = "systemd"; - enableFeatureFreezePing = true; - }; - - tests = { - members = [ - tfc - ]; - scope = "Maintain the NixOS VM test runner."; - shortName = "NixOS tests"; - enableFeatureFreezePing = true; - }; - - tts = { - members = [ - hexa - mic92 - ]; - scope = "coqui-ai TTS (formerly Mozilla TTS) and leaf packages"; - shortName = "coqui-ai TTS"; - }; - - vim = { - members = [ - figsoda - jonringer - softinio - teto - ]; - scope = "Maintain the vim and neovim text editors and related packages."; - shortName = "Vim/Neovim"; - }; - - xfce = { - members = [ - romildo - muscaln - ]; - scope = "Maintain Xfce desktop environment and related packages."; - shortName = "Xfce"; - enableFeatureFreezePing = true; - }; -} diff --git a/pkgs/common-updater/combinators.nix b/pkgs/common-updater/combinators.nix deleted file mode 100644 index d60a6e74271..00000000000 --- a/pkgs/common-updater/combinators.nix +++ /dev/null @@ -1,158 +0,0 @@ -{ lib -}: - -/* - This is a set of tools to manipulate update scripts as recognized by update.nix. - It is still very experimental with **instability** almost guaranteed so any use - outside Nixpkgs is discouraged. - - update.nix currently accepts the following type: - - type UpdateScript - // Simple path to script to execute script - = FilePath - // Path to execute plus arguments to pass it - | [ (FilePath | String) ] - // Advanced attribue set (experimental) - | { - // Script to execute (same as basic update script above) - command : (FilePath | [ (FilePath | String) ]) - // Features that the script supports - // - commit: (experimental) returns commit message in stdout - // - silent: (experimental) returns no stdout - supportedFeatures : ?[ ("commit" | "silent") ] - // Override attribute path detected by update.nix - attrPath : ?String - } -*/ - -let - /* - type ShellArg = String | { __rawShell : String } - */ - - /* - Quotes all arguments to be safely passed to the Bourne shell. - - escapeShellArgs' : [ShellArg] -> String - */ - escapeShellArgs' = lib.concatMapStringsSep " " (arg: if arg ? __rawShell then arg.__rawShell else lib.escapeShellArg arg); - - /* - processArg : { maxArgIndex : Int, args : [ShellArg], paths : [FilePath] } → (String|FilePath) → { maxArgIndex : Int, args : [ShellArg], paths : [FilePath] } - Helper reducer function for building a command arguments where file paths are replaced with argv[x] reference. - */ - processArg = - { maxArgIndex, args, paths }: - arg: - if builtins.isPath arg then { - args = args ++ [ { __rawShell = "\"\$${builtins.toString maxArgIndex}\""; } ]; - maxArgIndex = maxArgIndex + 1; - paths = paths ++ [ arg ]; - } else { - args = args ++ [ arg ]; - inherit maxArgIndex paths; - }; - /* - extractPaths : Int → [ (String|FilePath) ] → { maxArgIndex : Int, args : [ShellArg], paths : [FilePath] } - Helper function that extracts file paths from command arguments and replaces them with argv[x] references. - */ - extractPaths = maxArgIndex: command: builtins.foldl' processArg { inherit maxArgIndex; args = [ ]; paths = [ ]; } command; - /* - processCommand : { maxArgIndex : Int, commands : [[ShellArg]], paths : [FilePath] } → [ (String|FilePath) ] → { maxArgIndex : Int, commands : [[ShellArg]], paths : [FilePath] } - Helper reducer function for extracting file paths from individual commands. - */ - processCommand = - { maxArgIndex, commands, paths }: - command: - let - new = extractPaths maxArgIndex command; - in - { - commands = commands ++ [ new.args ]; - paths = paths ++ new.paths; - maxArgIndex = new.maxArgIndex; - }; - /* - extractCommands : Int → [[ (String|FilePath) ]] → { maxArgIndex : Int, commands : [[ShellArg]], paths : [FilePath] } - Helper function for extracting file paths from a list of commands and replacing them with argv[x] references. - */ - extractCommands = maxArgIndex: commands: builtins.foldl' processCommand { inherit maxArgIndex; commands = [ ]; paths = [ ]; } commands; - - /* - commandsToShellInvocation : [[ (String|FilePath) ]] → [ (String|FilePath) ] - Converts a list of commands into a single command by turning them into a shell script and passing them to `sh -c`. - */ - commandsToShellInvocation = commands: - let - extracted = extractCommands 0 commands; - in - [ - "sh" - "-c" - (lib.concatMapStringsSep ";" escapeShellArgs' extracted.commands) - # We need paths as separate arguments so that update.nix can ensure they refer to the local directory - # rather than a store path. - ] ++ extracted.paths; -in -rec { - /* - normalize : UpdateScript → UpdateScript - EXPERIMENTAL! Converts a basic update script to the experimental attribute set form. - */ - normalize = updateScript: { - command = lib.toList (updateScript.command or updateScript); - supportedFeatures = updateScript.supportedFeatures or [ ]; - } // lib.optionalAttrs (updateScript ? attrPath) { - inherit (updateScript) attrPath; - }; - - /* - sequence : [UpdateScript] → UpdateScript - EXPERIMENTAL! Combines multiple update scripts to run in sequence. - */ - sequence = - scripts: - - let - scriptsNormalized = builtins.map normalize scripts; - in - let - scripts = scriptsNormalized; - hasCommitSupport = lib.findSingle ({ supportedFeatures, ... }: supportedFeatures == [ "commit" ]) null null scripts != null; - validateFeatures = - if hasCommitSupport then - ({ supportedFeatures, ... }: supportedFeatures == [ "commit" ] || supportedFeatures == [ "silent" ]) - else - ({ supportedFeatures, ... }: supportedFeatures == [ ]); - in - - assert lib.assertMsg (lib.all validateFeatures scripts) "Combining update scripts with features enabled (other than a single script with “commit” and all other with “silent”) is currently unsupported."; - assert lib.assertMsg (builtins.length (lib.unique (builtins.map ({ attrPath ? null, ... }: attrPath) scripts)) == 1) "Combining update scripts with different attr paths is currently unsupported."; - - { - command = commandsToShellInvocation (builtins.map ({ command, ... }: command) scripts); - supportedFeatures = lib.optionals hasCommitSupport [ - "commit" - ]; - }; - - /* - copyAttrOutputToFile : String → FilePath → UpdateScript - EXPERIMENTAL! Simple update script that copies the output of Nix derivation built by `attr` to `path`. - */ - copyAttrOutputToFile = - attr: - path: - - { - command = [ - "sh" - "-c" - "cp --no-preserve=all \"$(nix-build -A ${attr})\" \"$0\" > /dev/null" - path - ]; - supportedFeatures = [ "silent" ]; - }; - -} diff --git a/pkgs/common-updater/directory-listing-updater.nix b/pkgs/common-updater/directory-listing-updater.nix deleted file mode 100644 index bd0b5b1df30..00000000000 --- a/pkgs/common-updater/directory-listing-updater.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ lib -, genericUpdater -, common-updater-scripts -}: - -{ pname ? null -, version ? null -, attrPath ? null -, ignoredVersions ? "" -, rev-prefix ? "" -, odd-unstable ? false -, patchlevel-unstable ? false -, url ? null -, extraRegex ? null -}: - -genericUpdater { - inherit pname version attrPath ignoredVersions rev-prefix odd-unstable patchlevel-unstable; - versionLister = "${common-updater-scripts}/bin/list-directory-versions ${lib.optionalString (url != null) "--url=${lib.escapeShellArg url}"} ${lib.optionalString (extraRegex != null) "--extra-regex=${lib.escapeShellArg extraRegex}"}"; -} diff --git a/pkgs/common-updater/generic-updater.nix b/pkgs/common-updater/generic-updater.nix deleted file mode 100644 index e75a6dd7ab0..00000000000 --- a/pkgs/common-updater/generic-updater.nix +++ /dev/null @@ -1,117 +0,0 @@ -{ stdenv, writeScript, coreutils, gnugrep, gnused, common-updater-scripts, nix }: - -{ name ? null -, pname ? null -, version ? null -, attrPath ? null -, versionLister -, ignoredVersions ? "" -, rev-prefix ? "" -, odd-unstable ? false -, patchlevel-unstable ? false -}: - -let - # where to print git commands and debugging messages - fileForGitCommands = "update-git-commits.txt"; - - # shell script to update package - updateScript = writeScript "generic-update-script.sh" '' - #! ${stdenv.shell} - set -o errexit - set -x - - name="$1" - pname="$2" - version="$3" - attr_path="$4" - version_lister="$5" - ignored_versions="$6" - rev_prefix="$7" - odd_unstable="$8" - patchlevel_unstable="$9" - - [[ -n "$name" ]] || name="$UPDATE_NIX_NAME" - [[ -n "$pname" ]] || pname="$UPDATE_NIX_PNAME" - [[ -n "$version" ]] || version="$UPDATE_NIX_OLD_VERSION" - [[ -n "$attr_path" ]] || attr_path="$UPDATE_NIX_ATTR_PATH" - - # print header - echo "# $name" >> ${fileForGitCommands} - - function version_is_ignored() { - local tag="$1" - [ -n "$ignored_versions" ] && grep -E "$ignored_versions" <<< "$tag" - } - - function version_is_unstable() { - local tag="$1" - local enforce="$2" - if [ -n "$odd_unstable" -o -n "$enforce" ]; then - local minor=$(echo "$tag" | ${gnused}/bin/sed -rne 's,^[0-9]+\.([0-9]+).*,\1,p') - if [ $((minor % 2)) -eq 1 ]; then - return 0 - fi - fi - if [ -n "$patchlevel_unstable" -o -n "$enforce" ]; then - local patchlevel=$(echo "$tag" | ${gnused}/bin/sed -rne 's,^[0-9]+\.[0-9]+\.([0-9]+).*$,\1,p') - if ((patchlevel >= 90)); then - return 0 - fi - fi - return 1 - } - - tags=$(sh -c "$version_lister --pname=$pname --attr-path=$attr_path --file=\"${fileForGitCommands}\"") || exit 1 - - # print available tags - for tag in $tags; do - echo "# found $pname version: $tag" >> ${fileForGitCommands} - done - - # cut any revision prefix not used in the NixOS package version - if [ -n "$rev_prefix" ]; then - tags=$(echo "$tags" | ${gnugrep}/bin/grep "^$rev_prefix") - tags=$(echo "$tags" | ${gnused}/bin/sed -e "s,^$rev_prefix,,") - fi - tags=$(echo "$tags" | ${gnugrep}/bin/grep "^[0-9]") - - # sort the tags in decreasing order - tags=$(echo "$tags" | ${coreutils}/bin/sort --reverse --version-sort) - - # find the newest tag - # do not consider development versions - for latest_tag in $tags; do - if version_is_ignored "$latest_tag"; then - echo "# skip ignored version: $pname-$latest_tag" >> ${fileForGitCommands} - latest_tag= - elif version_is_unstable "$latest_tag"; then - echo "# skip development version: $pname-$latest_tag" >> ${fileForGitCommands} - latest_tag= - else - if version_is_unstable "$latest_tag" "enforce"; then - echo "# use potential development version: $pname-$latest_tag" >> ${fileForGitCommands} - fi - break - fi - done - - if [ -n "$latest_tag" ]; then - # print commands to commit the changes - if [ "$version" != "$latest_tag" ]; then - pfile=$(EDITOR=echo ${nix}/bin/nix edit --extra-experimental-features nix-command -f. "$attr_path") - echo " git add $pfile " >> ${fileForGitCommands} - echo " git commit -m '$attr_path: $version -> $latest_tag'" >> ${fileForGitCommands} - fi - - # update the nix expression - ${common-updater-scripts}/bin/update-source-version "$attr_path" "$latest_tag" - fi - - echo "" >> ${fileForGitCommands} - ''; - -in { - name = "generic-update-script"; - command = [ updateScript name pname version attrPath versionLister ignoredVersions rev-prefix odd-unstable patchlevel-unstable ]; -} diff --git a/pkgs/common-updater/git-updater.nix b/pkgs/common-updater/git-updater.nix deleted file mode 100644 index 86bf88ada8c..00000000000 --- a/pkgs/common-updater/git-updater.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ lib -, genericUpdater -, common-updater-scripts -}: - -{ pname ? null -, version ? null -, attrPath ? null -, ignoredVersions ? "" -, rev-prefix ? "" -, odd-unstable ? false -, patchlevel-unstable ? false -# an explicit url is needed when src.meta.homepage or src.url don't -# point to a git repo (eg. when using fetchurl, fetchzip, ...) -, url ? null -}: - -genericUpdater { - inherit pname version attrPath ignoredVersions rev-prefix odd-unstable patchlevel-unstable; - versionLister = "${common-updater-scripts}/bin/list-git-tags ${lib.optionalString (url != null) "--url=${url}"}"; -} diff --git a/pkgs/common-updater/http-two-levels-updater.nix b/pkgs/common-updater/http-two-levels-updater.nix deleted file mode 100644 index 4656163c18a..00000000000 --- a/pkgs/common-updater/http-two-levels-updater.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ lib -, genericUpdater -, common-updater-scripts -}: - -{ pname ? null -, version ? null -, attrPath ? null -, ignoredVersions ? "" -, rev-prefix ? "" -, odd-unstable ? false -, patchlevel-unstable ? false -, url ? null -}: - -genericUpdater { - inherit pname version attrPath ignoredVersions rev-prefix odd-unstable patchlevel-unstable; - versionLister = "${common-updater-scripts}/bin/list-archive-two-levels-versions ${lib.optionalString (url != null) "--url=${lib.escapeShellArg url}"}"; -} diff --git a/pkgs/common-updater/nix-update.nix b/pkgs/common-updater/nix-update.nix deleted file mode 100644 index 269e1b6e645..00000000000 --- a/pkgs/common-updater/nix-update.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ lib, nix-update }: - -{ attrPath ? null -, extraArgs ? [ ] -}: - -[ "${nix-update}/bin/nix-update" ] ++ extraArgs ++ lib.optional (attrPath != null) attrPath diff --git a/pkgs/common-updater/scripts.nix b/pkgs/common-updater/scripts.nix deleted file mode 100644 index d5ee3b58c50..00000000000 --- a/pkgs/common-updater/scripts.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ lib -, stdenv -, makeWrapper -, coreutils -, diffutils -, git -, gnugrep -, gnused -, jq -, nix -, python3Packages -}: - -stdenv.mkDerivation { - name = "common-updater-scripts"; - - nativeBuildInputs = [ - makeWrapper - python3Packages.wrapPython - ]; - - pythonPath = [ - python3Packages.beautifulsoup4 - python3Packages.requests - ]; - - dontUnpack = true; - - installPhase = '' - mkdir -p $out/bin - cp ${./scripts}/* $out/bin - - # wrap non python scripts - for f in $out/bin/*; do - if ! (head -n1 "$f" | grep -q '#!.*/env.*\(python\|pypy\)'); then - wrapProgram $f --prefix PATH : ${lib.makeBinPath [ coreutils diffutils git gnugrep gnused jq nix ]} - fi - done - - # wrap python scripts - makeWrapperArgs+=( --prefix PATH : "${lib.makeBinPath [ nix ]}" ) - wrapPythonPrograms - ''; -} diff --git a/pkgs/common-updater/scripts/list-archive-two-levels-versions b/pkgs/common-updater/scripts/list-archive-two-levels-versions deleted file mode 100755 index e7c02ed90b0..00000000000 --- a/pkgs/common-updater/scripts/list-archive-two-levels-versions +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env bash - -# lists all available versions listed for a package in a site (http) - -pname="" # package name -attr_path="" # package attribute path -url="" # directory listing url -file="" # file for writing debugging information - -while (( $# > 0 )); do - flag="$1" - shift 1 - case "$flag" in - --pname=*) - pname="${flag#*=}" - ;; - --attr-path=*) - attr_path="${flag#*=}" - ;; - --url=*) - url="${flag#*=}" - ;; - --file=*) - file="${flag#*=}" - ;; - *) - echo "$0: unknown option ‘${flag}’" - exit 1 - ;; - esac -done - -if [[ -z "$pname" ]]; then - pname="$UPDATE_NIX_PNAME" -fi - -if [[ -z "$attr_path" ]]; then - attr_path="$UPDATE_NIX_ATTR_PATH" -fi - -# by default set url to the base dir of the first url in src.urls -if [[ -z "$url" ]]; then - url="$(nix-instantiate $systemArg --eval -E \ - "with import ./. {}; dirOf (dirOf (lib.head $attr_path.src.urls))" \ - | tr -d '"')" -fi - -# print a debugging message -if [[ -n "$file" ]]; then - echo "# Listing versions for '$pname' at $url" >> $file -fi - -# list all major-minor versions from url -tags1=$(curl -sS "$url/") -tags1=$(echo "$tags1" | sed -rne 's,^.*,\1,p') - -# print available versions -for tag in $tags1; do - tags2=$(curl -sS "$url/$tag/") - tags2=$(echo "$tags2" | sed -rne "s,^.*,\\1,p") - echo "$tags2" -done diff --git a/pkgs/common-updater/scripts/list-directory-versions b/pkgs/common-updater/scripts/list-directory-versions deleted file mode 100755 index c713578beef..00000000000 --- a/pkgs/common-updater/scripts/list-directory-versions +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/env python - -import argparse -import requests -import os -import subprocess -import json -import re -from bs4 import BeautifulSoup - -parser = argparse.ArgumentParser( - description="Get all available versions listed for a package in a site." -) - -parser.add_argument( - "--pname", - default=os.environ.get("UPDATE_NIX_PNAME"), - required="UPDATE_NIX_PNAME" not in os.environ, - help="name of the package", -) -parser.add_argument( - "--attr-path", - default=os.environ.get("UPDATE_NIX_ATTR_PATH"), - help="attribute path of the package", -) -parser.add_argument("--url", help="url of the page that lists the package versions") -parser.add_argument("--file", help="file name for writing debugging information") - -parser.add_argument("--extra-regex", help="additional regex to filter versions with") - - -if __name__ == "__main__": - args = parser.parse_args() - - pname = args.pname - - attr_path = args.attr_path or pname - - url = args.url or json.loads( - subprocess.check_output( - [ - "nix-instantiate", - "--json", - "--eval", - "-E", - f"with import ./. {{}}; dirOf (lib.head {attr_path}.src.urls)", - ], - text=True, - ) - ) - - # print a debugging message - if args.file: - with open(args.file, "a") as f: - f.write(f"# Listing versions for {pname} from {url}\n") - - page = requests.get(url) - soup = BeautifulSoup(page.content, "html.parser") - links = soup.find_all("a") - for link in links: - link_url = link.get("href", None) - if link_url is not None: - match = re.fullmatch( - rf"(.*/)?{args.pname}-([\d.]+?(-[\d\w.-]+?)?)(\.tar)?(\.[^.]*)", link_url - ) - if match: - version = match.group(2) - if (not args.extra_regex) or re.fullmatch(args.extra_regex, version): - print(version) diff --git a/pkgs/common-updater/scripts/list-git-tags b/pkgs/common-updater/scripts/list-git-tags deleted file mode 100755 index cf0a52d9227..00000000000 --- a/pkgs/common-updater/scripts/list-git-tags +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env bash - -# lists all available tags from a git repository - -pname="" # package name -attr_path="" # package attribute path -url="" # git repository url -file="" # file for writing debugging information - -while (( $# > 0 )); do - flag="$1" - shift 1 - case "$flag" in - --pname=*) - pname="${flag#*=}" - ;; - --attr-path=*) - attr_path="${flag#*=}" - ;; - --url=*) - url="${flag#*=}" - ;; - --file=*) - file="${flag#*=}" - ;; - *) - echo "$0: unknown option ‘${flag}’" - exit 1 - ;; - esac -done - -if [[ -z "$pname" ]]; then - pname="$UPDATE_NIX_PNAME" -fi - -if [[ -z "$attr_path" ]]; then - attr_path="$UPDATE_NIX_ATTR_PATH" -fi - -# By default we set url to src.url or src.meta.homepage -if [[ -z "$url" ]]; then - url="$(nix-instantiate $systemArg --eval -E \ - "with import ./. {}; $attr_path.src.meta.homepage or $attr_path.src.url" \ - | tr -d '"')" -fi - -# print a debugging message -if [[ -n "$file" ]]; then - echo "# Listing tags for '$pname' at $url" >> $file -fi - -# list all tags from the remote repository -tags=$(git ls-remote --tags --refs "$url") - -# keep only the version part of the tag -tags=$(echo "$tags" | cut --delimiter=/ --field=3-) - -echo "$tags" diff --git a/pkgs/common-updater/scripts/mark-broken b/pkgs/common-updater/scripts/mark-broken deleted file mode 100755 index 7035bee1860..00000000000 --- a/pkgs/common-updater/scripts/mark-broken +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/env bash - -# This script is meant to be used to mark failing hydra builds as broken in the meta attrs -# To use the script, you should pass the list of failing attrs as arguments to the script. -# -# Example: `cat failing-attrs | xargs ./pkgs/common-updater/scripts/mark-broken` -# -# Generating a list of failing attrs: (this should be improved at a later date) -# - Go to the most recent hydra evaluation with all builds completed -# - Select the "builds still failing" tab -# - Highlight and select all packages, should be prefixed with `nixpkgs.` -# - Use regex and editor foo to leave only the attr names -# - Use the above example command to then execute the script -# -# OTHER NOTES: -# - The `denyFileList` and `denyAttrList` will likely need to be updated slightly -# to align with the conventions used in nixpkgs at execution time -# - Any attrs which failed for any reason will be written to `failed-marks.txt`. -# Those attrs will likely need manual attention as disablement will likely be conditional. - -scriptName=mark-broken # do not use the .wrapped name - -failMark() { - local attr=$1 - shift 1 - - echo "$attr: $@" >&2 - echo $attr >> failed-marks.txt -} - -usage() { - echo "Usage: $scriptName " -} - -if (( "${#@}" < 1 )); then - echo "$scriptName: Too few arguments" - usage - exit 1 -fi - -# in case we resolve to an auto-generated file, just skip these entries -denyFileList=( - node-packages.nix # node, it will mark all node packages as broken - generic-builder.nix # haskell, it will mark all haskell packages as broken -) - -# ignore older versions of parameterized packages sets, these likely need -# to be conditionally disabled -denyAttrList=( - python27Packages - linuxPackages_ - rubyPackages_ -) - -function attemptToMarkBroken() { - local attr=$1 - - # skip likely to be noisy attrs - for badAttr in ${denyAttrList[@]};do - if [[ $attr =~ $badAttr ]]; then - failMark $attr "attr contained $badAttr, skipped." - return - fi - done - - nixFile=$(nix-instantiate --eval --json -E "with import ./. {}; (builtins.unsafeGetAttrPos \"description\" $attr.meta).file" 2>/dev/null | jq -r .) - if [[ ! -f "$nixFile" ]]; then - failMark $attr "Couldn't locate correct file" - return - fi - - # skip files which are auto-generated - for filename in ${denyFileList[@]};do - if [[ "$filename" == $(basename $nixFile) ]]; then - failMark $attr "filename matched $filename, skipped." - return - fi - done - - # Insert broken attribute - sed -i.bak "$nixFile" -r \ - -e "/^\s*broken\s*=.*$/d" \ - -e "s/(\s*)meta\s*=.*\{/&\n\1 broken = true;/" - - if cmp -s "$nixFile" "$nixFile.bak"; then - mv "$nixFile.bak" "$nixFile" - failMark $attr "Does it have a meta attribute?" - return - fi - - # broken should evaluate to true in any case now - markedSuccessfully=$(nix-instantiate --eval -E "with import ./. {}; $attr.meta.broken") - if [[ "$markedSuccessfully" != "true" ]]; then - mv "$nixFile.bak" "$nixFile" - failMark $attr "$attr.meta.broken doesn't evaluate to true." - return - fi - - rm -f "$nixFile.bak" -} - -for attr in $@; do - attemptToMarkBroken $attr -done diff --git a/pkgs/common-updater/scripts/update-source-version b/pkgs/common-updater/scripts/update-source-version deleted file mode 100755 index 75ad6e7a5cf..00000000000 --- a/pkgs/common-updater/scripts/update-source-version +++ /dev/null @@ -1,273 +0,0 @@ -#!/usr/bin/env bash -set -e - -scriptName=update-source-version # do not use the .wrapped name - -die() { - echo "$scriptName: error: $1" >&2 - exit 1 -} - -usage() { - echo "Usage: $scriptName [] []" - echo " [--version-key=] [--source-key=]" - echo " [--system=] [--file=] [--rev=]" - echo " [--ignore-same-hash] [--print-changes]" -} - -args=() - -for arg in "$@"; do - case $arg in - --system=*) - system="${arg#*=}" - systemArg="--system ${arg#*=}" - ;; - --version-key=*) - versionKey="${arg#*=}" - ;; - --source-key=*) - sourceKey="${arg#*=}" - ;; - --file=*) - nixFile="${arg#*=}" - if [[ ! -f "$nixFile" ]]; then - die "Could not find provided file $nixFile" - fi - ;; - --rev=*) - newRevision="${arg#*=}" - ;; - --ignore-same-hash) - ignoreSameHash="true" - ;; - --print-changes) - printChanges="true" - ;; - --help) - usage - exit 0 - ;; - --*) - echo "$scriptName: Unknown argument: $arg" - usage - exit 1 - ;; - *) - args["${#args[*]}"]=$arg - ;; - esac -done - -attr=${args[0]} -newVersion=${args[1]} -newHash=${args[2]} -newUrl=${args[3]} - -# Third-party repositories might not accept arguments in their default.nix. -importTree="(let tree = import ./.; in if builtins.isFunction tree then tree {} else tree)" - -if (( "${#args[*]}" < 2 )); then - echo "$scriptName: Too few arguments" - usage - exit 1 -fi - -if (( "${#args[*]}" > 4 )); then - echo "$scriptName: Too many arguments" - usage - exit 1 -fi - -if [[ -z "$versionKey" ]]; then - versionKey=version -fi - -if [[ -z "$sourceKey" ]]; then - sourceKey=src -fi - -# Allow finding packages among flake outputs in repos using flake-compat. -pname=$(nix-instantiate $systemArg --eval --strict -A "$attr.name" || echo) -if [[ -z "$pname" ]]; then - if [[ -z "$system" ]]; then - system=$(nix-instantiate --eval -E 'builtins.currentSystem' | tr -d '"') - fi - - pname=$(nix-instantiate $systemArg --eval --strict -A "packages.$system.$attr.name" || echo) - if [[ -n "$pname" ]]; then - attr="packages.$system.$attr" - else - pname=$(nix-instantiate $systemArg --eval --strict -A "legacyPackages.$system.$attr.name" || echo) - if [[ -n "$pname" ]]; then - attr="legacyPackages.$system.$attr" - else - die "Could not find attribute '$attr'!" - fi - fi -fi - -if [[ -z "$nixFile" ]]; then - nixFile=$(nix-instantiate $systemArg --eval --strict -A "$attr.meta.position" | sed -re 's/^"(.*):[0-9]+"$/\1/') - if [[ ! -f "$nixFile" ]]; then - die "Couldn't evaluate '$attr.meta.position' to locate the .nix file!" - fi - - # flake-compat will return paths in the Nix store, we need to correct for that. - possiblyOutPath=$(nix-instantiate $systemArg --eval -E "with $importTree; outPath" 2>/dev/null | tr -d '"') - if [[ -n "$possiblyOutPath" ]]; then - outPathEscaped=$(echo "$possiblyOutPath" | sed 's#[$^*\\.[|]#\\&#g') - pwdEscaped=$(echo "$PWD" | sed 's#[$^*\\.[|]#\\&#g') - nixFile=$(echo "$nixFile" | sed "s|^$outPathEscaped|$pwdEscaped|") - fi -fi - -oldHashAlgo=$(nix-instantiate $systemArg --eval --strict -A "$attr.$sourceKey.drvAttrs.outputHashAlgo" | tr -d '"') -oldHash=$(nix-instantiate $systemArg --eval --strict -A "$attr.$sourceKey.drvAttrs.outputHash" | tr -d '"') - -if [[ -z "$oldHashAlgo" || -z "$oldHash" ]]; then - die "Couldn't evaluate old source hash from '$attr.$sourceKey'!" -fi - -if [[ $(grep --count "$oldHash" "$nixFile") != 1 ]]; then - die "Couldn't locate old source hash '$oldHash' (or it appeared more than once) in '$nixFile'!" -fi - -oldVersion=$(nix-instantiate $systemArg --eval -E "with $importTree; $attr.${versionKey} or (builtins.parseDrvName $attr.name).version" | tr -d '"') - -if [[ -z "$oldVersion" ]]; then - die "Couldn't find out the old version of '$attr'!" -fi - -if [[ "$oldVersion" = "$newVersion" ]]; then - echo "$scriptName: New version same as old version, nothing to do." >&2 - if [ -n "$printChanges" ]; then - printf '[]\n' - fi - exit 0 -fi - -if [[ -n "$newRevision" ]]; then - oldRevision=$(nix-instantiate $systemArg --eval -E "with $importTree; $attr.$sourceKey.rev" | tr -d '"') - if [[ -z "$oldRevision" ]]; then - die "Couldn't evaluate source revision from '$attr.$sourceKey'!" - fi -fi - -# Escape regex metacharacter that are allowed in store path names -oldVersionEscaped=$(echo "$oldVersion" | sed -re 's|[.+]|\\&|g') - -if [[ $(grep --count --extended-regexp "^\s*(let\b)?\s*$versionKey\s*=\s*\"$oldVersionEscaped\"" "$nixFile") = 1 ]]; then - pattern="/\b$versionKey\b\s*=/ s|\"$oldVersionEscaped\"|\"$newVersion\"|" -elif [[ $(grep --count --extended-regexp "^\s*(let\b)?\s*name\s*=\s*\"[^\"]+-$oldVersionEscaped\"" "$nixFile") = 1 ]]; then - pattern="/\bname\b\s*=/ s|-$oldVersionEscaped\"|-$newVersion\"|" -else - die "Couldn't figure out where out where to patch in new version in '$attr'!" -fi - -if [[ "$oldHash" =~ ^(sha256|sha512)[:-] ]]; then - # Handle the possible SRI-style hash attribute (in the form ${type}${separator}${hash}) - # True SRI uses dash as a separator and only supports base64, whereas Nix’s SRI-style format uses a colon and supports all the same encodings like regular hashes (16/32/64). - # To keep this program reasonably simple, we will upgrade Nix’s format to SRI. - oldHashAlgo="${BASH_REMATCH[1]}" - sri=true -elif [[ "$oldHashAlgo" = "null" ]]; then - # Some fetcher functions support SRI-style `hash` attribute in addition to legacy type-specific attributes. When `hash` is used `outputHashAlgo` is null so let’s complain when SRI-style hash value was not detected. - die "Unable to figure out hashing scheme from '$oldHash' in '$attr'!" -fi - -case "$oldHashAlgo" in - # Choose a temporary hash for given algorithm. - # Not using all-zeroes hash, since that is sometimes - # used for clean-up when updating multi-source packages. - # Created by hashing “update-source-version” string. - sha256) tempHash=AzH1rZFqEH8sovZZfJykvsEmCedEZWigQFHWHl6/PdE= ;; - sha512) tempHash=KFj9Fvco4AuCgLJIGRnVzyssRf7VGP2oi5CkH6ADvj75ow3am3h8pxefOgQlO+i33Q/BBnG/ST/F7B/0BvWHxw== ;; - *) die "Unhandled hash algorithm '$oldHashAlgo' in '$attr'!" ;; -esac - -if [[ -n "$sri" ]]; then - # SRI hashes only support base64 - # SRI hashes need to declare the hash type as part of the hash - tempHash="$(nix --extra-experimental-features nix-command hash to-sri --type "$oldHashAlgo" "$tempHash" 2>/dev/null \ - || nix to-sri --type "$oldHashAlgo" "$tempHash" 2>/dev/null)" \ - || die "Failed to convert hash to SRI representation!" -fi - -# Escape regex metacharacter that are allowed in hashes (+) -oldHashEscaped=$(echo "$oldHash" | sed -re 's|[+]|\\&|g') -tempHashEscaped=$(echo "$tempHash" | sed -re 's|[+]|\\&|g') - -# Replace new version -sed -i.cmp "$nixFile" -re "$pattern" -if cmp -s "$nixFile" "$nixFile.cmp"; then - die "Failed to replace version '$oldVersion' to '$newVersion' in '$attr'!" -fi - -# Replace new URL -if [[ -n "$newUrl" ]]; then - oldUrl=$(nix-instantiate $systemArg --eval -E "with $importTree; builtins.elemAt ($attr.$sourceKey.drvAttrs.urls or [ $attr.$sourceKey.url ]) 0" | tr -d '"') - if [[ -z "$oldUrl" ]]; then - die "Couldn't evaluate source url from '$attr.$sourceKey'!" - fi - - # Escape regex metacharacter that are allowed in store path names - oldUrlEscaped=$(echo "$oldUrl" | sed -re 's|[${}.+]|\\&|g') - - sed -i.cmp "$nixFile" -re "s|\"$oldUrlEscaped\"|\"$newUrl\"|" - if cmp -s "$nixFile" "$nixFile.cmp"; then - die "Failed to replace source URL '$oldUrl' to '$newUrl' in '$attr'!" - fi -fi - -sed -i.cmp "$nixFile" -re "s|\"$oldHashEscaped\"|\"$tempHash\"|" -if cmp -s "$nixFile" "$nixFile.cmp"; then - die "Failed to replace source hash of '$attr' to a temporary hash!" -fi - -# Replace new revision, if given -if [[ -n "$newRevision" ]]; then - sed -i.cmp "$nixFile" -re "s|\"$oldRevision\"|\"$newRevision\"|" - if cmp -s "$nixFile" "$nixFile.cmp"; then - die "Failed to replace source revision '$oldRevision' to '$newRevision' in '$attr'!" - fi -fi - -# If new hash not given on the command line, recalculate it ourselves. -if [[ -z "$newHash" ]]; then - nix-build $systemArg --no-out-link -A "$attr.$sourceKey" 2>"$attr.fetchlog" >/dev/null || true - # FIXME: use nix-build --hash here once https://github.com/NixOS/nix/issues/1172 is fixed - newHash=$( - sed '1,/hash mismatch in fixed-output derivation/d' "$attr.fetchlog" \ - | grep --perl-regexp --only-matching 'got: +.+[:-]\K.+' \ - || true # handled below - ) - - if [[ -n "$newHash" && -n "$sri" ]]; then - # nix-build preserves the hashing scheme so we can just convert the result to SRI using the old type - newHash="$(nix --extra-experimental-features nix-command hash to-sri --type "$oldHashAlgo" "$newHash" 2>/dev/null \ - || nix to-sri --type "$oldHashAlgo" "$newHash" 2>/dev/null)" \ - || die "Failed to convert hash to SRI representation!" - fi -fi - -if [[ -z "$newHash" ]]; then - cat "$attr.fetchlog" >&2 - die "Couldn't figure out new hash of '$attr.$sourceKey'!" -fi - -if [[ -z "${ignoreSameHash}" && "$oldVersion" != "$newVersion" && "$oldHash" = "$newHash" ]]; then - die "Both the old and new source hashes of '$attr.$sourceKey' were equivalent. Please fix the package's source URL to be dependent on '\${version}'!" -fi - -sed -i.cmp "$nixFile" -re "s|\"$tempHashEscaped\"|\"$newHash\"|" -if cmp -s "$nixFile" "$nixFile.cmp"; then - die "Failed to replace temporary source hash of '$attr' to the final source hash!" -fi - -rm -f "$nixFile.cmp" -rm -f "$attr.fetchlog" - -if [ -n "$printChanges" ]; then - printf '[{"attrPath":"%s","oldVersion":"%s","newVersion":"%s","files":["%s"]}]\n' "$attr" "$oldVersion" "$newVersion" "$nixFile" -fi diff --git a/pkgs/common-updater/unstable-updater.nix b/pkgs/common-updater/unstable-updater.nix deleted file mode 100644 index f8944222a8d..00000000000 --- a/pkgs/common-updater/unstable-updater.nix +++ /dev/null @@ -1,112 +0,0 @@ -{ lib -, writeShellScript -, coreutils -, git -, nix -, common-updater-scripts -}: - -# This is an updater for unstable packages that should always use the latest -# commit. -{ url ? null # The git url, if empty it will be set to src.gitRepoUrl -, branch ? null -, stableVersion ? false # Use version format according to RFC 107 (i.e. LAST_TAG+date=YYYY-MM-DD) -, tagPrefix ? "" # strip this prefix from a tag name when using stable version -}: - -let - updateScript = writeShellScript "unstable-update-script.sh" '' - set -ex - - url="" - branch="" - use_stable_version="" - tag_prefix="" - - while (( $# > 0 )); do - flag="$1" - shift 1 - case "$flag" in - --url=*) - url="''${flag#*=}" - ;; - --branch=*) - branch="''${flag#*=}" - ;; - --use-stable-version) - use_stable_version=1 - ;; - --tag-prefix=*) - tag_prefix="''${flag#*=}" - ;; - *) - echo "$0: unknown option ‘''${flag}’" - exit 1 - ;; - esac - done - - # By default we set url to src.gitRepoUrl - if [[ -z "$url" ]]; then - url="$(${nix}/bin/nix-instantiate $systemArg --eval -E \ - "with import ./. {}; $UPDATE_NIX_ATTR_PATH.src.gitRepoUrl" \ - | tr -d '"')" - fi - - # Get info about HEAD from a shallow git clone - tmpdir="$(${coreutils}/bin/mktemp -d)" - - cloneArgs=( - --bare - --depth=1 - ) - - if [[ -n "$branch" ]]; then - cloneArgs+=(--branch="$branch") - fi - - ${git}/bin/git clone "''${cloneArgs[@]}" "$url" "$tmpdir" - - pushd "$tmpdir" - commit_date="$(${git}/bin/git show -s --pretty='format:%cs')" - commit_sha="$(${git}/bin/git show -s --pretty='format:%H')" - if [[ -z "$use_stable_version" ]]; then - new_version="unstable-$commit_date" - else - depth=100 - while (( $depth < 10000 )); do - last_tag="$(${git}/bin/git describe --tags --abbrev=0 2> /dev/null || true)" - if [[ -n "$last_tag" ]]; then - break - fi - ${git}/bin/git fetch --depth="$depth" --tags - depth=$(( $depth * 2 )) - done - if [[ -z "$last_tag" ]]; then - echo "Cound not found a tag within last 10000 commits" > /dev/stderr - exit 1 - fi - if [[ -n "$tag_prefix" ]]; then - last_tag="''${last_tag#$tag_prefix}" - fi - new_version="$last_tag+date=$commit_date" - fi - popd - # ${coreutils}/bin/rm -rf "$tmpdir" - - # update the nix expression - ${common-updater-scripts}/bin/update-source-version \ - "$UPDATE_NIX_ATTR_PATH" \ - "$new_version" \ - --rev="$commit_sha" - ''; - -in [ - updateScript - "--url=${builtins.toString url}" -] ++ lib.optionals (branch != null) [ - "--branch=${branch}" -] ++ lib.optionals stableVersion [ - "--use-stable-version" - "--tag-prefix=${tagPrefix}" -] diff --git a/pkgs/servers/monitoring/kapacitor/default.nix b/pkgs/servers/monitoring/kapacitor/default.nix index 2435d570cbb..351998db326 100644 --- a/pkgs/servers/monitoring/kapacitor/default.nix +++ b/pkgs/servers/monitoring/kapacitor/default.nix @@ -2,7 +2,7 @@ buildGoPackage rec { pname = "kapacitor"; - version = "1.5.7"; + version = "1.6.6"; goPackagePath = "github.com/influxdata/kapacitor"; @@ -10,7 +10,7 @@ buildGoPackage rec { owner = "influxdata"; repo = "kapacitor"; rev = "v${version}"; - sha256 = "0lzx25d4y5d8rsddgnypfskcxa5qlwc294sdzmn8dlq995yphpac"; + sha256 = "sha256-ZvHoBa5kB5nCSExELnoV1xd53FE5u/hFaXgy5aMCazc="; }; meta = with lib; { diff --git a/pkgs/stdenv/adapters.nix b/pkgs/stdenv/adapters.nix deleted file mode 100644 index 0c5645e5a48..00000000000 --- a/pkgs/stdenv/adapters.nix +++ /dev/null @@ -1,251 +0,0 @@ -/* This file contains various functions that take a stdenv and return - a new stdenv with different behaviour, e.g. using a different C - compiler. */ - -{ lib, pkgs, config }: - -let - # N.B. Keep in sync with default arg for stdenv/generic. - defaultMkDerivationFromStdenv = import ./generic/make-derivation.nix { inherit lib config; }; - - # Low level function to help with overriding `mkDerivationFromStdenv`. One - # gives it the old stdenv arguments and a "continuation" function, and - # underneath the final stdenv argument it yields to the continuation to do - # whatever it wants with old `mkDerivation` (old `mkDerivationFromStdenv` - # applied to the *new, final* stdenv) provided for convenience. - withOldMkDerivation = stdenvSuperArgs: k: stdenvSelf: let - mkDerivationFromStdenv-super = stdenvSuperArgs.mkDerivationFromStdenv or defaultMkDerivationFromStdenv; - mkDerivationSuper = mkDerivationFromStdenv-super stdenvSelf; - in - k stdenvSelf mkDerivationSuper; - - # Wrap the original `mkDerivation` providing extra args to it. - extendMkDerivationArgs = old: f: withOldMkDerivation old (_: mkDerivationSuper: args: - (mkDerivationSuper args).overrideAttrs f); - - # Wrap the original `mkDerivation` transforming the result. - overrideMkDerivationResult = old: f: withOldMkDerivation old (_: mkDerivationSuper: args: - f (mkDerivationSuper args)); -in - -rec { - - - # Override the compiler in stdenv for specific packages. - overrideCC = stdenv: cc: stdenv.override { allowedRequisites = null; cc = cc; }; - - - # Add some arbitrary packages to buildInputs for specific packages. - # Used to override packages in stdenv like Make. Should not be used - # for other dependencies. - overrideInStdenv = stdenv: pkgs: - stdenv.override (prev: { allowedRequisites = null; extraBuildInputs = (prev.extraBuildInputs or []) ++ pkgs; }); - - - # Override the setup script of stdenv. Useful for testing new - # versions of the setup script without causing a rebuild of - # everything. - # - # Example: - # randomPkg = import ../bla { ... - # stdenv = overrideSetup stdenv ../stdenv/generic/setup-latest.sh; - # }; - overrideSetup = stdenv: setupScript: stdenv.override { inherit setupScript; }; - - - # Return a modified stdenv that tries to build statically linked - # binaries. - makeStaticBinaries = stdenv0: - stdenv0.override (old: { - mkDerivationFromStdenv = withOldMkDerivation old (stdenv: mkDerivationSuper: args: - if stdenv.hostPlatform.isDarwin - then throw "Cannot build fully static binaries on Darwin/macOS" - else (mkDerivationSuper args).overrideAttrs(finalAttrs: { - NIX_CFLAGS_LINK = toString (finalAttrs.NIX_CFLAGS_LINK or "") + " -static"; - } // lib.optionalAttrs (!(finalAttrs.dontAddStaticConfigureFlags or false)) { - configureFlags = (finalAttrs.configureFlags or []) ++ [ - "--disable-shared" # brrr... - ]; - })); - } // lib.optionalAttrs (stdenv0.hostPlatform.libc == "libc") { - extraBuildInputs = (old.extraBuildInputs or []) ++ [ - pkgs.glibc.static - ]; - }); - - - # Return a modified stdenv that builds static libraries instead of - # shared libraries. - makeStaticLibraries = stdenv: - stdenv.override (old: { - mkDerivationFromStdenv = extendMkDerivationArgs old (args: { - dontDisableStatic = true; - } // lib.optionalAttrs (!(args.dontAddStaticConfigureFlags or false)) { - configureFlags = (args.configureFlags or []) ++ [ - "--enable-static" - "--disable-shared" - ]; - cmakeFlags = (args.cmakeFlags or []) ++ [ "-DBUILD_SHARED_LIBS:BOOL=OFF" ]; - mesonFlags = (args.mesonFlags or []) ++ [ "-Ddefault_library=static" ]; - }); - }); - - # Best effort static binaries. Will still be linked to libSystem, - # but more portable than Nix store binaries. - makeStaticDarwin = stdenv: stdenv.override (old: { - # extraBuildInputs are dropped in cross.nix, but darwin still needs them - extraBuildInputs = [ pkgs.buildPackages.darwin.CF ]; - mkDerivationFromStdenv = extendMkDerivationArgs old (args: { - NIX_CFLAGS_LINK = toString (args.NIX_CFLAGS_LINK or "") - + lib.optionalString (stdenv.cc.isGNU or false) " -static-libgcc"; - nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ - (pkgs.buildPackages.makeSetupHook { - name = "darwin-portable-libSystem-hook"; - substitutions = { - libsystem = "${stdenv.cc.libc}/lib/libSystem.B.dylib"; - }; - } ./darwin/portable-libsystem.sh) - ]; - }); - }); - - # Puts all the other ones together - makeStatic = stdenv: lib.foldl (lib.flip lib.id) stdenv ( - lib.optional stdenv.hostPlatform.isDarwin makeStaticDarwin - - ++ [ makeStaticLibraries propagateBuildInputs ] - - # Apple does not provide a static version of libSystem or crt0.o - # So we can’t build static binaries without extensive hacks. - ++ lib.optional (!stdenv.hostPlatform.isDarwin) makeStaticBinaries - - # Glibc doesn’t come with static runtimes by default. - # ++ lib.optional (stdenv.hostPlatform.libc == "glibc") ((lib.flip overrideInStdenv) [ self.glibc.static ]) - ); - - - /* Modify a stdenv so that all buildInputs are implicitly propagated to - consuming derivations - */ - propagateBuildInputs = stdenv: - stdenv.override (old: { - mkDerivationFromStdenv = extendMkDerivationArgs old (args: { - propagatedBuildInputs = (args.propagatedBuildInputs or []) ++ (args.buildInputs or []); - buildInputs = []; - }); - }); - - - /* Modify a stdenv so that the specified attributes are added to - every derivation returned by its mkDerivation function. - - Example: - stdenvNoOptimise = - addAttrsToDerivation - { env.NIX_CFLAGS_COMPILE = "-O0"; } - stdenv; - */ - addAttrsToDerivation = extraAttrs: stdenv: stdenv.override (old: { - mkDerivationFromStdenv = extendMkDerivationArgs old (_: extraAttrs); - }); - - - /* Use the trace output to report all processed derivations with their - license name. - */ - traceDrvLicenses = stdenv: - stdenv.override (old: { - mkDerivationFromStdenv = overrideMkDerivationResult (pkg: - let - printDrvPath = val: let - drvPath = builtins.unsafeDiscardStringContext pkg.drvPath; - license = pkg.meta.license or null; - in - builtins.trace "@:drv:${toString drvPath}:${builtins.toString license}:@" val; - in pkg // { - outPath = printDrvPath pkg.outPath; - drvPath = printDrvPath pkg.drvPath; - }); - }); - - - /* Modify a stdenv so that it produces debug builds; that is, - binaries have debug info, and compiler optimisations are - disabled. */ - keepDebugInfo = stdenv: - stdenv.override (old: { - mkDerivationFromStdenv = extendMkDerivationArgs old (args: { - dontStrip = true; - env = (args.env or {}) // { NIX_CFLAGS_COMPILE = toString (args.env.NIX_CFLAGS_COMPILE or "") + " -ggdb -Og"; }; - }); - }); - - - /* Modify a stdenv so that it uses the Gold linker. */ - useGoldLinker = stdenv: - stdenv.override (old: { - mkDerivationFromStdenv = extendMkDerivationArgs old (args: { - NIX_CFLAGS_LINK = toString (args.NIX_CFLAGS_LINK or "") + " -fuse-ld=gold"; - }); - }); - - useMoldLinker = stdenv: let - bintools = stdenv.cc.bintools.override { - extraBuildCommands = '' - wrap ld.mold ${../build-support/bintools-wrapper/ld-wrapper.sh} ${pkgs.mold}/bin/ld.mold - wrap ld ${../build-support/bintools-wrapper/ld-wrapper.sh} ${pkgs.mold}/bin/ld.mold - ''; - }; - in stdenv.override (old: { - cc = stdenv.cc.override { - inherit bintools; - }; - allowedRequisites = - lib.mapNullable (rs: rs ++ [ bintools pkgs.mold (lib.getLib pkgs.mimalloc) (lib.getLib pkgs.openssl) ]) (stdenv.allowedRequisites or null); - # gcc >12.1.0 supports '-fuse-ld=mold' - # the wrap ld above in bintools supports gcc <12.1.0 and shouldn't harm >12.1.0 - # https://github.com/rui314/mold#how-to-use - } // lib.optionalAttrs (stdenv.cc.isClang || (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12")) { - mkDerivationFromStdenv = extendMkDerivationArgs old (args: { - NIX_CFLAGS_LINK = toString (args.NIX_CFLAGS_LINK or "") + " -fuse-ld=mold"; - }); - }); - - - /* Modify a stdenv so that it builds binaries optimized specifically - for the machine they are built on. - - WARNING: this breaks purity! */ - impureUseNativeOptimizations = stdenv: - stdenv.override (old: { - mkDerivationFromStdenv = extendMkDerivationArgs old (args: { - env = (args.env or {}) // { NIX_CFLAGS_COMPILE = toString (args.env.NIX_CFLAGS_COMPILE or "") + " -march=native"; }; - - NIX_ENFORCE_NO_NATIVE = false; - - preferLocalBuild = true; - allowSubstitutes = false; - }); - }); - - - /* Modify a stdenv so that it builds binaries with the specified list of - compilerFlags appended and passed to the compiler. - - This example would recompile every derivation on the system with - -funroll-loops and -O3 passed to each gcc invocation. - - Example: - nixpkgs.overlays = [ - (self: super: { - stdenv = super.withCFlags [ "-funroll-loops" "-O3" ] super.stdenv; - }) - ]; - */ - withCFlags = compilerFlags: stdenv: - stdenv.override (old: { - mkDerivationFromStdenv = extendMkDerivationArgs old (args: { - env = (args.env or {}) // { NIX_CFLAGS_COMPILE = toString (args.env.NIX_CFLAGS_COMPILE or "") + " ${toString compilerFlags}"; }; - }); - }); -} diff --git a/pkgs/stdenv/booter.nix b/pkgs/stdenv/booter.nix deleted file mode 100644 index f1d07e6461a..00000000000 --- a/pkgs/stdenv/booter.nix +++ /dev/null @@ -1,142 +0,0 @@ -# This file defines a single function for booting a package set from a list of -# stages. The exact mechanics of that function are defined below; here I -# (@Ericson2314) wish to describe the purpose of the abstraction. -# -# The first goal is consistency across stdenvs. Regardless of what this function -# does, by making every stdenv use it for bootstrapping we ensure that they all -# work in a similar way. [Before this abstraction, each stdenv was its own -# special snowflake due to different authors writing in different times.] -# -# The second goal is consistency across each stdenv's stage functions. By -# writing each stage it terms of the previous stage, commonalities between them -# are more easily observable. [Before, there usually was a big attribute set -# with each stage, and stages would access the previous stage by name.] -# -# The third goal is composition. Because each stage is written in terms of the -# previous, the list can be reordered or, more practically, extended with new -# stages. The latter is used for cross compiling and custom -# stdenvs. Additionally, certain options should by default apply only to the -# last stage, whatever it may be. By delaying the creation of stage package sets -# until the final fold, we prevent these options from inhibiting composition. -# -# The fourth and final goal is debugging. Normal packages should only source -# their dependencies from the current stage. But for the sake of debugging, it -# is nice that all packages still remain accessible. We make sure previous -# stages are kept around with a `stdenv.__bootPackges` attribute referring the -# previous stage. It is idiomatic that attributes prefixed with `__` come with -# special restrictions and should not be used under normal circumstances. -{ lib, allPackages }: - -# Type: -# [ pkgset -> (args to stage/default.nix) or ({ __raw = true; } // pkgs) ] -# -> pkgset -# -# In english: This takes a list of function from the previous stage pkgset and -# returns the final pkgset. Each of those functions returns, if `__raw` is -# undefined or false, args for this stage's pkgset (the most complex and -# important arg is the stdenv), or, if `__raw = true`, simply this stage's -# pkgset itself. -# -# The list takes stages in order, so the final stage is last in the list. In -# other words, this does a foldr not foldl. -stageFuns: let - - /* "dfold" a ternary function `op' between successive elements of `list' as if - it was a doubly-linked list with `lnul' and `rnul` base cases at either - end. In precise terms, `dfold op lnul rnul [x_0 x_1 x_2 ... x_n-1]` is the - same as - - let - f_-1 = lnul f_0; - f_0 = op f_-1 x_0 f_1; - f_1 = op f_0 x_1 f_2; - f_2 = op f_1 x_2 f_3; - ... - f_n = op f_n-1 x_n f_n+1; - f_n+1 = rnul f_n; - in - f_0 - */ - dfold = op: lnul: rnul: list: - let - len = builtins.length list; - go = pred: n: - if n == len - then rnul pred - else let - # Note the cycle -- call-by-need ensures finite fold. - cur = op pred (builtins.elemAt list n) succ; - succ = go cur (n + 1); - in cur; - lapp = lnul cur; - cur = go lapp 0; - in cur; - - # Take the list and disallow custom overrides in all but the final stage, - # and allow it in the final flag. Only defaults this boolean field if it - # isn't already set. - withAllowCustomOverrides = lib.lists.imap1 - (index: stageFun: prevStage: - # So true by default for only the first element because one - # 1-indexing. Since we reverse the list, this means this is true - # for the final stage. - { allowCustomOverrides = index == 1; } - // (stageFun prevStage)) - (lib.lists.reverseList stageFuns); - - # Adds the stdenv to the arguments, and sticks in it the previous stage for - # debugging purposes. - folder = nextStage: stageFun: prevStage: let - args = stageFun prevStage; - args' = args // { - stdenv = args.stdenv // { - # For debugging - __bootPackages = prevStage; - __hatPackages = nextStage; - }; - }; - thisStage = - if args.__raw or false - then args' - else allPackages ((builtins.removeAttrs args' ["selfBuild"]) // { - adjacentPackages = if args.selfBuild or true then null else rec { - pkgsBuildBuild = prevStage.buildPackages; - pkgsBuildHost = prevStage; - pkgsBuildTarget = - if args.stdenv.targetPlatform == args.stdenv.hostPlatform - then pkgsBuildHost - else assert args.stdenv.hostPlatform == args.stdenv.buildPlatform; thisStage; - pkgsHostHost = - if args.stdenv.hostPlatform == args.stdenv.targetPlatform - then thisStage - else assert args.stdenv.buildPlatform == args.stdenv.hostPlatform; pkgsBuildHost; - pkgsTargetTarget = nextStage; - }; - }); - in thisStage; - - # This is a hack for resolving cross-compiled compilers' run-time - # deps. (That is, compilers that are themselves cross-compiled, as - # opposed to used to cross-compile packages.) - postStage = buildPackages: { - __raw = true; - stdenv.cc = - if buildPackages.stdenv.hasCC - then - if buildPackages.stdenv.cc.isClang or false - # buildPackages.clang checks targetPackages.stdenv.cc (i. e. this - # attribute) to get a sense of the its set's default compiler and - # chooses between libc++ and libstdc++ based on that. If we hit this - # code here, we'll cause an infinite recursion. Since a set with - # clang as its default compiler always means libc++, we can infer this - # decision statically. - then buildPackages.llvmPackages.libcxxClang - else buildPackages.gcc - else - # This will blow up if anything uses it, but that's OK. The `if - # buildPackages.stdenv.cc.isClang then ... else ...` would blow up - # everything, so we make sure to avoid that. - buildPackages.stdenv.cc; - }; - -in dfold folder postStage (_: {}) withAllowCustomOverrides diff --git a/pkgs/stdenv/cross/default.nix b/pkgs/stdenv/cross/default.nix deleted file mode 100644 index bf410ec0a68..00000000000 --- a/pkgs/stdenv/cross/default.nix +++ /dev/null @@ -1,90 +0,0 @@ -{ lib -, localSystem, crossSystem, config, overlays, crossOverlays ? [] -}: - -let - bootStages = import ../. { - inherit lib localSystem overlays; - - crossSystem = localSystem; - crossOverlays = []; - - # Ignore custom stdenvs when cross compiling for compatability - config = builtins.removeAttrs config [ "replaceStdenv" ]; - }; - -in lib.init bootStages ++ [ - - # Regular native packages - (somePrevStage: lib.last bootStages somePrevStage // { - # It's OK to change the built-time dependencies - allowCustomOverrides = true; - }) - - # Build tool Packages - (vanillaPackages: { - inherit config overlays; - selfBuild = false; - stdenv = - assert vanillaPackages.stdenv.buildPlatform == localSystem; - assert vanillaPackages.stdenv.hostPlatform == localSystem; - assert vanillaPackages.stdenv.targetPlatform == localSystem; - vanillaPackages.stdenv.override { targetPlatform = crossSystem; }; - # It's OK to change the built-time dependencies - allowCustomOverrides = true; - }) - - # Run Packages - (buildPackages: let - adaptStdenv = - if crossSystem.isStatic - then buildPackages.stdenvAdapters.makeStatic - else lib.id; - in { - inherit config; - overlays = overlays ++ crossOverlays; - selfBuild = false; - stdenv = adaptStdenv (buildPackages.stdenv.override (old: rec { - buildPlatform = localSystem; - hostPlatform = crossSystem; - targetPlatform = crossSystem; - - # Prior overrides are surely not valid as packages built with this run on - # a different platform, and so are disabled. - overrides = _: _: {}; - extraBuildInputs = [ ] # Old ones run on wrong platform - ++ lib.optionals hostPlatform.isDarwin [ buildPackages.targetPackages.darwin.apple_sdk.frameworks.CoreFoundation ] - ; - allowedRequisites = null; - - hasCC = !targetPlatform.isGhcjs; - - cc = if crossSystem.useiOSPrebuilt or false - then buildPackages.darwin.iosSdkPkgs.clang - else if crossSystem.useAndroidPrebuilt or false - then buildPackages."androidndkPkgs_${crossSystem.ndkVer}".clang - else if targetPlatform.isGhcjs - # Need to use `throw` so tryEval for splicing works, ugh. Using - # `null` or skipping the attribute would cause an eval failure - # `tryEval` wouldn't catch, wrecking accessing previous stages - # when there is a C compiler and everything should be fine. - then throw "no C compiler provided for this platform" - else if crossSystem.isDarwin - then buildPackages.llvmPackages.libcxxClang - else if crossSystem.useLLVM or false - then buildPackages.llvmPackages.clangUseLLVM - else buildPackages.gcc; - - extraNativeBuildInputs = old.extraNativeBuildInputs - ++ lib.optionals - (hostPlatform.isLinux && !buildPlatform.isLinux) - [ buildPackages.patchelf ] - ++ lib.optional - (let f = p: !p.isx86 || builtins.elem p.libc [ "musl" "wasilibc" "relibc" ] || p.isiOS || p.isGenode; - in f hostPlatform && !(f buildPlatform) ) - buildPackages.updateAutotoolsGnuConfigScriptsHook - ; - })); - }) - -] diff --git a/pkgs/stdenv/custom/default.nix b/pkgs/stdenv/custom/default.nix deleted file mode 100644 index 4c7380118f7..00000000000 --- a/pkgs/stdenv/custom/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ lib -, localSystem, crossSystem, config, overlays, crossOverlays ? [] -}: - -assert crossSystem == localSystem; - -let - bootStages = import ../. { - inherit lib localSystem crossSystem overlays; - # Remove config.replaceStdenv to ensure termination. - config = builtins.removeAttrs config [ "replaceStdenv" ]; - }; - -in bootStages ++ [ - - # Additional stage, built using custom stdenv - (vanillaPackages: { - inherit config overlays; - stdenv = - assert vanillaPackages.hostPlatform == localSystem; - assert vanillaPackages.targetPlatform == localSystem; - config.replaceStdenv { pkgs = vanillaPackages; }; - }) - -] diff --git a/pkgs/stdenv/cygwin/all-buildinputs-as-runtimedep.sh b/pkgs/stdenv/cygwin/all-buildinputs-as-runtimedep.sh deleted file mode 100644 index 7cb6a58f180..00000000000 --- a/pkgs/stdenv/cygwin/all-buildinputs-as-runtimedep.sh +++ /dev/null @@ -1,16 +0,0 @@ -# On cygwin, automatic runtime dependency detection does not work -# because the binaries do not contain absolute references to store -# locations (yet) -postFixupHooks+=(_cygwinAllBuildInputsAsRuntimeDep) - -_cygwinAllBuildInputsAsRuntimeDep() { - if [ -n "$buildInputs" ]; then - mkdir -p "$out/nix-support" - echo "$buildInputs" >> "$out/nix-support/cygwin-buildinputs-as-runtime-deps" - fi - - if [ -n "$nativeBuildInputs" ]; then - mkdir -p "$out/nix-support" - echo "$nativeBuildInputs" >> "$out/nix-support/cygwin-buildinputs-as-runtime-deps" - fi -} diff --git a/pkgs/stdenv/cygwin/rebase-i686.sh b/pkgs/stdenv/cygwin/rebase-i686.sh deleted file mode 100644 index 6b8ec441ca7..00000000000 --- a/pkgs/stdenv/cygwin/rebase-i686.sh +++ /dev/null @@ -1,24 +0,0 @@ -fixupOutputHooks+=(_cygwinFixAutoImageBase) - -_cygwinFixAutoImageBase() { - if [ "${dontRebase-}" == 1 ] || [ ! -d "$prefix" ]; then - return - fi - find "$prefix" -name "*.dll" -type f | while read DLL; do - if [ -f /etc/rebasenix.nextbase ]; then - NEXTBASE="$(>16)+1)<<16)) - - echo "REBASE FIX: $DLL $BASE -> $NEXTBASE" - /bin/rebase -b $NEXTBASE $DLL - NEXTBASE="0x`printf %x $(($NEXTBASE+$SKIP))`" - - echo $NEXTBASE > /etc/rebasenix.nextbase - done -} diff --git a/pkgs/stdenv/cygwin/rebase-x86_64.sh b/pkgs/stdenv/cygwin/rebase-x86_64.sh deleted file mode 100644 index 6dccdc40c72..00000000000 --- a/pkgs/stdenv/cygwin/rebase-x86_64.sh +++ /dev/null @@ -1,24 +0,0 @@ -fixupOutputHooks+=(_cygwinFixAutoImageBase) - -_cygwinFixAutoImageBase() { - if [ "${dontRebase-}" == 1 ] || [ ! -d "$prefix" ]; then - return - fi - find "$prefix" -name "*.dll" -type f | while read DLL; do - if [ -f /etc/rebasenix.nextbase ]; then - NEXTBASE="$(>16)+1)<<16)) - - echo "REBASE FIX: $DLL $BASE -> $NEXTBASE" - /bin/rebase -b $NEXTBASE $DLL - NEXTBASE="0x`printf %x $(($NEXTBASE+$SKIP))`" - - echo $NEXTBASE > /etc/rebasenix.nextbase - done -} diff --git a/pkgs/stdenv/cygwin/wrap-exes-to-find-dlls.sh b/pkgs/stdenv/cygwin/wrap-exes-to-find-dlls.sh deleted file mode 100644 index d0da8c1b65c..00000000000 --- a/pkgs/stdenv/cygwin/wrap-exes-to-find-dlls.sh +++ /dev/null @@ -1,74 +0,0 @@ -postFixupHooks+=(_cygwinWrapExesToFindDlls) - -_cygwinWrapExesToFindDlls() { - find $out -type l | while read LINK; do - TARGET="$(readlink "${LINK}")" - - # fix all non .exe links that link explicitly to a .exe - if [[ ${TARGET} == *.exe ]] && [[ ${LINK} != *.exe ]]; then - mv "${LINK}" "${LINK}.exe" - LINK="${LINK}.exe" - fi - - # generate complementary filenames - if [[ ${LINK} == *.exe ]]; then - _LINK="${LINK%.exe}" - _TARGET="${TARGET%.exe}" - else - _LINK="${LINK}.exe" - _TARGET="${TARGET}.exe" - fi - - # check if sould create complementary link - DOLINK=1 - if [[ ${_TARGET} == *.exe ]]; then - # the canonical target has to be a .exe - CTARGET="$(readlink -f "${LINK}")" - if [[ ${CTARGET} != *.exe ]]; then - CTARGET="${CTARGET}.exe" - fi - - if [ ! -e "${CTARGET}" ]; then - unset DOLINK - fi - fi - - if [ -e "${_LINK}" ]; then - # complementary link seems to exist - # but could be cygwin smoke and mirrors - INO=$(stat -c%i "${LINK}") - _INO=$(stat -c%i "${_LINK}") - if [ "${INO}" -ne "${_INO}" ]; then - unset DOLINK - fi - fi - - # create complementary link - if [ -n "${DOLINK}" ]; then - ln -s "${_TARGET}" "${_LINK}.tmp" - mv "${_LINK}.tmp" "${_LINK}" - fi - done - - find $out -type f -name "*.exe" | while read EXE; do - WRAPPER="${EXE%.exe}" - if [ -e "${WRAPPER}" ]; then - # check if really exists or cygwin smoke and mirrors - INO=$(stat -c%i "${EXE}") - _INO=$(stat -c%i "${WRAPPER}") - if [ "${INO}" -ne "${_INO}" ]; then - continue - fi - fi - - mv "${EXE}" "${EXE}.tmp" - - cat >"${WRAPPER}" < { - url = "http://tarballs.nixos.org/stdenv-darwin/aarch64/20acd4c4f14040485f40e55c0a76c186aa8ca4f3/${file}"; - inherit (localSystem) system; - inherit sha256 executable; - }; in - { - sh = fetch { file = "sh"; sha256 = "17m3xrlbl99j3vm7rzz3ghb47094dyddrbvs2a6jalczvmx7spnj"; }; - bzip2 = fetch { file = "bzip2"; sha256 = "1khs8s5klf76plhlvlc1ma838r8pc1qigk9f5bdycwgbn0nx240q"; }; - mkdir = fetch { file = "mkdir"; sha256 = "1m9nk90paazl93v43myv2ay68c1arz39pqr7lk5ddbgb177hgg8a"; }; - cpio = fetch { file = "cpio"; sha256 = "17pxq61yjjvyd738fy9f392hc9cfzkl612sdr9rxr3v0dgvm8y09"; }; - tarball = fetch { file = "bootstrap-tools.cpio.bz2"; sha256 = "1v2332k33akm6mrm4bj749rxnnmc2pkbgcslmd0bbkf76bz2ildy"; executable = false; }; - } - else - let - fetch = { file, sha256, executable ? true }: import { - url = "http://tarballs.nixos.org/stdenv-darwin/x86_64/c253216595572930316f2be737dc288a1da22558/${file}"; - inherit (localSystem) system; - inherit sha256 executable; - }; in - { - sh = fetch { file = "sh"; sha256 = "sha256-igMAVEfumFv/LUNTGfNi2nSehgTNIP4Sg+f3L7u6SMA="; }; - bzip2 = fetch { file = "bzip2"; sha256 = "sha256-K3rhkJZipudT1Jgh+l41Y/fNsMkrPtiAsNRDha/lpZI="; }; - mkdir = fetch { file = "mkdir"; sha256 = "sha256-VddFELwLDJGNADKB1fWwWPBtIAlEUgJv2hXRmC4NEeM="; }; - cpio = fetch { file = "cpio"; sha256 = "sha256-SWkwvLaFyV44kLKL2nx720SvcL4ej/p2V/bX3uqAGO0="; }; - tarball = fetch { file = "bootstrap-tools.cpio.bz2"; sha256 = "sha256-kRC/bhCmlD4L7KAvJQgcukk7AinkMz4IwmG1rqlh5tA="; executable = false; }; - } -}: - -assert crossSystem == localSystem; - -let - inherit (localSystem) system; - - useAppleSDKLibs = localSystem.isAarch64; - haveKRB5 = localSystem.isx86_64; - - # final toolchain is injected into llvmPackages_${finalLlvmVersion} - finalLlvmVersion = lib.versions.major bootstrapLlvmVersion; - finalLlvmPackages = "llvmPackages_${finalLlvmVersion}"; - - commonImpureHostDeps = [ - "/bin/sh" - "/usr/lib/libSystem.B.dylib" - "/usr/lib/system/libunc.dylib" # This dependency is "hidden", so our scanning code doesn't pick it up - ]; - -in -rec { - commonPreHook = '' - export NIX_ENFORCE_NO_NATIVE=''${NIX_ENFORCE_NO_NATIVE-1} - export NIX_ENFORCE_PURITY=''${NIX_ENFORCE_PURITY-1} - export NIX_IGNORE_LD_THROUGH_GCC=1 - unset SDKROOT - - stripAllFlags=" " # the Darwin "strip" command doesn't know "-s" - stripDebugFlags="-S" # the Darwin "strip" command does something odd with "-p" - ''; - - bootstrapTools = derivation ({ - inherit system; - - name = "bootstrap-tools"; - builder = bootstrapFiles.sh; # Not a filename! Attribute 'sh' on bootstrapFiles - args = if localSystem.isAarch64 then [ ./unpack-bootstrap-tools-aarch64.sh ] else [ ./unpack-bootstrap-tools.sh ]; - - inherit (bootstrapFiles) mkdir bzip2 cpio tarball; - - __impureHostDeps = commonImpureHostDeps; - } // lib.optionalAttrs config.contentAddressedByDefault { - __contentAddressed = true; - outputHashAlgo = "sha256"; - outputHashMode = "recursive"; - }); - - stageFun = step: last: { shell ? "${bootstrapTools}/bin/bash" - , overrides ? (self: super: { }) - , extraPreHook ? "" - , extraNativeBuildInputs - , extraBuildInputs - , libcxx - , allowedRequisites ? null - }: - let - name = "bootstrap-stage${toString step}"; - - buildPackages = lib.optionalAttrs (last ? stdenv) { - inherit (last) stdenv; - }; - - doSign = localSystem.isAarch64 && last != null; - doUpdateAutoTools = localSystem.isAarch64 && last != null; - - mkExtraBuildCommands = cc: '' - rsrc="$out/resource-root" - mkdir "$rsrc" - ln -s "${cc.lib or cc}/lib/clang/${cc.version}/include" "$rsrc" - ln -s "${last.pkgs."${finalLlvmPackages}".compiler-rt.out}/lib" "$rsrc/lib" - echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags - ''; - - mkCC = overrides: import ../../build-support/cc-wrapper ( - let args = { - inherit lib shell; - inherit (last) stdenvNoCC; - - nativeTools = false; - nativeLibc = false; - inherit buildPackages libcxx; - inherit (last.pkgs) coreutils gnugrep; - bintools = last.pkgs.darwin.binutils; - libc = last.pkgs.darwin.Libsystem; - isClang = true; - cc = last.pkgs."${finalLlvmPackages}".clang-unwrapped; - }; in args // (overrides args) - ); - - cc = if last == null then "/dev/null" else - mkCC ({ cc, ... }: { - extraPackages = [ - last.pkgs."${finalLlvmPackages}".libcxxabi - last.pkgs."${finalLlvmPackages}".compiler-rt - ]; - extraBuildCommands = mkExtraBuildCommands cc; - }); - - ccNoLibcxx = if last == null then "/dev/null" else - mkCC ({ cc, ... }: { - libcxx = null; - extraPackages = [ - last.pkgs."${finalLlvmPackages}".compiler-rt - ]; - extraBuildCommands = '' - echo "-rtlib=compiler-rt" >> $out/nix-support/cc-cflags - echo "-B${last.pkgs."${finalLlvmPackages}".compiler-rt}/lib" >> $out/nix-support/cc-cflags - echo "-nostdlib++" >> $out/nix-support/cc-cflags - '' + mkExtraBuildCommands cc; - }); - - thisStdenv = import ../generic { - name = "${name}-stdenv-darwin"; - - inherit config shell extraBuildInputs; - - extraNativeBuildInputs = extraNativeBuildInputs ++ lib.optionals doUpdateAutoTools [ - last.pkgs.updateAutotoolsGnuConfigScriptsHook - last.pkgs.gnu-config - ]; - - allowedRequisites = if allowedRequisites == null then null else allowedRequisites ++ [ - cc.expand-response-params - cc.bintools - ] ++ lib.optionals doUpdateAutoTools [ - last.pkgs.updateAutotoolsGnuConfigScriptsHook - last.pkgs.gnu-config - ] ++ lib.optionals doSign [ - last.pkgs.darwin.postLinkSignHook - last.pkgs.darwin.sigtool - last.pkgs.darwin.signingUtils - ]; - - buildPlatform = localSystem; - hostPlatform = localSystem; - targetPlatform = localSystem; - - inherit cc; - - preHook = lib.optionalString (shell == "${bootstrapTools}/bin/bash") '' - # Don't patch #!/interpreter because it leads to retained - # dependencies on the bootstrapTools in the final stdenv. - dontPatchShebangs=1 - '' + '' - ${commonPreHook} - ${extraPreHook} - ''; - initialPath = [ bootstrapTools ]; - - fetchurlBoot = import ../../build-support/fetchurl { - inherit lib; - stdenvNoCC = stage0.stdenv; - curl = bootstrapTools; - }; - - # The stdenvs themselves don't use mkDerivation, so I need to specify this here - __stdenvImpureHostDeps = commonImpureHostDeps; - __extraImpureHostDeps = commonImpureHostDeps; - - overrides = self: super: (overrides self super) // { - inherit ccNoLibcxx; - fetchurl = thisStdenv.fetchurlBoot; - }; - }; - - in - { - inherit config overlays; - stdenv = thisStdenv; - }; - - stage0 = stageFun 0 null { - overrides = self: super: with stage0; { - coreutils = stdenv.mkDerivation { - name = "bootstrap-stage0-coreutils"; - buildCommand = '' - mkdir -p $out - ln -s ${bootstrapTools}/bin $out/bin - ''; - }; - - gnugrep = stdenv.mkDerivation { - name = "bootstrap-stage0-gnugrep"; - buildCommand = '' - mkdir -p $out - ln -s ${bootstrapTools}/bin $out/bin - ''; - }; - - pbzx = self.runCommandLocal "bootstrap-stage0-pbzx" { } '' - mkdir -p $out/bin - ln -s ${bootstrapTools}/bin/pbzx $out/bin - ''; - - cpio = self.runCommandLocal "bootstrap-stage0-cpio" { } '' - mkdir -p $out/bin - ln -s ${bootstrapFiles.cpio} $out/bin/cpio - ''; - - darwin = super.darwin.overrideScope (selfDarwin: superDarwin: { - darwin-stubs = superDarwin.darwin-stubs.override { inherit (self) stdenvNoCC fetchurl; }; - - dyld = { - name = "bootstrap-stage0-dyld"; - buildCommand = '' - mkdir -p $out - ln -s ${bootstrapTools}/lib $out/lib - ln -s ${bootstrapTools}/include $out/include - ''; - }; - - sigtool = self.runCommandLocal "bootstrap-stage0-sigtool" { } '' - mkdir -p $out/bin - ln -s ${bootstrapTools}/bin/sigtool $out/bin - ln -s ${bootstrapTools}/bin/codesign $out/bin - ''; - - print-reexports = self.runCommandLocal "bootstrap-stage0-print-reexports" { } '' - mkdir -p $out/bin - ln -s ${bootstrapTools}/bin/print-reexports $out/bin - ''; - - rewrite-tbd = self.runCommandLocal "bootstrap-stage0-rewrite-tbd" { } '' - mkdir -p $out/bin - ln -s ${bootstrapTools}/bin/rewrite-tbd $out/bin - ''; - - binutils-unwrapped = bootstrapTools // { - name = "bootstrap-stage0-binutils"; - }; - - cctools = bootstrapTools // { - name = "bootstrap-stage0-cctools"; - targetPrefix = ""; - }; - - binutils = lib.makeOverridable (import ../../build-support/bintools-wrapper) { - shell = "${bootstrapTools}/bin/bash"; - inherit lib; - inherit (self) stdenvNoCC; - - nativeTools = false; - nativeLibc = false; - inherit (self) buildPackages coreutils gnugrep; - libc = selfDarwin.Libsystem; - bintools = selfDarwin.binutils-unwrapped; - inherit (selfDarwin) postLinkSignHook signingUtils; - }; - } // lib.optionalAttrs (! useAppleSDKLibs) { - CF = stdenv.mkDerivation { - name = "bootstrap-stage0-CF"; - buildCommand = '' - mkdir -p $out/Library/Frameworks - ln -s ${bootstrapTools}/Library/Frameworks/CoreFoundation.framework $out/Library/Frameworks - ''; - }; - - Libsystem = stdenv.mkDerivation { - name = "bootstrap-stage0-Libsystem"; - buildCommand = '' - mkdir -p $out - - cp -r ${selfDarwin.darwin-stubs}/usr/lib $out/lib - chmod -R +w $out/lib - substituteInPlace $out/lib/libSystem.B.tbd --replace /usr/lib/system $out/lib/system - - ln -s libSystem.B.tbd $out/lib/libSystem.tbd - - for name in c dbm dl info m mx poll proc pthread rpcsvc util gcc_s.10.4 gcc_s.10.5; do - ln -s libSystem.tbd $out/lib/lib$name.tbd - done - - ln -s ${bootstrapTools}/lib/*.o $out/lib - - ln -s ${bootstrapTools}/lib/libresolv.9.dylib $out/lib - ln -s libresolv.9.dylib $out/lib/libresolv.dylib - - ln -s ${bootstrapTools}/include-Libsystem $out/include - ''; - }; - }); - - "${finalLlvmPackages}" = { - clang-unwrapped = stdenv.mkDerivation { - name = "bootstrap-stage0-clang"; - version = bootstrapLlvmVersion; - buildCommand = '' - mkdir -p $out/lib - ln -s ${bootstrapTools}/bin $out/bin - ln -s ${bootstrapTools}/lib/clang $out/lib/clang - ln -s ${bootstrapTools}/include $out/include - ''; - }; - - libcxx = stdenv.mkDerivation { - name = "bootstrap-stage0-libcxx"; - dontUnpack = true; - installPhase = '' - mkdir -p $out/lib $out/include - ln -s ${bootstrapTools}/lib/libc++.dylib $out/lib/libc++.dylib - ln -s ${bootstrapTools}/include/c++ $out/include/c++ - ''; - passthru = { - isLLVM = true; - cxxabi = self."${finalLlvmPackages}".libcxxabi; - }; - }; - - libcxxabi = stdenv.mkDerivation { - name = "bootstrap-stage0-libcxxabi"; - buildCommand = '' - mkdir -p $out/lib - ln -s ${bootstrapTools}/lib/libc++abi.dylib $out/lib/libc++abi.dylib - ''; - passthru = { - libName = "c++abi"; - }; - }; - - compiler-rt = stdenv.mkDerivation { - name = "bootstrap-stage0-compiler-rt"; - buildCommand = '' - mkdir -p $out/lib - ln -s ${bootstrapTools}/lib/libclang_rt* $out/lib - ln -s ${bootstrapTools}/lib/darwin $out/lib/darwin - ''; - }; - }; - }; - - extraNativeBuildInputs = [ ]; - extraBuildInputs = [ ]; - libcxx = null; - }; - - stage1 = prevStage: - let - persistent = self: super: with prevStage; { - cmake = super.cmakeMinimal; - - curl = super.curlMinimal; - - inherit pbzx cpio; - - python3 = super.python3Minimal; - - ninja = super.ninja.override { buildDocs = false; }; - - "${finalLlvmPackages}" = super."${finalLlvmPackages}" // ( - let - tools = super."${finalLlvmPackages}".tools.extend (_: _: { - inherit (pkgs."${finalLlvmPackages}") clang-unwrapped; - }); - libraries = super."${finalLlvmPackages}".libraries.extend (_: _: { - inherit (pkgs."${finalLlvmPackages}") compiler-rt libcxx libcxxabi; - }); - in - { inherit tools libraries; } // tools // libraries - ); - - darwin = super.darwin.overrideScope (selfDarwin: _: { - inherit (darwin) rewrite-tbd binutils-unwrapped; - - signingUtils = darwin.signingUtils.override { - inherit (selfDarwin) sigtool; - }; - - binutils = darwin.binutils.override { - coreutils = self.coreutils; - libc = selfDarwin.Libsystem; - inherit (selfDarwin) postLinkSignHook signingUtils; - }; - }); - }; - in - with prevStage; stageFun 1 prevStage { - extraPreHook = "export NIX_CFLAGS_COMPILE+=\" -F${bootstrapTools}/Library/Frameworks\""; - extraNativeBuildInputs = [ ]; - extraBuildInputs = [ pkgs.darwin.CF ]; - libcxx = pkgs."${finalLlvmPackages}".libcxx; - - allowedRequisites = - [ bootstrapTools ] ++ - (with pkgs; [ coreutils gnugrep ]) ++ - (with pkgs."${finalLlvmPackages}"; [ libcxx libcxxabi compiler-rt clang-unwrapped ]) ++ - (with pkgs.darwin; [ Libsystem CF ] ++ lib.optional useAppleSDKLibs objc4); - - overrides = persistent; - }; - - stage2 = prevStage: - let - persistent = self: super: with prevStage; { - inherit - zlib patchutils m4 scons flex perl bison unifdef unzip openssl python3 - libxml2 gettext sharutils gmp libarchive ncurses pkg-config libedit groff - openssh sqlite sed serf openldap db cyrus-sasl expat apr-util subversion xz - findfreetype libssh curl cmake autoconf automake libtool ed cpio coreutils - libssh2 nghttp2 libkrb5 ninja brotli libiconv; - - "${finalLlvmPackages}" = super."${finalLlvmPackages}" // ( - let - tools = super."${finalLlvmPackages}".tools.extend (_: _: { - inherit (pkgs."${finalLlvmPackages}") clang-unwrapped; - }); - libraries = super."${finalLlvmPackages}".libraries.extend (_: libSuper: { - inherit (pkgs."${finalLlvmPackages}") compiler-rt; - libcxx = libSuper.libcxx.override { - stdenv = overrideCC self.stdenv self.ccNoLibcxx; - }; - libcxxabi = libSuper.libcxxabi.override ({ - stdenv = overrideCC self.stdenv self.ccNoLibcxx; - } // lib.optionalAttrs (builtins.any (v: finalLlvmVersion == v) [ 7 11 12 13 ]) { - # TODO: the bootstrapping of llvm packages isn't consistent. - # `standalone` may be redundant if darwin behaves like useLLVM (or - # has useLLVM = true). - standalone = true; - }); - }); - in - { inherit tools libraries; } // tools // libraries - ); - - darwin = super.darwin.overrideScope (_: _: { - inherit (darwin) - binutils dyld Libsystem xnu configd ICU libdispatch libclosure - launchd CF objc4 darwin-stubs sigtool postLinkSignHook signingUtils; - }); - }; - in - with prevStage; stageFun 2 prevStage { - extraPreHook = '' - export PATH_LOCALE=${pkgs.darwin.locale}/share/locale - ''; - - extraNativeBuildInputs = [ pkgs.xz ]; - extraBuildInputs = [ pkgs.darwin.CF ]; - libcxx = pkgs."${finalLlvmPackages}".libcxx; - - allowedRequisites = - [ bootstrapTools ] ++ - (with pkgs; [ - xz.bin - xz.out - zlib - libxml2.out - curl.out - openssl.out - libssh2.out - nghttp2.lib - coreutils - gnugrep - pcre.out - gmp - libiconv - brotli.lib - file - ] ++ lib.optional haveKRB5 libkrb5) ++ - (with pkgs."${finalLlvmPackages}"; [ - libcxx - libcxxabi - compiler-rt - clang-unwrapped - ]) ++ - (with pkgs.darwin; [ dyld Libsystem CF ICU locale ] ++ lib.optional useAppleSDKLibs objc4); - - overrides = persistent; - }; - - stage3 = prevStage: - let - persistent = self: super: with prevStage; { - inherit - patchutils m4 scons flex perl bison unifdef unzip openssl python3 - gettext sharutils libarchive pkg-config groff bash subversion - openssh sqlite sed serf openldap db cyrus-sasl expat apr-util - findfreetype libssh curl cmake autoconf automake libtool cpio - libssh2 nghttp2 libkrb5 ninja; - - # Avoid pulling in a full python and its extra dependencies for the llvm/clang builds. - libxml2 = super.libxml2.override { pythonSupport = false; }; - - "${finalLlvmPackages}" = super."${finalLlvmPackages}" // ( - let - libraries = super."${finalLlvmPackages}".libraries.extend (_: _: { - inherit (pkgs."${finalLlvmPackages}") libcxx libcxxabi; - }); - in - { inherit libraries; } // libraries - ); - - darwin = super.darwin.overrideScope (_: _: { - inherit (darwin) - dyld Libsystem xnu configd libdispatch libclosure launchd libiconv - locale darwin-stubs sigtool; - }); - }; - in - with prevStage; stageFun 3 prevStage { - shell = "${pkgs.bash}/bin/bash"; - - # We have a valid shell here (this one has no bootstrap-tools runtime deps) so stageFun - # enables patchShebangs above. Unfortunately, patchShebangs ignores our $SHELL setting - # and instead goes by $PATH, which happens to contain bootstrapTools. So it goes and - # patches our shebangs back to point at bootstrapTools. This makes sure bash comes first. - extraNativeBuildInputs = with pkgs; [ xz ]; - extraBuildInputs = [ pkgs.darwin.CF pkgs.bash ]; - libcxx = pkgs."${finalLlvmPackages}".libcxx; - - extraPreHook = '' - export PATH=${pkgs.bash}/bin:$PATH - export PATH_LOCALE=${pkgs.darwin.locale}/share/locale - ''; - - allowedRequisites = - [ bootstrapTools ] ++ - (with pkgs; [ - xz.bin - xz.out - bash - zlib - libxml2.out - curl.out - openssl.out - libssh2.out - nghttp2.lib - coreutils - gnugrep - pcre.out - gmp - libiconv - brotli.lib - file - ] ++ lib.optional haveKRB5 libkrb5) ++ - (with pkgs."${finalLlvmPackages}"; [ - libcxx - libcxx.dev - libcxxabi - libcxxabi.dev - compiler-rt - clang-unwrapped - ]) ++ - (with pkgs.darwin; [ dyld ICU Libsystem locale ] ++ lib.optional useAppleSDKLibs objc4); - - overrides = persistent; - }; - - stage4 = prevStage: - let - persistent = self: super: with prevStage; { - inherit - gnumake gzip gnused bzip2 ed xz patch bash python3 - ncurses libffi zlib gmp pcre gnugrep cmake - coreutils findutils diffutils patchutils ninja libxml2; - - # Hack to make sure we don't link ncurses in bootstrap tools. The proper - # solution is to avoid passing -L/nix-store/...-bootstrap-tools/lib, - # quite a sledgehammer just to get the C runtime. - gettext = super.gettext.overrideAttrs (drv: { - configureFlags = drv.configureFlags ++ [ - "--disable-curses" - ]; - }); - - "${finalLlvmPackages}" = super."${finalLlvmPackages}" // ( - let - tools = super."${finalLlvmPackages}".tools.extend (llvmSelf: _: { - clang-unwrapped-all-outputs = pkgs."${finalLlvmPackages}".clang-unwrapped-all-outputs.override { llvm = llvmSelf.llvm; }; - libllvm = pkgs."${finalLlvmPackages}".libllvm.override { inherit libxml2; }; - }); - libraries = super."${finalLlvmPackages}".libraries.extend (llvmSelf: _: { - inherit (pkgs."${finalLlvmPackages}") libcxx libcxxabi compiler-rt; - }); - in - { inherit tools libraries; } // tools // libraries - ); - - darwin = super.darwin.overrideScope (_: superDarwin: { - inherit (darwin) dyld Libsystem libiconv locale darwin-stubs; - - # See useAppleSDKLibs in darwin-packages.nix - CF = if useAppleSDKLibs then super.darwin.CF else - superDarwin.CF.override { - inherit libxml2; - python3 = prevStage.python3; - }; - }); - }; - in - with prevStage; stageFun 4 prevStage { - shell = "${pkgs.bash}/bin/bash"; - extraNativeBuildInputs = with pkgs; [ xz ]; - extraBuildInputs = [ pkgs.darwin.CF pkgs.bash ]; - libcxx = pkgs."${finalLlvmPackages}".libcxx; - - extraPreHook = '' - export PATH_LOCALE=${pkgs.darwin.locale}/share/locale - ''; - overrides = persistent; - }; - - stdenvDarwin = prevStage: - let - doSign = localSystem.isAarch64; - pkgs = prevStage; - persistent = self: super: with prevStage; { - inherit - gnumake gzip gnused bzip2 gawk ed xz patch bash - ncurses libffi zlib gmp pcre gnugrep - coreutils findutils diffutils patchutils pbzx; - - darwin = super.darwin.overrideScope (_: _: { - inherit (darwin) dyld ICU Libsystem Csu libiconv rewrite-tbd; - } // lib.optionalAttrs (super.stdenv.targetPlatform == localSystem) { - inherit (darwin) binutils binutils-unwrapped cctools; - }); - } // lib.optionalAttrs (super.stdenv.targetPlatform == localSystem) { - inherit llvm; - - # Need to get rid of these when cross-compiling. - "${finalLlvmPackages}" = super."${finalLlvmPackages}" // ( - let - tools = super."${finalLlvmPackages}".tools.extend (_: super: { - inherit (pkgs."${finalLlvmPackages}") llvm clang-unwrapped; - }); - libraries = super."${finalLlvmPackages}".libraries.extend (_: _: { - inherit (pkgs."${finalLlvmPackages}") compiler-rt libcxx libcxxabi; - }); - in - { inherit tools libraries; } // tools // libraries - ); - - inherit binutils binutils-unwrapped; - }; - in - import ../generic rec { - name = "stdenv-darwin"; - - inherit config; - inherit (pkgs.stdenv) fetchurlBoot; - - buildPlatform = localSystem; - hostPlatform = localSystem; - targetPlatform = localSystem; - - preHook = commonPreHook + '' - export NIX_COREFOUNDATION_RPATH=${pkgs.darwin.CF}/Library/Frameworks - export PATH_LOCALE=${pkgs.darwin.locale}/share/locale - ''; - - __stdenvImpureHostDeps = commonImpureHostDeps; - __extraImpureHostDeps = commonImpureHostDeps; - - initialPath = import ../generic/common-path.nix { inherit pkgs; }; - shell = "${pkgs.bash}/bin/bash"; - - cc = pkgs."${finalLlvmPackages}".libcxxClang; - - extraNativeBuildInputs = lib.optionals localSystem.isAarch64 [ - pkgs.updateAutotoolsGnuConfigScriptsHook - ]; - - extraBuildInputs = [ pkgs.darwin.CF ]; - - extraAttrs = { - libc = pkgs.darwin.Libsystem; - shellPackage = pkgs.bash; - inherit bootstrapTools; - } // lib.optionalAttrs useAppleSDKLibs { - # This objc4 will be propagated to all builds using the final stdenv, - # and we shouldn't mix different builds, because they would be - # conflicting LLVM modules. Export it here so we can grab it later. - inherit (pkgs.darwin) objc4; - }; - - allowedRequisites = (with pkgs; [ - xz.out - xz.bin - gmp.out - gnumake - findutils - bzip2.out - bzip2.bin - zlib.out - zlib.dev - libffi.out - coreutils - ed - diffutils - gnutar - gzip - ncurses.out - ncurses.dev - ncurses.man - gnused - bash - gawk - gnugrep - patch - pcre.out - gettext - binutils.bintools - binutils.bintools.lib - darwin.binutils - darwin.binutils.bintools - curl.out - zstd.out - libidn2.out - libunistring.out - openssl.out - libssh2.out - nghttp2.lib - brotli.lib - cc.expand-response-params - libxml2.out - file - ] ++ lib.optional haveKRB5 libkrb5 - ++ lib.optionals localSystem.isAarch64 [ - pkgs.updateAutotoolsGnuConfigScriptsHook - pkgs.gnu-config - ]) - ++ (with pkgs."${finalLlvmPackages}"; [ - libcxx - libcxx.dev - libcxxabi - libcxxabi.dev - llvm - llvm.lib - compiler-rt - compiler-rt.dev - clang-unwrapped - libclang.dev - libclang.lib - ]) - ++ (with pkgs.darwin; [ - dyld - Libsystem - CF - cctools - ICU - libiconv - locale - libtapi - ] ++ lib.optional useAppleSDKLibs objc4 - ++ lib.optionals doSign [ postLinkSignHook sigtool signingUtils ]); - - overrides = lib.composeExtensions persistent (self: super: { - darwin = super.darwin.overrideScope (_: superDarwin: { - inherit (prevStage.darwin) CF darwin-stubs; - xnu = superDarwin.xnu.override { inherit (prevStage) python3; }; - }); - } // lib.optionalAttrs (super.stdenv.targetPlatform == localSystem) { - clang = cc; - llvmPackages = super.llvmPackages // { clang = cc; }; - inherit cc; - }); - }; - - stagesDarwin = [ - ({}: stage0) - stage1 - stage2 - stage3 - stage4 - (prevStage: { - inherit config overlays; - stdenv = stdenvDarwin prevStage; - }) - ]; -} diff --git a/pkgs/stdenv/darwin/fixed-xnu-python3.patch b/pkgs/stdenv/darwin/fixed-xnu-python3.patch deleted file mode 100644 index 9f29376187f..00000000000 --- a/pkgs/stdenv/darwin/fixed-xnu-python3.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff --git a/bsd/kern/makekdebugevents.py b/bsd/kern/makekdebugevents.py -index 73b2db4..d354ba0 100755 ---- a/bsd/kern/makekdebugevents.py -+++ b/bsd/kern/makekdebugevents.py -@@ -5,7 +5,7 @@ - # named kd_events[] or these mappings. - # Required to generate a header file used by DEVELOPMENT and DEBUG kernels. - # -- -+ - import sys - import re - -@@ -21,18 +21,18 @@ code_table = [] - # scan file to generate internal table - with open(trace_code_file, 'rt') as codes: - for line in codes: -- m = id_name_pattern.match(line) -- if m: -+ m = id_name_pattern.match(line) -+ if m: - code_table += [(int(m.group(1),base=16), m.group(2))] - - # emit typedef: --print "typedef struct {" --print " uint32_t id;" --print " const char *name;" --print "} kd_event_t;" -+print("typedef struct {") -+print(" uint32_t id;") -+print(" const char *name;") -+print("} kd_event_t;") - # emit structure declaration and sorted initialization: --print "kd_event_t kd_events[] = {" -+print("kd_event_t kd_events[] = {") - for mapping in sorted(code_table, key=lambda x: x[0]): -- print " {0x%x, \"%s\"}," % mapping --print "};" -+ print(" {0x%x, \"%s\"}," % mapping) -+print("};") - diff --git a/pkgs/stdenv/darwin/make-bootstrap-tools.nix b/pkgs/stdenv/darwin/make-bootstrap-tools.nix deleted file mode 100644 index 5433e7afecf..00000000000 --- a/pkgs/stdenv/darwin/make-bootstrap-tools.nix +++ /dev/null @@ -1,325 +0,0 @@ -{ pkgspath ? ../../.., test-pkgspath ? pkgspath -, localSystem ? { system = builtins.currentSystem; } -, crossSystem ? null -, bootstrapFiles ? null -}: - -let cross = if crossSystem != null - then { inherit crossSystem; } - else {}; - custom-bootstrap = if bootstrapFiles != null - then { stdenvStages = args: - let args' = args // { bootstrapFiles = bootstrapFiles; }; - in (import "${pkgspath}/pkgs/stdenv/darwin" args').stagesDarwin; - } - else {}; -in with import pkgspath ({ inherit localSystem; } // cross // custom-bootstrap); - -let - llvmPackages = llvmPackages_11; - storePrefixLen = builtins.stringLength builtins.storeDir; -in rec { - coreutils_ = coreutils.override (args: { - # We want coreutils without ACL support. - aclSupport = false; - # Cannot use a single binary build, or it gets dynamically linked against gmp. - singleBinary = false; - }); - - cctools_ = darwin.cctools; - - # Avoid debugging larger changes for now. - bzip2_ = bzip2.override (args: { linkStatic = true; }); - - # Avoid messing with libkrb5 and libnghttp2. - curl_ = curlMinimal.override (args: { gssSupport = false; http2Support = false; }); - - build = stdenv.mkDerivation { - name = "stdenv-bootstrap-tools"; - - nativeBuildInputs = [ nukeReferences dumpnar ]; - - buildCommand = '' - mkdir -p $out/bin $out/lib $out/lib/system $out/lib/darwin - - ${lib.optionalString stdenv.targetPlatform.isx86_64 '' - # Copy libSystem's .o files for various low-level boot stuff. - cp -d ${lib.getLib darwin.Libsystem}/lib/*.o $out/lib - - # Resolv is actually a link to another package, so let's copy it properly - cp -L ${lib.getLib darwin.Libsystem}/lib/libresolv.9.dylib $out/lib - ''} - - cp -rL ${darwin.Libsystem}/include $out - chmod -R u+w $out/include - cp -rL ${darwin.ICU}/include* $out/include - cp -rL ${libiconv}/include/* $out/include - cp -rL ${lib.getDev gnugrep.pcre}/include/* $out/include - mv $out/include $out/include-Libsystem - - # Copy coreutils, bash, etc. - cp ${coreutils_}/bin/* $out/bin - (cd $out/bin && rm vdir dir sha*sum pinky factor pathchk runcon shuf who whoami shred users) - - cp ${bash}/bin/bash $out/bin - ln -s bash $out/bin/sh - cp ${findutils}/bin/find $out/bin - cp ${findutils}/bin/xargs $out/bin - cp -d ${diffutils}/bin/* $out/bin - cp -d ${gnused}/bin/* $out/bin - cp -d ${gnugrep}/bin/grep $out/bin - cp ${gawk}/bin/gawk $out/bin - cp -d ${gawk}/bin/awk $out/bin - cp ${gnutar}/bin/tar $out/bin - cp ${gzip}/bin/.gzip-wrapped $out/bin/gzip - cp ${bzip2_.bin}/bin/bzip2 $out/bin - ln -s bzip2 $out/bin/bunzip2 - cp -d ${gnumake}/bin/* $out/bin - cp -d ${patch}/bin/* $out/bin - cp -d ${xz.bin}/bin/xz $out/bin - cp ${cpio}/bin/cpio $out/bin - - # This used to be in-nixpkgs, but now is in the bundle - # because I can't be bothered to make it partially static - cp ${curl_.bin}/bin/curl $out/bin - cp -d ${curl_.out}/lib/libcurl*.dylib $out/lib - cp -d ${libssh2.out}/lib/libssh*.dylib $out/lib - cp -d ${lib.getLib openssl}/lib/*.dylib $out/lib - - cp -d ${gnugrep.pcre.out}/lib/libpcre*.dylib $out/lib - cp -d ${lib.getLib libiconv}/lib/lib*.dylib $out/lib - cp -d ${lib.getLib gettext}/lib/libintl*.dylib $out/lib - chmod +x $out/lib/libintl*.dylib - cp -d ${ncurses.out}/lib/libncurses*.dylib $out/lib - cp -d ${libxml2.out}/lib/libxml2*.dylib $out/lib - - # Copy what we need of clang - cp -d ${llvmPackages.clang-unwrapped}/bin/clang* $out/bin - cp -rd ${lib.getLib llvmPackages.clang-unwrapped}/lib/* $out/lib - - cp -d ${lib.getLib llvmPackages.libcxx}/lib/libc++*.dylib $out/lib - cp -d ${lib.getLib llvmPackages.libcxxabi}/lib/libc++abi*.dylib $out/lib - cp -d ${lib.getLib llvmPackages.compiler-rt}/lib/darwin/libclang_rt* $out/lib/darwin - cp -d ${lib.getLib llvmPackages.compiler-rt}/lib/libclang_rt* $out/lib - cp -d ${lib.getLib llvmPackages.llvm.lib}/lib/libLLVM.dylib $out/lib - cp -d ${lib.getLib libffi}/lib/libffi*.dylib $out/lib - - mkdir $out/include - cp -rd ${llvmPackages.libcxx.dev}/include/c++ $out/include - - # copy .tbd assembly utils - cp -d ${pkgs.darwin.rewrite-tbd}/bin/rewrite-tbd $out/bin - cp -d ${lib.getLib pkgs.libyaml}/lib/libyaml*.dylib $out/lib - - # copy package extraction tools - cp -d ${pkgs.pbzx}/bin/pbzx $out/bin - cp -d ${lib.getLib pkgs.xar}/lib/libxar*.dylib $out/lib - cp -d ${pkgs.bzip2.out}/lib/libbz2*.dylib $out/lib - - # copy sigtool - cp -d ${pkgs.darwin.sigtool}/bin/sigtool $out/bin - cp -d ${pkgs.darwin.sigtool}/bin/codesign $out/bin - - cp -d ${lib.getLib darwin.ICU}/lib/libicu*.dylib $out/lib - cp -d ${zlib.out}/lib/libz.* $out/lib - cp -d ${gmpxx.out}/lib/libgmp*.* $out/lib - cp -d ${xz.out}/lib/liblzma*.* $out/lib - - # Copy binutils. - for i in as ld ar ranlib nm strip otool install_name_tool lipo codesign_allocate; do - cp ${cctools_}/bin/$i $out/bin - done - - cp -d ${lib.getLib darwin.libtapi}/lib/libtapi* $out/lib - - cp -rd ${pkgs.darwin.CF}/Library $out - ${lib.optionalString stdenv.targetPlatform.isAarch64 '' - cp -rd ${pkgs.darwin.libobjc}/lib/* $out/lib/ - ''} - - chmod -R u+w $out - - nuke-refs $out/bin/* - - rpathify() { - local libs=$(${stdenv.cc.targetPrefix}otool -L "$1" | tail -n +2 | grep -o "$NIX_STORE.*-\S*") || true - local newlib - for lib in $libs; do - ${stdenv.cc.targetPrefix}install_name_tool -change $lib "@rpath/$(basename "$lib")" "$1" - done - } - - # Strip executables even further - for i in $out/bin/*; do - if [[ ! -L $i ]]; then - chmod +w $i - ${stdenv.cc.targetPrefix}strip $i || true - fi - done - - for i in $out/bin/* $out/lib/*.dylib $out/lib/darwin/*.dylib; do - if [[ ! -L "$i" ]]; then - rpathify $i - fi - done - - for i in $out/bin/*; do - if [[ ! -L "$i" ]]; then - ${stdenv.cc.targetPrefix}install_name_tool -add_rpath '@executable_path/../lib' $i - fi - done - - ${if stdenv.targetPlatform.isx86_64 then '' - rpathify $out/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation - '' else '' - sed -i -e 's|/nix/store/.*/libobjc.A.dylib|@executable_path/../libobjc.A.dylib|g' \ - $out/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation.tbd - ''} - - nuke-refs $out/lib/* - nuke-refs $out/lib/system/* - nuke-refs $out/lib/darwin/* - ${lib.optionalString stdenv.targetPlatform.isx86_64 '' - nuke-refs $out/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation - ''} - - mkdir $out/.pack - mv $out/* $out/.pack - mv $out/.pack $out/pack - - mkdir $out/on-server - dumpnar $out/pack | ${xz}/bin/xz > $out/on-server/bootstrap-tools.nar.xz - ''; - - allowedReferences = []; - - meta = { - maintainers = [ lib.maintainers.copumpkin ]; - }; - }; - - dist = stdenv.mkDerivation { - name = "stdenv-bootstrap-tools"; - - buildCommand = '' - mkdir -p $out/nix-support - echo "file tools ${build}/on-server/bootstrap-tools.nar.xz" >> $out/nix-support/hydra-build-products - ''; - }; - - bootstrapLlvmVersion = llvmPackages.llvm.version; - - bootstrapFiles = { - tools = "${build}/pack"; - }; - - bootstrapTools = derivation { - inherit system; - - name = "bootstrap-tools"; - builder = "${bootstrapFiles.tools}/bin/bash"; - - # This is by necessity a near-duplicate of patch-bootstrap-tools.sh. If we refer to it directly, - # we can't make any changes to it due to our testing stdenv depending on it. Think of this as the - # patch-bootstrap-tools.sh for the next round of bootstrap tools. - args = [ ./patch-bootstrap-tools-next.sh ]; - - inherit (bootstrapFiles) tools; - - allowedReferences = [ "out" ]; - }; - - test = stdenv.mkDerivation { - name = "test"; - - realBuilder = "${bootstrapTools}/bin/bash"; - - tools = bootstrapTools; - buildCommand = '' - # Create a pure environment where we use just what's in the bootstrap tools. - export PATH=$tools/bin - - ls -l - mkdir $out - mkdir $out/bin - sed --version - find --version - diff --version - patch --version - make --version - awk --version - grep --version - clang --version - xz --version - - # The grep will return a nonzero exit code if there is no match, and we want to assert that we have - # an SSL-capable curl - curl --version | grep SSL - - # This approximates a bootstrap version of libSystem can that be - # assembled via fetchurl. Adapted from main libSystem expression. - mkdir libSystem-boot - cp -vr \ - ${stdenv.cc.libc_dev}/lib/libSystem.B.tbd \ - ${stdenv.cc.libc_dev}/lib/system \ - libSystem-boot - - substituteInPlace libSystem-boot/libSystem.B.tbd \ - --replace "/usr/lib/system/" "$PWD/libSystem-boot/system/" - ln -s libSystem.B.tbd libSystem-boot/libSystem.tbd - # End of bootstrap libSystem - - export flags="-idirafter $tools/include-Libsystem --sysroot=$tools -L$tools/lib -L$PWD/libSystem-boot" - - export CPP="clang -E $flags" - export CC="clang $flags -rpath $tools/lib" - export CXX="clang++ $flags --stdlib=libc++ -lc++abi -isystem$tools/include/c++/v1 -rpath $tools/lib" - - # NOTE: These tests do a separate 'install' step (using cp), because - # having clang write directly to the final location apparently will make - # running the executable fail signature verification. (SIGKILL'd) - # - # Suspect this is creating a corrupt entry in the kernel cache, but it is - # unique to cctools ld. (The problem goes away with `-fuse-ld=lld`.) - - echo '#include ' >> hello1.c - echo '#include ' >> hello1.c - echo '#include ' >> hello1.c - echo 'int main() { printf("Hello World\n"); return 0; }' >> hello1.c - $CC -o hello1 hello1.c - cp hello1 $out/bin/ - $out/bin/hello1 - - echo '#include ' >> hello2.c - echo 'int main() { CFShow(CFSTR("Hullo")); return 0; }' >> hello2.c - $CC -F$tools/Library/Frameworks -framework CoreFoundation -o hello2 hello2.c - cp hello2 $out/bin/ - $out/bin/hello2 - - echo '#include ' >> hello3.cc - echo 'int main() { std::cout << "Hello World\n"; }' >> hello3.cc - $CXX -v -o hello3 hello3.cc - cp hello3 $out/bin/ - $out/bin/hello3 - - tar xvf ${hello.src} - cd hello-* - # stdenv bootstrap tools ship a broken libiconv.dylib https://github.com/NixOS/nixpkgs/issues/158331 - am_cv_func_iconv=no ./configure --prefix=$out - make - make install - $out/bin/hello - ''; - }; - - # The ultimate test: bootstrap a whole stdenv from the tools specified above and get a package set out of it - test-pkgs = import test-pkgspath { - # if the bootstrap tools are for another platform, we should be testing - # that platform. - localSystem = if crossSystem != null then crossSystem else localSystem; - - stdenvStages = args: let - args' = args // { inherit bootstrapLlvmVersion bootstrapFiles; }; - in (import (test-pkgspath + "/pkgs/stdenv/darwin") args').stagesDarwin; - }; -} diff --git a/pkgs/stdenv/darwin/patch-bootstrap-tools-next.sh b/pkgs/stdenv/darwin/patch-bootstrap-tools-next.sh deleted file mode 100644 index a5b9edff7cd..00000000000 --- a/pkgs/stdenv/darwin/patch-bootstrap-tools-next.sh +++ /dev/null @@ -1,38 +0,0 @@ -set -euo pipefail - -export PATH=$tools/bin - -cp -R $tools $out -chmod -R u+w $out - -updateInstallName() { - local path="$1" - - cp "$path" "$path.new" - install_name_tool -id "$path" "$path.new" - codesign -f -i "$(basename "$path")" -s - "$path.new" - mv -f "$path.new" "$path" -} - -find $out/lib -type f -name '*.dylib' -print0 | while IFS= read -r -d $'\0' lib; do - updateInstallName "$lib" -done - -# Provide a gunzip script. -cat > $out/bin/gunzip < $out/bin/egrep -echo "exec $out/bin/grep -E \"\$@\"" >> $out/bin/egrep -echo "#! $out/bin/sh" > $out/bin/fgrep -echo "exec $out/bin/grep -F \"\$@\"" >> $out/bin/fgrep - -cat >$out/bin/dsymutil << EOF -#!$out/bin/sh -EOF - -chmod +x $out/bin/egrep $out/bin/fgrep $out/bin/dsymutil diff --git a/pkgs/stdenv/darwin/portable-libsystem.sh b/pkgs/stdenv/darwin/portable-libsystem.sh deleted file mode 100644 index f50ccc8d32e..00000000000 --- a/pkgs/stdenv/darwin/portable-libsystem.sh +++ /dev/null @@ -1,12 +0,0 @@ -# Make /nix/store/...-libSystem “portable” for static built binaries. -# This just rewrites everything in $1/bin to use the -# /usr/lib/libSystem.B.dylib that is provided on every macOS system. - -fixupOutputHooks+=('fixLibsystemRefs $prefix') - -fixLibsystemRefs() { - if [ -d "$1/bin" ]; then - find "$1/bin" -exec \ - install_name_tool -change @libsystem@ /usr/lib/libSystem.B.dylib {} \; - fi -} diff --git a/pkgs/stdenv/darwin/unpack-bootstrap-tools-aarch64.sh b/pkgs/stdenv/darwin/unpack-bootstrap-tools-aarch64.sh deleted file mode 100644 index 63b72972d71..00000000000 --- a/pkgs/stdenv/darwin/unpack-bootstrap-tools-aarch64.sh +++ /dev/null @@ -1,52 +0,0 @@ -set -euo pipefail - -# Unpack the bootstrap tools tarball. -echo Unpacking the bootstrap tools... -$mkdir $out -$bzip2 -d < $tarball | (cd $out && $cpio -i) - -export PATH=$out/bin - -# Fix codesign wrapper paths -sed -i \ - -e "1c\ -#!$out/bin/bash" \ - -e "s|[^( ]*\bsigtool\b|$out/bin/sigtool|g" \ - $out/bin/codesign - -updateInstallName() { - local path="$1" - - cp "$path" "$path.new" - install_name_tool -id "$path" "$path.new" - codesign -f -i "$(basename "$path")" -s - "$path.new" - mv -f "$path.new" "$path" -} - -find $out - -ln -s bash $out/bin/sh -ln -s bzip2 $out/bin/bunzip2 - -find $out/lib -type f -name '*.dylib' -print0 | while IFS= read -r -d $'\0' lib; do - updateInstallName "$lib" -done - -# Provide a gunzip script. -cat > $out/bin/gunzip < $out/bin/egrep -echo "exec $out/bin/grep -E \"\$@\"" >> $out/bin/egrep -echo "#! $out/bin/sh" > $out/bin/fgrep -echo "exec $out/bin/grep -F \"\$@\"" >> $out/bin/fgrep - -cat >$out/bin/dsymutil << EOF -#!$out/bin/sh -EOF - -chmod +x $out/bin/egrep $out/bin/fgrep $out/bin/dsymutil diff --git a/pkgs/stdenv/darwin/unpack-bootstrap-tools.sh b/pkgs/stdenv/darwin/unpack-bootstrap-tools.sh deleted file mode 100644 index 37beeaf28f9..00000000000 --- a/pkgs/stdenv/darwin/unpack-bootstrap-tools.sh +++ /dev/null @@ -1,54 +0,0 @@ -set -e - -# Unpack the bootstrap tools tarball. -echo Unpacking the bootstrap tools... -$mkdir $out -$bzip2 -d < $tarball | (cd $out && $cpio -i) - -# Set the ELF interpreter / RPATH in the bootstrap binaries. -echo Patching the tools... - -export PATH=$out/bin - -for i in $out/bin/*; do - if ! test -L $i; then - echo patching $i - install_name_tool -add_rpath $out/lib $i || true - fi -done - -for i in $out/lib/*.dylib $out/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation; do - if test ! -L "$i" -a "$i" != "$out/lib/libSystem*.dylib"; then - echo "Patching $i" - - id=$(otool -D "$i" | tail -n 1) - install_name_tool -id "$(dirname $i)/$(basename $id)" $i - - libs=$(otool -L "$i" | tail -n +2 | grep -v libSystem | cat) - if [ -n "$libs" ]; then - install_name_tool -add_rpath $out/lib $i - fi - fi -done - -ln -s bash $out/bin/sh -ln -s bzip2 $out/bin/bunzip2 - -# Provide a gunzip script. -cat > $out/bin/gunzip < $out/bin/egrep -echo "exec $out/bin/grep -E \"\$@\"" >> $out/bin/egrep -echo "#! $out/bin/sh" > $out/bin/fgrep -echo "exec $out/bin/grep -F \"\$@\"" >> $out/bin/fgrep - -cat >$out/bin/dsymutil << EOF -#!$out/bin/sh -EOF - -chmod +x $out/bin/egrep $out/bin/fgrep $out/bin/dsymutil diff --git a/pkgs/stdenv/default.nix b/pkgs/stdenv/default.nix deleted file mode 100644 index 7a2ad665e09..00000000000 --- a/pkgs/stdenv/default.nix +++ /dev/null @@ -1,49 +0,0 @@ -# This file chooses a sane default stdenv given the system, platform, etc. -# -# Rather than returning a stdenv, this returns a list of functions---one per -# each bootstrapping stage. See `./booter.nix` for exactly what this list should -# contain. - -{ # Args just for stdenvs' usage - lib - # Args to pass on to the pkgset builder, too -, localSystem, crossSystem, config, overlays, crossOverlays ? [] -} @ args: - -let - # The native (i.e., impure) build environment. This one uses the - # tools installed on the system outside of the Nix environment, - # i.e., the stuff in /bin, /usr/bin, etc. This environment should - # be used with care, since many Nix packages will not build properly - # with it (e.g., because they require GNU Make). - stagesNative = import ./native args; - - # The Nix build environment. - stagesNix = import ./nix (args // { bootStages = stagesNative; }); - - stagesFreeBSD = import ./freebsd args; - - # On Linux systems, the standard build environment consists of Nix-built - # instances glibc and the `standard' Unix tools, i.e., the Posix utilities, - # the GNU C compiler, and so on. - stagesLinux = import ./linux args; - - inherit (import ./darwin args) stagesDarwin; - - stagesCross = import ./cross args; - - stagesCustom = import ./custom args; - - # Select the appropriate stages for the platform `system'. -in - if crossSystem != localSystem || crossOverlays != [] then stagesCross - else if config ? replaceStdenv then stagesCustom - else if localSystem.isLinux then stagesLinux - else if localSystem.isDarwin then stagesDarwin - else # misc special cases - { # switch - x86_64-solaris = stagesNix; - i686-cygwin = stagesNative; - x86_64-cygwin = stagesNative; - x86_64-freebsd = stagesFreeBSD; - }.${localSystem.system} or stagesNative diff --git a/pkgs/stdenv/freebsd/default.nix b/pkgs/stdenv/freebsd/default.nix deleted file mode 100644 index de660858760..00000000000 --- a/pkgs/stdenv/freebsd/default.nix +++ /dev/null @@ -1,276 +0,0 @@ -{ lib -, localSystem, crossSystem, config, overlays, crossOverlays ? [] -}: - -assert crossSystem == localSystem; -let inherit (localSystem) system; - fetchURL = import ; - trivialBuilder = (import ./trivial-builder.nix); - make = trivialBuilder rec { - inherit (localSystem) system; - name = "make"; - ver = "4.3"; - url = "https://ftp.gnu.org/gnu/${name}/${name}-${ver}.tar.gz"; - sha256 = "06cfqzpqsvdnsxbysl5p2fgdgxgl9y4p7scpnrfa8z2zgkjdspz0"; - configureArgs = [ "--disable-nls" - "--without-libintl-prefix" - "--without-libiconv-prefix" - ]; - }; - bash = trivialBuilder rec { - inherit (localSystem) system; - name = "bash"; - ver = "4.4.18"; - url = "https://ftp.gnu.org/gnu/${name}/${name}-${ver}.tar.gz"; - sha256 = "08vz660768mnnax7n8d4d85jxafwdmsxsi7fh0hzvmafbvn9wkb0"; - configureArgs = [ "--disable-nls" - "--without-libintl-prefix" - "--without-libiconv-prefix" - ]; - }; - coreutils = trivialBuilder rec { - inherit (localSystem) system; - name = "coreutils"; - ver = "8.31"; - url = "https://ftp.gnu.org/gnu/${name}/${name}-${ver}.tar.xz"; - sha256 = "1zg9m79x1i2nifj4kb0waf9x3i5h6ydkypkjnbsb9rnwis8rqypz"; - configureArgs = [ "--disable-nls" - "--without-libintl-prefix" - "--without-libiconv-prefix" - "--without-gmp" - "--without-libpth-prefix" - ]; - }; - findutils = trivialBuilder rec { - inherit (localSystem) system; - name = "findutils"; - ver = "4.7.0"; - url = "https://ftp.gnu.org/gnu/${name}/${name}-${ver}.tar.xz"; - sha256 = "16kqz9yz98dasmj70jwf5py7jk558w96w0vgp3zf9xsqk3gzpzn5"; - configureArgs = [ "--disable-nls" - "--without-libintl-prefix" - "--without-libiconv-prefix" - "--without-gmp" - "--without-libpth-prefix" - ]; - }; - diffutils = trivialBuilder rec { - inherit (localSystem) system; - name = "diffutils"; - ver = "3.7"; - url = "https://ftp.gnu.org/gnu/${name}/${name}-${ver}.tar.xz"; - sha256 = "09isrg0isjinv8c535nxsi1s86wfdfzml80dbw41dj9x3hiad9xk"; - configureArgs = [ "--disable-nls" - "--without-libintl-prefix" - "--without-libiconv-prefix" - "--without-libsigsegv-prefix" - ]; - }; - grep = trivialBuilder rec { - inherit (localSystem) system; - name = "grep"; - ver = "3.4"; - url = "https://ftp.gnu.org/gnu/${name}/${name}-${ver}.tar.xz"; - sha256 = "1yy33kiwrxrwj2nxa4fg15bvmwyghqbs8qwkdvy5phm784f7brjq"; - configureArgs = [ "--disable-nls" - "--without-libintl-prefix" - "--without-libiconv-prefix" - "--disable-perl-regexp" - "--without-libsegsegv-prefix" - ]; - }; - patch = trivialBuilder rec { - inherit (localSystem) system; - name = "patch"; - ver = "2.7.6"; - url = "https://ftp.gnu.org/gnu/${name}/${name}-${ver}.tar.xz"; - sha256 = "1zfqy4rdcy279vwn2z1kbv19dcfw25d2aqy9nzvdkq5bjzd0nqdc"; - }; - gawk = trivialBuilder rec { - inherit (localSystem) system; - name = "gawk"; - ver = "5.0.1"; - url = "https://ftp.gnu.org/gnu/${name}/${name}-${ver}.tar.xz"; - sha256 = "15570p7g2x54asvr2fsc56sxzmm08fbk4mzpcs5n92fp9vq8cklf"; - configureArgs = [ "--disable-nls" - "--disable-mpfr" - "--without-libintl-prefix" - "--without-libiconv-prefix" - "--without-libsegsegv-prefix" - ]; - }; - cpio = trivialBuilder rec { - inherit (localSystem) system; - name = "cpio"; - ver = "2.13"; - url = "https://ftp.gnu.org/gnu/${name}/${name}-${ver}.tar.gz"; - sha256 = "126vyg4a8wcdwh6npgvxy6gq433bzgz3ph37hmjpycc4r7cp0x78"; - configureArgs = [ "--disable-nls" - "--without-libintl-prefix" - "--without-libiconv-prefix" - ]; - }; - sed = trivialBuilder rec { - inherit (localSystem) system; - name = "sed"; - ver = "4.8"; - url = "https://ftp.gnu.org/gnu/${name}/${name}-${ver}.tar.xz"; - sha256 = "0cznxw73fzv1n3nj2zsq6nf73rvsbxndp444xkpahdqvlzz0r6zp"; - configureArgs = [ "--disable-nls" - "--without-libintl-prefix" - "--without-libiconv-prefix" - ]; - }; - cacert = fetchURL rec { - url = "https://curl.haxx.se/ca/cacert-2020-01-01.pem"; - sha256 = "07q808n307gzaga93abpf6an7c3rd35p18psdc1dd83lspgp1xxd"; - executable = false; - }; - curl = trivialBuilder rec { - inherit (localSystem) system; - name = "curl"; - ver = "7.68.0"; - url = "https://curl.haxx.se/download/${name}-${ver}.tar.xz"; - sha256 = "0nh3j90w6b97wqcgxjfq55qhkz9s38955fbhwzv2fsi7483j895p"; - configureArgs = [ "--disable-nls" - "--disable-ares" - "--disable-debug" - "--disable-ldap" - "--disable-ldaps" - "--disable-rtsp" - "--disable-dict" - "--disable-telnet" - "--disable-tftp" - "--disable-pop3" - "--disable-imap" - "--disable-smb" - "--disable-smtp" - "--disable-gopher" - "--disable-manual" - "--disable-verbose" - "--disable-sspi" - "--disable-tls-srp" - "--disable-unix-sockets" - "--without-brotli" - "--without-gnutls" - "--without-mbedtls" - "--without-wolfssl" - "--without-bearssl" - "--without-libidn2" - "--without-librtmp" - "--without-nghttp2" - "--with-ssl=/usr" - "--with-ca-bundle=${cacert}" - ]; - }; - bashExe = "${bash}/bin/bash"; -in -[ - - ({}: { - __raw = true; - - bootstrapTools = derivation ({ - inherit system; - inherit make bash coreutils findutils - diffutils grep patch gawk cpio sed - curl; - - name = "trivial-bootstrap-tools"; - builder = bashExe; - args = [ ./trivial-bootstrap.sh ]; - buildInputs = [ make ]; - mkdir = "/bin/mkdir"; - ln = "/bin/ln"; - } // lib.optionalAttrs config.contentAddressedByDefault { - __contentAddressed = true; - outputHashAlgo = "sha256"; - outputHashMode = "recursive"; - }); - }) - - ({ bootstrapTools, ... }: rec { - __raw = true; - - inherit bootstrapTools; - - fetchurl = import ../../build-support/fetchurl { - inherit lib; - stdenvNoCC = stdenv; - curl = bootstrapTools; - }; - - stdenv = import ../generic { - name = "stdenv-freebsd-boot-1"; - buildPlatform = localSystem; - hostPlatform = localSystem; - targetPlatform = localSystem; - inherit config; - initialPath = [ "/" "/usr" ]; - shell = "${bootstrapTools}/bin/bash"; - fetchurlBoot = null; - cc = null; - overrides = self: super: { - }; - }; - }) - - (prevStage: { - __raw = true; - - inherit (prevStage) bootstrapTools; - - stdenv = import ../generic { - name = "stdenv-freebsd-boot-0"; - inherit config; - initialPath = [ prevStage.bootstrapTools ]; - inherit (prevStage.stdenv) - buildPlatform hostPlatform targetPlatform - shell; - fetchurlBoot = prevStage.fetchurl; - cc = null; - }; - }) - - (prevStage: { - inherit config overlays; - stdenv = import ../generic rec { - name = "stdenv-freebsd-boot-3"; - inherit config; - - inherit (prevStage.stdenv) - buildPlatform hostPlatform targetPlatform - initialPath shell fetchurlBoot; - - cc = lib.makeOverridable (import ../../build-support/cc-wrapper) { - inherit lib; - nativeTools = true; - nativePrefix = "/usr"; - nativeLibc = true; - stdenvNoCC = prevStage.stdenv; - buildPackages = { - inherit (prevStage) stdenv; - }; - cc = { - name = "clang-9.9.9"; - cc = "/usr"; - outPath = prevStage.bootstrapTools; - }; - isClang = true; - bintools = import ../../build-support/bintools-wrapper { - inherit lib; - stdenvNoCC = prevStage.stdenv; - nativeTools = true; - nativeLibc = true; - propagateDoc = false; - nativePrefix = "/usr"; - bintools = { name = "${name}-binutils"; - outPath = prevStage.bootstrapTools; }; - }; - }; - - preHook = "export NIX_NO_SELF_RPATH=1"; - }; - }) - -] diff --git a/pkgs/stdenv/freebsd/trivial-bootstrap.sh b/pkgs/stdenv/freebsd/trivial-bootstrap.sh deleted file mode 100644 index 34b4dbabc2b..00000000000 --- a/pkgs/stdenv/freebsd/trivial-bootstrap.sh +++ /dev/null @@ -1,118 +0,0 @@ -set -e -set -o nounset -set -o pipefail - -echo Building the trivial bootstrap environment... -#echo -#echo Needed FreeBSD packages: -#echo findutils gcpio gawk gnugrep coreutils bash gsed gtar gmake xar binutils gpatch lbzip2 diffutils - -$mkdir -p $out/bin - -ln () { - if [ ! -z "${2:-}" ]; then - if [ -f "$out/bin/$2" ]; then - echo "$2 exists" - exit 1 - fi - fi - if test ! -f "$1"; then - echo Target "$2" does not exist - exit 1 - fi - # TODO: check that destination directory exists - if [ ! -z "${2:-}" ]; then - $ln -s "$1" "$out/bin/$2" - else - $ln -s "$1" "$out/bin/" - fi -} - -ln $bash/bin/bash -ln $make/bin/make - -ln /bin/sh - -for i in b2sum base32 base64 basename basenc cat chcon chgrp chmod \ - chown chroot cksum comm cp csplit cut date dd df dir dircolors \ - dirname du echo env expand expr factor false fmt fold install \ - groups head hostid id join kill link ln logname ls md5sum mkdir \ - mkfifo mknod mktemp mv nice nl nohup nproc numfmt od paste pathchk \ - pinky pr printenv printf ptx pwd readlink realpath rm rmdir runcon \ - seq sha1sum sha224sum sha256sum sha384sum sha512sum shred shuf \ - sleep sort split stat stdbuf stty sum sync tac tee test timeout \ - touch tr true truncate tsort tty uname unexpand uniq unlink uptime \ - users vdir wc who whoami yes -do - ln "$coreutils/bin/$i" "$i" -done - -for i in find xargs; do - ln "$findutils/bin/$i" "$i" -done - -for i in diff diff3 sdiff; do - ln "$diffutils/bin/$i" "$i" -done - -for i in grep egrep fgrep; do - ln "$grep/bin/$i" "$i" -done - -ln /usr/bin/locale - -ln /usr/bin/more - -ln /usr/bin/hexdump # for bitcoin - -ln /usr/bin/bzip2 -ln /usr/bin/bunzip2 -ln /usr/bin/bzip2recover - -ln /usr/bin/xz -ln /usr/bin/unxz -ln /usr/bin/lzma -ln /usr/bin/unlzma - -ln /bin/ps -ln /bin/hostname -ln /usr/bin/cmp -ln $sed/bin/sed -ln /usr/bin/tar tar -ln $gawk/bin/gawk -ln $gawk/bin/gawk awk -ln $cpio/bin/cpio -ln $curl/bin/curl curl -ln /usr/bin/gzip -ln /usr/bin/gunzip -ln /usr/bin/tail tail # note that we are not using gtail!!! -ln /usr/bin/less less -ln $patch/bin/patch patch -ln /usr/bin/which which - -## binutils -# pkg info -l binutils | grep usr/local/bin -ln /usr/bin/addr2line -ln /usr/bin/ar -ln /usr/bin/as -ln /usr/bin/c++filt -#ln /usr/bin/dwp -#ln /usr/bin/elfedit -ln /usr/bin/gprof -ln /usr/bin/ld -#ln /usr/bin/ld.bfd -#ln /usr/bin/ld.gold -ln /usr/bin/nm -ln /usr/bin/objcopy -ln /usr/bin/objdump -ln /usr/bin/ranlib -ln /usr/bin/readelf -ln /usr/bin/size -ln /usr/bin/strings -ln /usr/bin/strip - -ln /usr/bin/cc -ln /usr/bin/cpp -ln /usr/bin/c++ - -#pkg info -l llvm37 | grep usr/local/bin diff --git a/pkgs/stdenv/freebsd/trivial-builder.nix b/pkgs/stdenv/freebsd/trivial-builder.nix deleted file mode 100644 index 64265081f54..00000000000 --- a/pkgs/stdenv/freebsd/trivial-builder.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ system, name, ver, url, sha256, configureArgs ? [], executable ? false } : - -let fetchURL = import ; - -in derivation { - inherit system configureArgs; - name = "trivial-bootstrap-${name}-${ver}"; - dname = "${name}-${ver}"; - src = fetchURL { - inherit url sha256 executable; - }; - builder = ./trivial-builder.sh; -} diff --git a/pkgs/stdenv/freebsd/trivial-builder.sh b/pkgs/stdenv/freebsd/trivial-builder.sh deleted file mode 100755 index ac5601b5ba0..00000000000 --- a/pkgs/stdenv/freebsd/trivial-builder.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -export PATH=/bin:/sbin:/usr/bin:/usr/sbin - -tar -zxvf $src -cd $dname -mkdir -p $out/bin -./configure --prefix=$out $configureArgs -make -make install diff --git a/pkgs/stdenv/generic/builder.sh b/pkgs/stdenv/generic/builder.sh deleted file mode 100644 index 2d8d784982a..00000000000 --- a/pkgs/stdenv/generic/builder.sh +++ /dev/null @@ -1,23 +0,0 @@ -export PATH= -for i in $initialPath; do - if [ "$i" = / ]; then i=; fi - PATH=$PATH${PATH:+:}$i/bin -done - -mkdir $out - -{ - echo "export SHELL=$shell" - echo "initialPath=\"$initialPath\"" - echo "defaultNativeBuildInputs=\"$defaultNativeBuildInputs\"" - echo "defaultBuildInputs=\"$defaultBuildInputs\"" - echo "$preHook" - cat "$setup" -} > "$out/setup" - -# Allow the user to install stdenv using nix-env and get the packages -# in stdenv. -mkdir $out/nix-support -if [ "$propagatedUserEnvPkgs" ]; then - printf '%s ' $propagatedUserEnvPkgs > $out/nix-support/propagated-user-env-packages -fi diff --git a/pkgs/stdenv/generic/check-meta.nix b/pkgs/stdenv/generic/check-meta.nix deleted file mode 100644 index 63fd00d266e..00000000000 --- a/pkgs/stdenv/generic/check-meta.nix +++ /dev/null @@ -1,456 +0,0 @@ -# Checks derivation meta and attrs for problems (like brokenness, -# licenses, etc). - -{ lib, config, hostPlatform }: - -let - # If we're in hydra, we can dispense with the more verbose error - # messages and make problems easier to spot. - inHydra = config.inHydra or false; - # Allow the user to opt-into additional warnings, e.g. - # import { config = { showDerivationWarnings = [ "maintainerless" ]; }; } - showWarnings = config.showDerivationWarnings; - - getName = attrs: attrs.name or ("${attrs.pname or "«name-missing»"}-${attrs.version or "«version-missing»"}"); - - allowUnfree = config.allowUnfree - || builtins.getEnv "NIXPKGS_ALLOW_UNFREE" == "1"; - - allowNonSource = let - envVar = builtins.getEnv "NIXPKGS_ALLOW_NONSOURCE"; - in if envVar != "" - then envVar != "0" - else config.allowNonSource or true; - - allowlist = config.allowlistedLicenses or config.whitelistedLicenses or []; - blocklist = config.blocklistedLicenses or config.blacklistedLicenses or []; - - areLicenseListsValid = - if lib.mutuallyExclusive allowlist blocklist then - true - else - throw "allowlistedLicenses and blocklistedLicenses are not mutually exclusive."; - - hasLicense = attrs: - attrs ? meta.license; - - hasAllowlistedLicense = assert areLicenseListsValid; attrs: - hasLicense attrs && lib.lists.any (l: builtins.elem l allowlist) (lib.lists.toList attrs.meta.license); - - hasBlocklistedLicense = assert areLicenseListsValid; attrs: - hasLicense attrs && lib.lists.any (l: builtins.elem l blocklist) (lib.lists.toList attrs.meta.license); - - allowBroken = config.allowBroken - || builtins.getEnv "NIXPKGS_ALLOW_BROKEN" == "1"; - - allowUnsupportedSystem = config.allowUnsupportedSystem - || builtins.getEnv "NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM" == "1"; - - isUnfree = licenses: lib.lists.any (l: !l.free or true) licenses; - - hasUnfreeLicense = attrs: - hasLicense attrs && - isUnfree (lib.lists.toList attrs.meta.license); - - hasNoMaintainers = attrs: - attrs ? meta.maintainers && (lib.length attrs.meta.maintainers) == 0; - - isMarkedBroken = attrs: attrs.meta.broken or false; - - hasUnsupportedPlatform = - pkg: !(lib.meta.availableOn hostPlatform pkg); - - isMarkedInsecure = attrs: (attrs.meta.knownVulnerabilities or []) != []; - - # Alow granular checks to allow only some unfree packages - # Example: - # {pkgs, ...}: - # { - # allowUnfree = false; - # allowUnfreePredicate = (x: pkgs.lib.hasPrefix "vscode" x.name); - # } - allowUnfreePredicate = config.allowUnfreePredicate or (x: false); - - # Check whether unfree packages are allowed and if not, whether the - # package has an unfree license and is not explicitly allowed by the - # `allowUnfreePredicate` function. - hasDeniedUnfreeLicense = attrs: - hasUnfreeLicense attrs && - !allowUnfree && - !allowUnfreePredicate attrs; - - allowInsecureDefaultPredicate = x: builtins.elem (getName x) (config.permittedInsecurePackages or []); - allowInsecurePredicate = x: (config.allowInsecurePredicate or allowInsecureDefaultPredicate) x; - - hasAllowedInsecure = attrs: - !(isMarkedInsecure attrs) || - allowInsecurePredicate attrs || - builtins.getEnv "NIXPKGS_ALLOW_INSECURE" == "1"; - - - isNonSource = sourceTypes: lib.lists.any (t: !t.isSource) sourceTypes; - - hasNonSourceProvenance = attrs: - (attrs ? meta.sourceProvenance) && - isNonSource attrs.meta.sourceProvenance; - - # Allow granular checks to allow only some non-source-built packages - # Example: - # { pkgs, ... }: - # { - # allowNonSource = false; - # allowNonSourcePredicate = with pkgs.lib.lists; pkg: !(any (p: !p.isSource && p != lib.sourceTypes.binaryFirmware) pkg.meta.sourceProvenance); - # } - allowNonSourcePredicate = config.allowNonSourcePredicate or (x: false); - - # Check whether non-source packages are allowed and if not, whether the - # package has non-source provenance and is not explicitly allowed by the - # `allowNonSourcePredicate` function. - hasDeniedNonSourceProvenance = attrs: - hasNonSourceProvenance attrs && - !allowNonSource && - !allowNonSourcePredicate attrs; - - showLicenseOrSourceType = value: toString (map (v: v.shortName or "unknown") (lib.lists.toList value)); - showLicense = showLicenseOrSourceType; - showSourceType = showLicenseOrSourceType; - - pos_str = meta: meta.position or "«unknown-file»"; - - remediation = { - unfree = remediate_allowlist "Unfree" (remediate_predicate "allowUnfreePredicate"); - non-source = remediate_allowlist "NonSource" (remediate_predicate "allowNonSourcePredicate"); - broken = remediate_allowlist "Broken" (x: ""); - unsupported = remediate_allowlist "UnsupportedSystem" (x: ""); - blocklisted = x: ""; - insecure = remediate_insecure; - broken-outputs = remediateOutputsToInstall; - unknown-meta = x: ""; - maintainerless = x: ""; - }; - remediation_env_var = allow_attr: { - Unfree = "NIXPKGS_ALLOW_UNFREE"; - Broken = "NIXPKGS_ALLOW_BROKEN"; - UnsupportedSystem = "NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM"; - NonSource = "NIXPKGS_ALLOW_NONSOURCE"; - }.${allow_attr}; - remediation_phrase = allow_attr: { - Unfree = "unfree packages"; - Broken = "broken packages"; - UnsupportedSystem = "packages that are unsupported for this system"; - NonSource = "packages not built from source"; - }.${allow_attr}; - remediate_predicate = predicateConfigAttr: attrs: - '' - - Alternatively you can configure a predicate to allow specific packages: - { nixpkgs.config.${predicateConfigAttr} = pkg: builtins.elem (lib.getName pkg) [ - "${lib.getName attrs}" - ]; - } - ''; - - # flakeNote will be printed in the remediation messages below. - flakeNote = " - Note: For `nix shell`, `nix build`, `nix develop` or any other Nix 2.4+ - (Flake) command, `--impure` must be passed in order to read this - environment variable. - "; - - remediate_allowlist = allow_attr: rebuild_amendment: attrs: - '' - a) To temporarily allow ${remediation_phrase allow_attr}, you can use an environment variable - for a single invocation of the nix tools. - - $ export ${remediation_env_var allow_attr}=1 - ${flakeNote} - b) For `nixos-rebuild` you can set - { nixpkgs.config.allow${allow_attr} = true; } - in configuration.nix to override this. - ${rebuild_amendment attrs} - c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add - { allow${allow_attr} = true; } - to ~/.config/nixpkgs/config.nix. - ''; - - remediate_insecure = attrs: - '' - - Known issues: - '' + (lib.concatStrings (map (issue: " - ${issue}\n") attrs.meta.knownVulnerabilities)) + '' - - You can install it anyway by allowing this package, using the - following methods: - - a) To temporarily allow all insecure packages, you can use an environment - variable for a single invocation of the nix tools: - - $ export NIXPKGS_ALLOW_INSECURE=1 - ${flakeNote} - b) for `nixos-rebuild` you can add ‘${getName attrs}’ to - `nixpkgs.config.permittedInsecurePackages` in the configuration.nix, - like so: - - { - nixpkgs.config.permittedInsecurePackages = [ - "${getName attrs}" - ]; - } - - c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add - ‘${getName attrs}’ to `permittedInsecurePackages` in - ~/.config/nixpkgs/config.nix, like so: - - { - permittedInsecurePackages = [ - "${getName attrs}" - ]; - } - - ''; - - remediateOutputsToInstall = attrs: let - expectedOutputs = attrs.meta.outputsToInstall or []; - actualOutputs = attrs.outputs or [ "out" ]; - missingOutputs = builtins.filter (output: ! builtins.elem output actualOutputs) expectedOutputs; - in '' - The package ${getName attrs} has set meta.outputsToInstall to: ${builtins.concatStringsSep ", " expectedOutputs} - - however ${getName attrs} only has the outputs: ${builtins.concatStringsSep ", " actualOutputs} - - and is missing the following ouputs: - - ${lib.concatStrings (builtins.map (output: " - ${output}\n") missingOutputs)} - ''; - - handleEvalIssue = { meta, attrs }: { reason , errormsg ? "" }: - let - msg = if inHydra - then "Failed to evaluate ${getName attrs}: «${reason}»: ${errormsg}" - else '' - Package ‘${getName attrs}’ in ${pos_str meta} ${errormsg}, refusing to evaluate. - - '' + (builtins.getAttr reason remediation) attrs; - - handler = if config ? handleEvalIssue - then config.handleEvalIssue reason - else throw; - in handler msg; - - handleEvalWarning = { meta, attrs }: { reason , errormsg ? "" }: - let - remediationMsg = (builtins.getAttr reason remediation) attrs; - msg = if inHydra then "Warning while evaluating ${getName attrs}: «${reason}»: ${errormsg}" - else "Package ${getName attrs} in ${pos_str meta} ${errormsg}, continuing anyway." - + (lib.optionalString (remediationMsg != "") "\n${remediationMsg}"); - isEnabled = lib.findFirst (x: x == reason) null showWarnings; - in if isEnabled != null then builtins.trace msg true else true; - - # Deep type-checking. Note that calling `type.check` is not enough: see `lib.mkOptionType`'s documentation. - # We don't include this in lib for now because this function is flawed: it accepts things like `mkIf true 42`. - typeCheck = type: value: let - merged = lib.mergeDefinitions [ ] type [ - { file = lib.unknownModule; inherit value; } - ]; - eval = builtins.tryEval (builtins.deepSeq merged.mergedValue null); - in eval.success; - - # TODO make this into a proper module and use the generic option documentation generation? - metaTypes = with lib.types; rec { - # These keys are documented - description = str; - mainProgram = str; - longDescription = str; - branch = str; - homepage = either (listOf str) str; - downloadPage = str; - changelog = either (listOf str) str; - license = let - licenseType = either (attrsOf anything) str; # TODO disallow `str` licenses, use a module - in either licenseType (listOf licenseType); - sourceProvenance = listOf lib.types.attrs; - maintainers = listOf (attrsOf anything); # TODO use the maintainer type from lib/tests/maintainer-module.nix - priority = int; - pkgConfigModules = listOf str; - platforms = listOf (either str (attrsOf anything)); # see lib.meta.platformMatch - hydraPlatforms = listOf str; - broken = bool; - unfree = bool; - unsupported = bool; - insecure = bool; - # TODO: refactor once something like Profpatsch's types-simple will land - # This is currently dead code due to https://github.com/NixOS/nix/issues/2532 - tests = attrsOf (mkOptionType { - name = "test"; - check = x: x == {} || ( # Accept {} for tests that are unsupported - isDerivation x && - x ? meta.timeout - ); - merge = lib.options.mergeOneOption; - }); - timeout = int; - - # Needed for Hydra to expose channel tarballs: - # https://github.com/NixOS/hydra/blob/53335323ae79ca1a42643f58e520b376898ce641/doc/manual/src/jobs.md#meta-fields - isHydraChannel = bool; - - # Weirder stuff that doesn't appear in the documentation? - maxSilent = int; - knownVulnerabilities = listOf str; - name = str; - version = str; - tag = str; - executables = listOf str; - outputsToInstall = listOf str; - position = str; - available = unspecified; - isBuildPythonPackage = platforms; - schedulingPriority = int; - isFcitxEngine = bool; - isIbusEngine = bool; - isGutenprint = bool; - badPlatforms = platforms; - }; - - checkMetaAttr = k: v: - if metaTypes?${k} then - if typeCheck metaTypes.${k} v then - null - else - "key 'meta.${k}' has invalid value; expected ${metaTypes.${k}.description}, got\n ${ - lib.generators.toPretty { indent = " "; } v - }" - else - "key 'meta.${k}' is unrecognized; expected one of: \n [${lib.concatMapStringsSep ", " (x: "'${x}'") (lib.attrNames metaTypes)}]"; - checkMeta = meta: lib.optionals config.checkMeta (lib.remove null (lib.mapAttrsToList checkMetaAttr meta)); - - checkOutputsToInstall = attrs: let - expectedOutputs = attrs.meta.outputsToInstall or []; - actualOutputs = attrs.outputs or [ "out" ]; - missingOutputs = builtins.filter (output: ! builtins.elem output actualOutputs) expectedOutputs; - in if config.checkMeta - then builtins.length missingOutputs > 0 - else false; - - # Check if a derivation is valid, that is whether it passes checks for - # e.g brokenness or license. - # - # Return { valid: "yes", "warn" or "no" } and additionally - # { reason: String; errormsg: String } if it is not valid, where - # reason is one of "unfree", "blocklisted", "broken", "insecure", ... - # !!! reason strings are hardcoded into OfBorg, make sure to keep them in sync - # Along with a boolean flag for each reason - checkValidity = attrs: - # Check meta attribute types first, to make sure it is always called even when there are other issues - # Note that this is not a full type check and functions below still need to by careful about their inputs! - let res = checkMeta (attrs.meta or {}); in if res != [] then - { valid = "no"; reason = "unknown-meta"; errormsg = "has an invalid meta attrset:${lib.concatMapStrings (x: "\n - " + x) res}\n"; - unfree = false; nonSource = false; broken = false; unsupported = false; insecure = false; - } - else { - unfree = hasUnfreeLicense attrs; - nonSource = hasNonSourceProvenance attrs; - broken = isMarkedBroken attrs; - unsupported = hasUnsupportedPlatform attrs; - insecure = isMarkedInsecure attrs; - } // ( - # --- Put checks that cannot be ignored here --- - if checkOutputsToInstall attrs then - { valid = "no"; reason = "broken-outputs"; errormsg = "has invalid meta.outputsToInstall"; } - - # --- Put checks that can be ignored here --- - else if hasDeniedUnfreeLicense attrs && !(hasAllowlistedLicense attrs) then - { valid = "no"; reason = "unfree"; errormsg = "has an unfree license (‘${showLicense attrs.meta.license}’)"; } - else if hasBlocklistedLicense attrs then - { valid = "no"; reason = "blocklisted"; errormsg = "has a blocklisted license (‘${showLicense attrs.meta.license}’)"; } - else if hasDeniedNonSourceProvenance attrs then - { valid = "no"; reason = "non-source"; errormsg = "contains elements not built from source (‘${showSourceType attrs.meta.sourceProvenance}’)"; } - else if !allowBroken && attrs.meta.broken or false then - { valid = "no"; reason = "broken"; errormsg = "is marked as broken"; } - else if !allowUnsupportedSystem && hasUnsupportedPlatform attrs then - let toPretty = lib.generators.toPretty { - allowPrettyValues = true; - indent = " "; - }; - in { valid = "no"; reason = "unsupported"; - errormsg = '' - is not available on the requested hostPlatform: - hostPlatform.config = "${hostPlatform.config}" - package.meta.platforms = ${toPretty (attrs.meta.platforms or [])} - package.meta.badPlatforms = ${toPretty (attrs.meta.badPlatforms or [])} - ''; - } - else if !(hasAllowedInsecure attrs) then - { valid = "no"; reason = "insecure"; errormsg = "is marked as insecure"; } - - # --- warnings --- - # Please also update the type in /pkgs/top-level/config.nix alongside this. - else if hasNoMaintainers attrs then - { valid = "warn"; reason = "maintainerless"; errormsg = "has no maintainers"; } - # ----- - else { valid = "yes"; }); - - - # The meta attribute is passed in the resulting attribute set, - # but it's not part of the actual derivation, i.e., it's not - # passed to the builder and is not a dependency. But since we - # include it in the result, it *is* available to nix-env for queries. - # Example: - # meta = checkMeta.commonMeta { inherit validity attrs pos references; }; - # validity = checkMeta.assertValidity { inherit meta attrs; }; - commonMeta = { validity, attrs, pos ? null, references ? [ ] }: - let - outputs = attrs.outputs or [ "out" ]; - in - { - # `name` derivation attribute includes cross-compilation cruft, - # is under assert, and is sanitized. - # Let's have a clean always accessible version here. - name = attrs.name or "${attrs.pname}-${attrs.version}"; - - # If the packager hasn't specified `outputsToInstall`, choose a default, - # which is the name of `p.bin or p.out or p` along with `p.man` when - # present. - # - # If the packager has specified it, it will be overridden below in - # `// meta`. - # - # Note: This default probably shouldn't be globally configurable. - # Services and users should specify outputs explicitly, - # unless they are comfortable with this default. - outputsToInstall = - let - hasOutput = out: builtins.elem out outputs; - in - [ (lib.findFirst hasOutput null ([ "bin" "out" ] ++ outputs)) ] - ++ lib.optional (hasOutput "man") "man"; - } - // attrs.meta or { } - # Fill `meta.position` to identify the source location of the package. - // lib.optionalAttrs (pos != null) { - position = pos.file + ":" + toString pos.line; - } // { - # Expose the result of the checks for everyone to see. - inherit (validity) unfree broken unsupported insecure; - - available = validity.valid != "no" - && (if config.checkMetaRecursively or false - then lib.all (d: d.meta.available or true) references - else true); - }; - - assertValidity = { meta, attrs }: let - validity = checkValidity attrs; - in validity // { - # Throw an error if trying to evaluate a non-valid derivation - # or, alternatively, just output a warning message. - handled = - { - no = handleEvalIssue { inherit meta attrs; } { inherit (validity) reason errormsg; }; - warn = handleEvalWarning { inherit meta attrs; } { inherit (validity) reason errormsg; }; - yes = true; - }.${validity.valid}; - - }; - -in { inherit assertValidity commonMeta; } diff --git a/pkgs/stdenv/generic/common-path.nix b/pkgs/stdenv/generic/common-path.nix deleted file mode 100644 index 8c1acfb50dd..00000000000 --- a/pkgs/stdenv/generic/common-path.nix +++ /dev/null @@ -1,23 +0,0 @@ -{pkgs}: [ - pkgs.coreutils - pkgs.findutils - pkgs.diffutils - pkgs.gnused - pkgs.gnugrep - pkgs.gawk - pkgs.gnutar - pkgs.gzip - pkgs.bzip2.bin - pkgs.gnumake - pkgs.bash - pkgs.patch - pkgs.xz.bin - - # The `file` command is added here because an enormous number of - # packages have a vendored dependency upon `file` in their - # `./configure` script, due to libtool<=2.4.6, or due to - # libtool>=2.4.7 in which the package author decided to set FILECMD - # when running libtoolize. In fact, file-5.4.6 *depends on itself* - # and tries to invoke `file` from its own ./configure script. - pkgs.file -] diff --git a/pkgs/stdenv/generic/default-builder.sh b/pkgs/stdenv/generic/default-builder.sh deleted file mode 100644 index 8c6fec7873b..00000000000 --- a/pkgs/stdenv/generic/default-builder.sh +++ /dev/null @@ -1,6 +0,0 @@ -if [ -f .attrs.sh ]; then - . .attrs.sh -fi - -source $stdenv/setup -genericBuild diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix deleted file mode 100644 index cf194be92bd..00000000000 --- a/pkgs/stdenv/generic/default.nix +++ /dev/null @@ -1,183 +0,0 @@ -let lib = import ../../../lib; stdenv-overridable = lib.makeOverridable ( - -argsStdenv@{ name ? "stdenv", preHook ? "", initialPath - -, # If we don't have a C compiler, we might either have `cc = null` or `cc = - # throw ...`, but if we do have a C compiler we should definiely have `cc != - # null`. - # - # TODO(@Ericson2314): Add assert without creating infinite recursion - hasCC ? cc != null, cc - -, shell -, allowedRequisites ? null, extraAttrs ? {}, overrides ? (self: super: {}), config -, disallowedRequisites ? [] - -, # The `fetchurl' to use for downloading curl and its dependencies - # (see all-packages.nix). - fetchurlBoot - -, setupScript ? ./setup.sh - -, extraNativeBuildInputs ? [] -, extraBuildInputs ? [] -, __stdenvImpureHostDeps ? [] -, __extraImpureHostDeps ? [] -, stdenvSandboxProfile ? "" -, extraSandboxProfile ? "" - - ## Platform parameters - ## - ## The "build" "host" "target" terminology below comes from GNU Autotools. See - ## its documentation for more information on what those words mean. Note that - ## each should always be defined, even when not cross compiling. - ## - ## For purposes of bootstrapping, think of each stage as a "sliding window" - ## over a list of platforms. Specifically, the host platform of the previous - ## stage becomes the build platform of the current one, and likewise the - ## target platform of the previous stage becomes the host platform of the - ## current one. - ## - -, # The platform on which packages are built. Consists of `system`, a - # string (e.g.,`i686-linux') identifying the most import attributes of the - # build platform, and `platform` a set of other details. - buildPlatform - -, # The platform on which packages run. - hostPlatform - -, # The platform which build tools (especially compilers) build for in this stage, - targetPlatform - -, # The implementation of `mkDerivation`, parameterized with the final stdenv so we can tie the knot. - # This is convient to have as a parameter so the stdenv "adapters" work better - mkDerivationFromStdenv ? import ./make-derivation.nix { inherit lib config; } -}: - -let - defaultNativeBuildInputs = extraNativeBuildInputs ++ - [ - ../../build-support/setup-hooks/audit-tmpdir.sh - ../../build-support/setup-hooks/compress-man-pages.sh - ../../build-support/setup-hooks/make-symlinks-relative.sh - ../../build-support/setup-hooks/move-docs.sh - ../../build-support/setup-hooks/move-lib64.sh - ../../build-support/setup-hooks/move-sbin.sh - ../../build-support/setup-hooks/move-systemd-user-units.sh - ../../build-support/setup-hooks/multiple-outputs.sh - ../../build-support/setup-hooks/patch-shebangs.sh - ../../build-support/setup-hooks/prune-libtool-files.sh - ../../build-support/setup-hooks/reproducible-builds.sh - ../../build-support/setup-hooks/set-source-date-epoch-to-latest.sh - ../../build-support/setup-hooks/strip.sh - ] ++ lib.optionals hasCC [ cc ]; - - defaultBuildInputs = extraBuildInputs; - - stdenv = (stdenv-overridable argsStdenv); - - # The stdenv that we are producing. - in - derivation ( - lib.optionalAttrs (allowedRequisites != null) { - allowedRequisites = allowedRequisites - ++ defaultNativeBuildInputs ++ defaultBuildInputs; - } - // lib.optionalAttrs config.contentAddressedByDefault { - __contentAddressed = true; - outputHashAlgo = "sha256"; - outputHashMode = "recursive"; - } - // { - inherit name; - inherit disallowedRequisites; - - # Nix itself uses the `system` field of a derivation to decide where to - # build it. This is a bit confusing for cross compilation. - inherit (buildPlatform) system; - - builder = shell; - - args = ["-e" ./builder.sh]; - - setup = setupScript; - - # We pretty much never need rpaths on Darwin, since all library path references - # are absolute unless we go out of our way to make them relative (like with CF) - # TODO: This really wants to be in stdenv/darwin but we don't have hostPlatform - # there (yet?) so it goes here until then. - preHook = preHook + lib.optionalString buildPlatform.isDarwin '' - export NIX_DONT_SET_RPATH_FOR_BUILD=1 - '' + lib.optionalString (hostPlatform.isDarwin || (hostPlatform.parsed.kernel.execFormat != lib.systems.parse.execFormats.elf && hostPlatform.parsed.kernel.execFormat != lib.systems.parse.execFormats.macho)) '' - export NIX_DONT_SET_RPATH=1 - export NIX_NO_SELF_RPATH=1 - '' + lib.optionalString (hostPlatform.isDarwin && hostPlatform.isMacOS) '' - export MACOSX_DEPLOYMENT_TARGET=${hostPlatform.darwinMinVersion} - '' - # TODO this should be uncommented, but it causes stupid mass rebuilds. I - # think the best solution would just be to fixup linux RPATHs so we don't - # need to set `-rpath` anywhere. - # + lib.optionalString targetPlatform.isDarwin '' - # export NIX_DONT_SET_RPATH_FOR_TARGET=1 - # '' - ; - - inherit initialPath shell - defaultNativeBuildInputs defaultBuildInputs; - } - // lib.optionalAttrs buildPlatform.isDarwin { - __sandboxProfile = stdenvSandboxProfile; - __impureHostDeps = __stdenvImpureHostDeps; - }) - - // { - - meta = { - description = "The default build environment for Unix packages in Nixpkgs"; - platforms = lib.platforms.all; - }; - - inherit buildPlatform hostPlatform targetPlatform; - - inherit extraNativeBuildInputs extraBuildInputs - __extraImpureHostDeps extraSandboxProfile; - - # Utility flags to test the type of platform. - inherit (hostPlatform) - isDarwin isLinux isSunOS isCygwin isBSD isFreeBSD isOpenBSD - isi686 isx86_32 isx86_64 - is32bit is64bit - isAarch32 isAarch64 isMips isBigEndian; - - # Override `system` so that packages can get the system of the host - # platform through `stdenv.system`. `system` is originally set to the - # build platform within the derivation above so that Nix directs the build - # to correct type of machine. - inherit (hostPlatform) system; - - mkDerivation = mkDerivationFromStdenv stdenv; - - inherit fetchurlBoot; - - inherit overrides; - - inherit cc hasCC; - - # Convenience for doing some very basic shell syntax checking by parsing a script - # without running any commands. Because this will also skip `shopt -s extglob` - # commands and extglob affects the Bash parser, we enable extglob always. - shellDryRun = "${stdenv.shell} -n -O extglob"; - - tests = { - succeedOnFailure = import ../tests/succeedOnFailure.nix { inherit stdenv; }; - }; - passthru.tests = lib.warn "Use `stdenv.tests` instead. `passthru` is a `mkDerivation` detail." stdenv.tests; - } - - # Propagate any extra attributes. For instance, we use this to - # "lift" packages like curl from the final stdenv for Linux to - # all-packages.nix for that platform (meaning that it has a line - # like curl = if stdenv ? curl then stdenv.curl else ...). - // extraAttrs -); in stdenv-overridable diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix deleted file mode 100644 index d34785dca94..00000000000 --- a/pkgs/stdenv/generic/make-derivation.nix +++ /dev/null @@ -1,569 +0,0 @@ -{ lib, config }: - -stdenv: - -let - checkMeta = import ./check-meta.nix { - inherit lib config; - # Nix itself uses the `system` field of a derivation to decide where - # to build it. This is a bit confusing for cross compilation. - inherit (stdenv) hostPlatform; - }; - - # Based off lib.makeExtensible, with modifications: - makeDerivationExtensible = rattrs: - let - # NOTE: The following is a hint that will be printed by the Nix cli when - # encountering an infinite recursion. It must not be formatted into - # separate lines, because Nix would only show the last line of the comment. - - # An infinite recursion here can be caused by having the attribute names of expression `e` in `.overrideAttrs(finalAttrs: previousAttrs: e)` depend on `finalAttrs`. Only the attribute values of `e` can depend on `finalAttrs`. - args = rattrs (args // { inherit finalPackage overrideAttrs; }); - # ^^^^ - - overrideAttrs = f0: - let - f = self: super: - # Convert f0 to an overlay. Legacy is: - # overrideAttrs (super: {}) - # We want to introduce self. We follow the convention of overlays: - # overrideAttrs (self: super: {}) - # Which means the first parameter can be either self or super. - # This is surprising, but far better than the confusion that would - # arise from flipping an overlay's parameters in some cases. - let x = f0 super; - in - if builtins.isFunction x - then - # Can't reuse `x`, because `self` comes first. - # Looks inefficient, but `f0 super` was a cheap thunk. - f0 self super - else x; - in - makeDerivationExtensible - (self: let super = rattrs self; in super // f self super); - - finalPackage = - mkDerivationSimple overrideAttrs args; - - in finalPackage; - - # makeDerivationExtensibleConst == makeDerivationExtensible (_: attrs), - # but pre-evaluated for a slight improvement in performance. - makeDerivationExtensibleConst = attrs: - mkDerivationSimple - (f0: - let - f = self: super: - let x = f0 super; - in - if builtins.isFunction x - then - f0 self super - else x; - in - makeDerivationExtensible (self: attrs // f self attrs)) - attrs; - - mkDerivationSimple = overrideAttrs: - - -# `mkDerivation` wraps the builtin `derivation` function to -# produce derivations that use this stdenv and its shell. -# -# See also: -# -# * https://nixos.org/nixpkgs/manual/#sec-using-stdenv -# Details on how to use this mkDerivation function -# -# * https://nixos.org/manual/nix/stable/expressions/derivations.html#derivations -# Explanation about derivations in general -{ - -# These types of dependencies are all exhaustively documented in -# the "Specifying Dependencies" section of the "Standard -# Environment" chapter of the Nixpkgs manual. - -# TODO(@Ericson2314): Stop using legacy dep attribute names - -# host offset -> target offset - depsBuildBuild ? [] # -1 -> -1 -, depsBuildBuildPropagated ? [] # -1 -> -1 -, nativeBuildInputs ? [] # -1 -> 0 N.B. Legacy name -, propagatedNativeBuildInputs ? [] # -1 -> 0 N.B. Legacy name -, depsBuildTarget ? [] # -1 -> 1 -, depsBuildTargetPropagated ? [] # -1 -> 1 - -, depsHostHost ? [] # 0 -> 0 -, depsHostHostPropagated ? [] # 0 -> 0 -, buildInputs ? [] # 0 -> 1 N.B. Legacy name -, propagatedBuildInputs ? [] # 0 -> 1 N.B. Legacy name - -, depsTargetTarget ? [] # 1 -> 1 -, depsTargetTargetPropagated ? [] # 1 -> 1 - -, checkInputs ? [] -, installCheckInputs ? [] -, nativeCheckInputs ? [] -, nativeInstallCheckInputs ? [] - -# Configure Phase -, configureFlags ? [] -, cmakeFlags ? [] -, mesonFlags ? [] -, # Target is not included by default because most programs don't care. - # Including it then would cause needless mass rebuilds. - # - # TODO(@Ericson2314): Make [ "build" "host" ] always the default / resolve #87909 - configurePlatforms ? lib.optionals - (stdenv.hostPlatform != stdenv.buildPlatform || config.configurePlatformsByDefault) - [ "build" "host" ] - -# TODO(@Ericson2314): Make unconditional / resolve #33599 -# Check phase -, doCheck ? config.doCheckByDefault or false - -# TODO(@Ericson2314): Make unconditional / resolve #33599 -# InstallCheck phase -, doInstallCheck ? config.doCheckByDefault or false - -, # TODO(@Ericson2314): Make always true and remove / resolve #178468 - strictDeps ? if config.strictDepsByDefault then true else stdenv.hostPlatform != stdenv.buildPlatform - -, enableParallelBuilding ? config.enableParallelBuildingByDefault - -, meta ? {} -, passthru ? {} -, pos ? # position used in error messages and for meta.position - (if attrs.meta.description or null != null - then builtins.unsafeGetAttrPos "description" attrs.meta - else if attrs.version or null != null - then builtins.unsafeGetAttrPos "version" attrs - else builtins.unsafeGetAttrPos "name" attrs) -, separateDebugInfo ? false -, outputs ? [ "out" ] -, __darwinAllowLocalNetworking ? false -, __impureHostDeps ? [] -, __propagatedImpureHostDeps ? [] -, sandboxProfile ? "" -, propagatedSandboxProfile ? "" - -, hardeningEnable ? [] -, hardeningDisable ? [] - -, patches ? [] - -, __contentAddressed ? - (! attrs ? outputHash) # Fixed-output drvs can't be content addressed too - && config.contentAddressedByDefault - -# Experimental. For simple packages mostly just works, -# but for anything complex, be prepared to debug if enabling. -, __structuredAttrs ? config.structuredAttrsByDefault or false - -, env ? { } - -, ... } @ attrs: - -let - # TODO(@oxij, @Ericson2314): This is here to keep the old semantics, remove when - # no package has `doCheck = true`. - doCheck' = doCheck && stdenv.buildPlatform.canExecute stdenv.hostPlatform; - doInstallCheck' = doInstallCheck && stdenv.buildPlatform.canExecute stdenv.hostPlatform; - - separateDebugInfo' = separateDebugInfo && stdenv.hostPlatform.isLinux; - outputs' = outputs ++ lib.optional separateDebugInfo' "debug"; - - # Turn a derivation into its outPath without a string context attached. - # See the comment at the usage site. - unsafeDerivationToUntrackedOutpath = drv: - if lib.isDerivation drv - then builtins.unsafeDiscardStringContext drv.outPath - else drv; - - noNonNativeDeps = builtins.length (depsBuildTarget ++ depsBuildTargetPropagated - ++ depsHostHost ++ depsHostHostPropagated - ++ buildInputs ++ propagatedBuildInputs - ++ depsTargetTarget ++ depsTargetTargetPropagated) == 0; - dontAddHostSuffix = attrs ? outputHash && !noNonNativeDeps || !stdenv.hasCC; - - hardeningDisable' = if lib.any (x: x == "fortify") hardeningDisable - # disabling fortify implies fortify3 should also be disabled - then lib.unique (hardeningDisable ++ [ "fortify3" ]) - else hardeningDisable; - supportedHardeningFlags = [ "fortify" "fortify3" "stackprotector" "pie" "pic" "strictoverflow" "format" "relro" "bindnow" ]; - # Musl-based platforms will keep "pie", other platforms will not. - # If you change this, make sure to update section `{#sec-hardening-in-nixpkgs}` - # in the nixpkgs manual to inform users about the defaults. - defaultHardeningFlags = let - # not ready for this by default - supportedHardeningFlags' = lib.remove "fortify3" supportedHardeningFlags; - in if stdenv.hostPlatform.isMusl && - # Except when: - # - static aarch64, where compilation works, but produces segfaulting dynamically linked binaries. - # - static armv7l, where compilation fails. - !(stdenv.hostPlatform.isAarch && stdenv.hostPlatform.isStatic) - then supportedHardeningFlags' - else lib.remove "pie" supportedHardeningFlags'; - enabledHardeningOptions = - if builtins.elem "all" hardeningDisable' - then [] - else lib.subtractLists hardeningDisable' (defaultHardeningFlags ++ hardeningEnable); - # hardeningDisable additionally supports "all". - erroneousHardeningFlags = lib.subtractLists supportedHardeningFlags (hardeningEnable ++ lib.remove "all" hardeningDisable); - - checkDependencyList = checkDependencyList' []; - checkDependencyList' = positions: name: deps: lib.flip lib.imap1 deps (index: dep: - if lib.isDerivation dep || dep == null || builtins.typeOf dep == "string" || builtins.typeOf dep == "path" then dep - else if lib.isList dep then checkDependencyList' ([index] ++ positions) name dep - else throw "Dependency is not of a valid type: ${lib.concatMapStrings (ix: "element ${toString ix} of ") ([index] ++ positions)}${name} for ${attrs.name or attrs.pname}"); -in if builtins.length erroneousHardeningFlags != 0 -then abort ("mkDerivation was called with unsupported hardening flags: " + lib.generators.toPretty {} { - inherit erroneousHardeningFlags hardeningDisable hardeningEnable supportedHardeningFlags; -}) -else let - doCheck = doCheck'; - doInstallCheck = doInstallCheck'; - buildInputs' = buildInputs - ++ lib.optionals doCheck checkInputs - ++ lib.optionals doInstallCheck installCheckInputs; - nativeBuildInputs' = nativeBuildInputs - ++ lib.optional separateDebugInfo' ../../build-support/setup-hooks/separate-debug-info.sh - ++ lib.optional stdenv.hostPlatform.isWindows ../../build-support/setup-hooks/win-dll-link.sh - ++ lib.optionals doCheck nativeCheckInputs - ++ lib.optionals doInstallCheck nativeInstallCheckInputs; - - outputs = outputs'; - - references = nativeBuildInputs ++ buildInputs - ++ propagatedNativeBuildInputs ++ propagatedBuildInputs; - - dependencies = map (map lib.chooseDevOutputs) [ - [ - (map (drv: drv.__spliced.buildBuild or drv) (checkDependencyList "depsBuildBuild" depsBuildBuild)) - (map (drv: drv.__spliced.buildHost or drv) (checkDependencyList "nativeBuildInputs" nativeBuildInputs')) - (map (drv: drv.__spliced.buildTarget or drv) (checkDependencyList "depsBuildTarget" depsBuildTarget)) - ] - [ - (map (drv: drv.__spliced.hostHost or drv) (checkDependencyList "depsHostHost" depsHostHost)) - (map (drv: drv.__spliced.hostTarget or drv) (checkDependencyList "buildInputs" buildInputs')) - ] - [ - (map (drv: drv.__spliced.targetTarget or drv) (checkDependencyList "depsTargetTarget" depsTargetTarget)) - ] - ]; - propagatedDependencies = map (map lib.chooseDevOutputs) [ - [ - (map (drv: drv.__spliced.buildBuild or drv) (checkDependencyList "depsBuildBuildPropagated" depsBuildBuildPropagated)) - (map (drv: drv.__spliced.buildHost or drv) (checkDependencyList "propagatedNativeBuildInputs" propagatedNativeBuildInputs)) - (map (drv: drv.__spliced.buildTarget or drv) (checkDependencyList "depsBuildTargetPropagated" depsBuildTargetPropagated)) - ] - [ - (map (drv: drv.__spliced.hostHost or drv) (checkDependencyList "depsHostHostPropagated" depsHostHostPropagated)) - (map (drv: drv.__spliced.hostTarget or drv) (checkDependencyList "propagatedBuildInputs" propagatedBuildInputs)) - ] - [ - (map (drv: drv.__spliced.targetTarget or drv) (checkDependencyList "depsTargetTargetPropagated" depsTargetTargetPropagated)) - ] - ]; - - computedSandboxProfile = - lib.concatMap (input: input.__propagatedSandboxProfile or []) - (stdenv.extraNativeBuildInputs - ++ stdenv.extraBuildInputs - ++ lib.concatLists dependencies); - - computedPropagatedSandboxProfile = - lib.concatMap (input: input.__propagatedSandboxProfile or []) - (lib.concatLists propagatedDependencies); - - computedImpureHostDeps = - lib.unique (lib.concatMap (input: input.__propagatedImpureHostDeps or []) - (stdenv.extraNativeBuildInputs - ++ stdenv.extraBuildInputs - ++ lib.concatLists dependencies)); - - computedPropagatedImpureHostDeps = - lib.unique (lib.concatMap (input: input.__propagatedImpureHostDeps or []) - (lib.concatLists propagatedDependencies)); - - envIsExportable = lib.isAttrs env && !lib.isDerivation env; - - derivationArg = - (removeAttrs attrs - (["meta" "passthru" "pos" - "checkInputs" "installCheckInputs" - "nativeCheckInputs" "nativeInstallCheckInputs" - "__darwinAllowLocalNetworking" - "__impureHostDeps" "__propagatedImpureHostDeps" - "sandboxProfile" "propagatedSandboxProfile"] - ++ lib.optional (__structuredAttrs || envIsExportable) "env")) - // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) { - name = - let - # Indicate the host platform of the derivation if cross compiling. - # Fixed-output derivations like source tarballs shouldn't get a host - # suffix. But we have some weird ones with run-time deps that are - # just used for their side-affects. Those might as well since the - # hash can't be the same. See #32986. - hostSuffix = lib.optionalString - (stdenv.hostPlatform != stdenv.buildPlatform && !dontAddHostSuffix) - "-${stdenv.hostPlatform.config}"; - - # Disambiguate statically built packages. This was originally - # introduce as a means to prevent nix-env to get confused between - # nix and nixStatic. This should be also achieved by moving the - # hostSuffix before the version, so we could contemplate removing - # it again. - staticMarker = lib.optionalString stdenv.hostPlatform.isStatic "-static"; - in - lib.strings.sanitizeDerivationName ( - if attrs ? name - then attrs.name + hostSuffix - else - # we cannot coerce null to a string below - assert lib.assertMsg (attrs ? version && attrs.version != null) "The ‘version’ attribute cannot be null."; - "${attrs.pname}${staticMarker}${hostSuffix}-${attrs.version}" - ); - }) // lib.optionalAttrs __structuredAttrs { env = checkedEnv; } // { - builder = attrs.realBuilder or stdenv.shell; - args = attrs.args or ["-e" (attrs.builder or ./default-builder.sh)]; - inherit stdenv; - - # The `system` attribute of a derivation has special meaning to Nix. - # Derivations set it to choose what sort of machine could be used to - # execute the build, The build platform entirely determines this, - # indeed more finely than Nix knows or cares about. The `system` - # attribute of `buildPlatfom` matches Nix's degree of specificity. - # exactly. - inherit (stdenv.buildPlatform) system; - - userHook = config.stdenv.userHook or null; - __ignoreNulls = true; - inherit __structuredAttrs strictDeps; - - depsBuildBuild = lib.elemAt (lib.elemAt dependencies 0) 0; - nativeBuildInputs = lib.elemAt (lib.elemAt dependencies 0) 1; - depsBuildTarget = lib.elemAt (lib.elemAt dependencies 0) 2; - depsHostHost = lib.elemAt (lib.elemAt dependencies 1) 0; - buildInputs = lib.elemAt (lib.elemAt dependencies 1) 1; - depsTargetTarget = lib.elemAt (lib.elemAt dependencies 2) 0; - - depsBuildBuildPropagated = lib.elemAt (lib.elemAt propagatedDependencies 0) 0; - propagatedNativeBuildInputs = lib.elemAt (lib.elemAt propagatedDependencies 0) 1; - depsBuildTargetPropagated = lib.elemAt (lib.elemAt propagatedDependencies 0) 2; - depsHostHostPropagated = lib.elemAt (lib.elemAt propagatedDependencies 1) 0; - propagatedBuildInputs = lib.elemAt (lib.elemAt propagatedDependencies 1) 1; - depsTargetTargetPropagated = lib.elemAt (lib.elemAt propagatedDependencies 2) 0; - - # This parameter is sometimes a string, sometimes null, and sometimes a list, yuck - configureFlags = let inherit (lib) optional elem; in - (/**/ if lib.isString configureFlags then lib.warn "String 'configureFlags' is deprecated and will be removed in release 23.05. Please use a list of strings. Derivation name: ${derivationArg.name}, file: ${pos.file or "unknown file"}" [configureFlags] - else if configureFlags == null then lib.warn "Null 'configureFlags' is deprecated and will be removed in release 23.05. Please use a empty list instead '[]'. Derivation name: ${derivationArg.name}, file: ${pos.file or "unknown file"}" [] - else configureFlags) - ++ optional (elem "build" configurePlatforms) "--build=${stdenv.buildPlatform.config}" - ++ optional (elem "host" configurePlatforms) "--host=${stdenv.hostPlatform.config}" - ++ optional (elem "target" configurePlatforms) "--target=${stdenv.targetPlatform.config}"; - - cmakeFlags = - let - explicitFlags = - if lib.isString cmakeFlags then lib.warn - "String 'cmakeFlags' is deprecated and will be removed in release 23.05. Please use a list of strings. Derivation name: ${derivationArg.name}, file: ${pos.file or "unknown file"}" - [cmakeFlags] - else if cmakeFlags == null then - lib.warn - "Null 'cmakeFlags' is deprecated and will be removed in release 23.05. Please use a empty list instead '[]'. Derivation name: ${derivationArg.name}, file: ${pos.file or "unknown file"}" - [] - else - cmakeFlags; - - crossFlags = [ - "-DCMAKE_SYSTEM_NAME=${lib.findFirst lib.isString "Generic" (lib.optional (!stdenv.hostPlatform.isRedox) stdenv.hostPlatform.uname.system)}" - ] ++ lib.optionals (stdenv.hostPlatform.uname.processor != null) [ - "-DCMAKE_SYSTEM_PROCESSOR=${stdenv.hostPlatform.uname.processor}" - ] ++ lib.optionals (stdenv.hostPlatform.uname.release != null) [ - "-DCMAKE_SYSTEM_VERSION=${stdenv.hostPlatform.uname.release}" - ] ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ - "-DCMAKE_OSX_ARCHITECTURES=${stdenv.hostPlatform.darwinArch}" - ] ++ lib.optionals (stdenv.buildPlatform.uname.system != null) [ - "-DCMAKE_HOST_SYSTEM_NAME=${stdenv.buildPlatform.uname.system}" - ] ++ lib.optionals (stdenv.buildPlatform.uname.processor != null) [ - "-DCMAKE_HOST_SYSTEM_PROCESSOR=${stdenv.buildPlatform.uname.processor}" - ] ++ lib.optionals (stdenv.buildPlatform.uname.release != null) [ - "-DCMAKE_HOST_SYSTEM_VERSION=${stdenv.buildPlatform.uname.release}" - ]; - in - explicitFlags ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) crossFlags; - - mesonFlags = - let - explicitFlags = - if lib.isString mesonFlags then lib.warn - "String 'mesonFlags' is deprecated and will be removed in release 23.05. Please use a list of strings. Derivation name: ${derivationArg.name}, file: ${pos.file or "unknown file"}" - [mesonFlags] - else if mesonFlags == null then - lib.warn - "Null 'mesonFlags' is deprecated and will be removed in release 23.05. Please use a empty list instead '[]'. Derivation name: ${derivationArg.name}, file: ${pos.file or "unknown file"}" - [] - else - mesonFlags; - - # See https://mesonbuild.com/Reference-tables.html#cpu-families - cpuFamily = platform: with platform; - /**/ if isAarch32 then "arm" - else if isx86_32 then "x86" - else platform.uname.processor; - - crossFile = builtins.toFile "cross-file.conf" '' - [properties] - needs_exe_wrapper = ${lib.boolToString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform)} - - [host_machine] - system = '${stdenv.targetPlatform.parsed.kernel.name}' - cpu_family = '${cpuFamily stdenv.targetPlatform}' - cpu = '${stdenv.targetPlatform.parsed.cpu.name}' - endian = ${if stdenv.targetPlatform.isLittleEndian then "'little'" else "'big'"} - - [binaries] - llvm-config = 'llvm-config-native' - ''; - crossFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "--cross-file=${crossFile}" ]; - in crossFlags ++ explicitFlags; - - inherit patches; - - inherit doCheck doInstallCheck; - - inherit outputs; - } // lib.optionalAttrs (__contentAddressed) { - inherit __contentAddressed; - # Provide default values for outputHashMode and outputHashAlgo because - # most people won't care about these anyways - outputHashAlgo = attrs.outputHashAlgo or "sha256"; - outputHashMode = attrs.outputHashMode or "recursive"; - } // lib.optionalAttrs (enableParallelBuilding) { - inherit enableParallelBuilding; - enableParallelChecking = attrs.enableParallelChecking or true; - enableParallelInstalling = attrs.enableParallelInstalling or true; - } // lib.optionalAttrs (hardeningDisable != [] || hardeningEnable != [] || stdenv.hostPlatform.isMusl) { - NIX_HARDENING_ENABLE = enabledHardeningOptions; - } // lib.optionalAttrs (stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform ? gcc.arch) { - requiredSystemFeatures = attrs.requiredSystemFeatures or [] ++ [ "gccarch-${stdenv.hostPlatform.gcc.arch}" ]; - } // lib.optionalAttrs (stdenv.buildPlatform.isDarwin) { - inherit __darwinAllowLocalNetworking; - # TODO: remove lib.unique once nix has a list canonicalization primitive - __sandboxProfile = - let profiles = [ stdenv.extraSandboxProfile ] ++ computedSandboxProfile ++ computedPropagatedSandboxProfile ++ [ propagatedSandboxProfile sandboxProfile ]; - final = lib.concatStringsSep "\n" (lib.filter (x: x != "") (lib.unique profiles)); - in final; - __propagatedSandboxProfile = lib.unique (computedPropagatedSandboxProfile ++ [ propagatedSandboxProfile ]); - __impureHostDeps = computedImpureHostDeps ++ computedPropagatedImpureHostDeps ++ __propagatedImpureHostDeps ++ __impureHostDeps ++ stdenv.__extraImpureHostDeps ++ [ - "/dev/zero" - "/dev/random" - "/dev/urandom" - "/bin/sh" - ]; - __propagatedImpureHostDeps = computedPropagatedImpureHostDeps ++ __propagatedImpureHostDeps; - } // - # If we use derivations directly here, they end up as build-time dependencies. - # This is especially problematic in the case of disallowed*, since the disallowed - # derivations will be built by nix as build-time dependencies, while those - # derivations might take a very long time to build, or might not even build - # successfully on the platform used. - # We can improve on this situation by instead passing only the outPath, - # without an attached string context, to nix. The out path will be a placeholder - # which will be replaced by the actual out path if the derivation in question - # is part of the final closure (and thus needs to be built). If it is not - # part of the final closure, then the placeholder will be passed along, - # but in that case we know for a fact that the derivation is not part of the closure. - # This means that passing the out path to nix does the right thing in either - # case, both for disallowed and allowed references/requisites, and we won't - # build the derivation if it wouldn't be part of the closure, saving time and resources. - # While the problem is less severe for allowed*, since we want the derivation - # to be built eventually, we would still like to get the error early and without - # having to wait while nix builds a derivation that might not be used. - # See also https://github.com/NixOS/nix/issues/4629 - lib.optionalAttrs (attrs ? disallowedReferences) { - disallowedReferences = - map unsafeDerivationToUntrackedOutpath attrs.disallowedReferences; - } // - lib.optionalAttrs (attrs ? disallowedRequisites) { - disallowedRequisites = - map unsafeDerivationToUntrackedOutpath attrs.disallowedRequisites; - } // - lib.optionalAttrs (attrs ? allowedReferences) { - allowedReferences = - lib.mapNullable unsafeDerivationToUntrackedOutpath attrs.allowedReferences; - } // - lib.optionalAttrs (attrs ? allowedRequisites) { - allowedRequisites = - lib.mapNullable unsafeDerivationToUntrackedOutpath attrs.allowedRequisites; - }; - - meta = checkMeta.commonMeta { inherit validity attrs pos references; }; - validity = checkMeta.assertValidity { inherit meta attrs; }; - - checkedEnv = - let - overlappingNames = lib.attrNames (builtins.intersectAttrs env derivationArg); - in - assert lib.assertMsg envIsExportable - "When using structured attributes, `env` must be an attribute set of environment variables."; - assert lib.assertMsg (overlappingNames == [ ]) - "The ‘env’ attribute set cannot contain any attributes passed to derivation. The following attributes are overlapping: ${lib.concatStringsSep ", " overlappingNames}"; - lib.mapAttrs - (n: v: assert lib.assertMsg (lib.isString v || lib.isBool v || lib.isInt v || lib.isDerivation v) - "The ‘env’ attribute set can only contain derivation, string, boolean or integer attributes. The ‘${n}’ attribute is of type ${builtins.typeOf v}."; v) - env; - -in - -lib.extendDerivation - validity.handled - ({ - # A derivation that always builds successfully and whose runtime - # dependencies are the original derivations build time dependencies - # This allows easy building and distributing of all derivations - # needed to enter a nix-shell with - # nix-build shell.nix -A inputDerivation - inputDerivation = derivation (derivationArg // { - # Add a name in case the original drv didn't have one - name = derivationArg.name or "inputDerivation"; - # This always only has one output - outputs = [ "out" ]; - - # Propagate the original builder and arguments, since we override - # them and they might contain references to build inputs - _derivation_original_builder = derivationArg.builder; - _derivation_original_args = derivationArg.args; - - builder = stdenv.shell; - # The bash builtin `export` dumps all current environment variables, - # which is where all build input references end up (e.g. $PATH for - # binaries). By writing this to $out, Nix can find and register - # them as runtime dependencies (since Nix greps for store paths - # through $out to find them) - args = [ "-c" "export > $out" ]; - - # inputDerivation produces the inputs; not the outputs, so any - # restrictions on what used to be the outputs don't serve a purpose - # anymore. - disallowedReferences = [ ]; - disallowedRequisites = [ ]; - }); - - inherit passthru overrideAttrs; - inherit meta; - } // - # Pass through extra attributes that are not inputs, but - # should be made available to Nix expressions using the - # derivation (e.g., in assertions). - passthru) - (derivation (derivationArg // lib.optionalAttrs envIsExportable checkedEnv)); - -in - fnOrAttrs: - if builtins.isFunction fnOrAttrs - then makeDerivationExtensible fnOrAttrs - else makeDerivationExtensibleConst fnOrAttrs diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh deleted file mode 100644 index 734abb890c2..00000000000 --- a/pkgs/stdenv/generic/setup.sh +++ /dev/null @@ -1,1617 +0,0 @@ -# shellcheck shell=bash -# shellcheck disable=1090,2154,2123,2034,2178,2048,2068,1091 -__nixpkgs_setup_set_original=$- -set -eu -set -o pipefail - -if [[ -n "${BASH_VERSINFO-}" && "${BASH_VERSINFO-}" -lt 4 ]]; then - echo "Detected Bash version that isn't supported by Nixpkgs (${BASH_VERSION})" - echo "Please install Bash 4 or greater to continue." - exit 1 -fi - -shopt -s inherit_errexit - -if (( "${NIX_DEBUG:-0}" >= 6 )); then - set -x -fi - -if [ -f .attrs.sh ]; then - __structuredAttrs=1 - echo "structuredAttrs is enabled" -else - __structuredAttrs= -fi - -if [ -n "$__structuredAttrs" ]; then - for outputName in "${!outputs[@]}"; do - # ex: out=/nix/store/... - export "$outputName=${outputs[$outputName]}" - done - - # $NIX_ATTRS_JSON_FILE pointed to the wrong location in sandbox - # https://github.com/NixOS/nix/issues/6736; please keep around until the - # fix reaches *every patch version* that's >= lib/minver.nix - if ! [[ -e "$NIX_ATTRS_JSON_FILE" ]]; then - export NIX_ATTRS_JSON_FILE="$NIX_BUILD_TOP/.attrs.json" - fi - if ! [[ -e "$NIX_ATTRS_SH_FILE" ]]; then - export NIX_ATTRS_SH_FILE="$NIX_BUILD_TOP/.attrs.sh" - fi -else - : "${outputs:=out}" -fi - -getAllOutputNames() { - if [ -n "$__structuredAttrs" ]; then - echo "${!outputs[*]}" - else - echo "$outputs" - fi -} - -###################################################################### -# Hook handling. - - -# Run all hooks with the specified name in the order in which they -# were added, stopping if any fails (returns a non-zero exit -# code). The hooks for are the shell function or variable -# , and the values of the shell array ‘Hooks’. -runHook() { - local hookName="$1" - shift - local hooksSlice="${hookName%Hook}Hooks[@]" - - local hook - # Hack around old bash being bad and thinking empty arrays are - # undefined. - for hook in "_callImplicitHook 0 $hookName" ${!hooksSlice+"${!hooksSlice}"}; do - _eval "$hook" "$@" - done - - return 0 -} - - -# Run all hooks with the specified name, until one succeeds (returns a -# zero exit code). If none succeed, return a non-zero exit code. -runOneHook() { - local hookName="$1" - shift - local hooksSlice="${hookName%Hook}Hooks[@]" - - local hook ret=1 - # Hack around old bash like above - for hook in "_callImplicitHook 1 $hookName" ${!hooksSlice+"${!hooksSlice}"}; do - if _eval "$hook" "$@"; then - ret=0 - break - fi - done - - return "$ret" -} - - -# Run the named hook, either by calling the function with that name or -# by evaluating the variable with that name. This allows convenient -# setting of hooks both from Nix expressions (as attributes / -# environment variables) and from shell scripts (as functions). If you -# want to allow multiple hooks, use runHook instead. -_callImplicitHook() { - local def="$1" - local hookName="$2" - if declare -F "$hookName" > /dev/null; then - "$hookName" - elif type -p "$hookName" > /dev/null; then - source "$hookName" - elif [ -n "${!hookName:-}" ]; then - eval "${!hookName}" - else - return "$def" - fi - # `_eval` expects hook to need nounset disable and leave it - # disabled anyways, so Ok to to delegate. The alternative of a - # return trap is no good because it would affect nested returns. -} - - -# A function wrapper around ‘eval’ that ensures that ‘return’ inside -# hooks exits the hook, not the caller. Also will only pass args if -# command can take them -_eval() { - if declare -F "$1" > /dev/null 2>&1; then - "$@" # including args - else - eval "$1" - fi -} - - -###################################################################### -# Logging. - -# Prints a command such that all word splits are unambiguous. We need -# to split the command in three parts because the middle format string -# will be, and must be, repeated for each argument. The first argument -# goes before the ':' and is just for convenience. -echoCmd() { - printf "%s:" "$1" - shift - printf ' %q' "$@" - echo -} - - -###################################################################### -# Error handling. - -exitHandler() { - exitCode="$?" - set +e - - if [ -n "${showBuildStats:-}" ]; then - read -r -d '' -a buildTimes < <(times) - echo "build times:" - echo "user time for the shell ${buildTimes[0]}" - echo "system time for the shell ${buildTimes[1]}" - echo "user time for all child processes ${buildTimes[2]}" - echo "system time for all child processes ${buildTimes[3]}" - fi - - if (( "$exitCode" != 0 )); then - runHook failureHook - - # If the builder had a non-zero exit code and - # $succeedOnFailure is set, create the file - # ‘$out/nix-support/failed’ to signal failure, and exit - # normally. Otherwise, return the original exit code. - if [ -n "${succeedOnFailure:-}" ]; then - echo "build failed with exit code $exitCode (ignored)" - mkdir -p "$out/nix-support" - printf "%s" "$exitCode" > "$out/nix-support/failed" - exit 0 - fi - - else - runHook exitHook - fi - - return "$exitCode" -} - -trap "exitHandler" EXIT - - -###################################################################### -# Helper functions. - - -addToSearchPathWithCustomDelimiter() { - local delimiter="$1" - local varName="$2" - local dir="$3" - if [[ -d "$dir" && "${!varName:+${delimiter}${!varName}${delimiter}}" \ - != *"${delimiter}${dir}${delimiter}"* ]]; then - export "${varName}=${!varName:+${!varName}${delimiter}}${dir}" - fi -} - -addToSearchPath() { - addToSearchPathWithCustomDelimiter ":" "$@" -} - -# Prepend elements to variable "$1", which may come from an attr. -# -# This is useful in generic setup code, which must (for now) support -# both derivations with and without __structuredAttrs true, so the -# variable may be an array or a space-separated string. -# -# Expressions for individual packages should simply switch to array -# syntax when they switch to setting __structuredAttrs = true. -prependToVar() { - local -n nameref="$1" - local useArray type - - if [ -n "$__structuredAttrs" ]; then - useArray=true - else - useArray=false - fi - - # check if variable already exist and if it does then do extra checks - if declare -p "$1" 2> /dev/null | grep -q '^'; then - type="$(declare -p "$1")" - if [[ "$type" =~ "declare -A" ]]; then - echo "prependToVar(): ERROR: trying to use prependToVar on an associative array." >&2 - return 1 - elif [[ "$type" =~ "declare -a" ]]; then - useArray=true - else - useArray=false - fi - fi - - shift - - if $useArray; then - nameref=( "$@" ${nameref+"${nameref[@]}"} ) - else - nameref="$* ${nameref-}" - fi -} - -# Same as above -appendToVar() { - local -n nameref="$1" - local useArray type - - if [ -n "$__structuredAttrs" ]; then - useArray=true - else - useArray=false - fi - - # check if variable already exist and if it does then do extra checks - if declare -p "$1" 2> /dev/null | grep -q '^'; then - type="$(declare -p "$1")" - if [[ "$type" =~ "declare -A" ]]; then - echo "appendToVar(): ERROR: trying to use appendToVar on an associative array, use variable+=([\"X\"]=\"Y\") instead." >&2 - return 1 - elif [[ "$type" =~ "declare -a" ]]; then - useArray=true - else - useArray=false - fi - fi - - shift - - if $useArray; then - nameref=( ${nameref+"${nameref[@]}"} "$@" ) - else - nameref="${nameref-} $*" - fi -} - -# Accumulate into `flagsArray` the flags from the named variables. -# -# If __structuredAttrs, the variables are all treated as arrays -# and simply concatenated onto `flagsArray`. -# -# If not __structuredAttrs, then: -# * Each variable is treated as a string, and split on whitespace; -# * except variables whose names end in "Array", which are treated -# as arrays. -_accumFlagsArray() { - local name - if [ -n "$__structuredAttrs" ]; then - for name in "$@"; do - local -n nameref="$name" - flagsArray+=( ${nameref+"${nameref[@]}"} ) - done - else - for name in "$@"; do - local -n nameref="$name" - case "$name" in - *Array) - flagsArray+=( ${nameref+"${nameref[@]}"} ) ;; - *) - flagsArray+=( ${nameref-} ) ;; - esac - done - fi - -} - -# Add $1/lib* into rpaths. -# The function is used in multiple-outputs.sh hook, -# so it is defined here but tried after the hook. -_addRpathPrefix() { - if [ "${NIX_NO_SELF_RPATH:-0}" != 1 ]; then - export NIX_LDFLAGS="-rpath $1/lib ${NIX_LDFLAGS-}" - if [ -n "${NIX_LIB64_IN_SELF_RPATH:-}" ]; then - export NIX_LDFLAGS="-rpath $1/lib64 ${NIX_LDFLAGS-}" - fi - if [ -n "${NIX_LIB32_IN_SELF_RPATH:-}" ]; then - export NIX_LDFLAGS="-rpath $1/lib32 ${NIX_LDFLAGS-}" - fi - fi -} - -# Return success if the specified file is an ELF object. -isELF() { - local fn="$1" - local fd - local magic - exec {fd}< "$fn" - read -r -n 4 -u "$fd" magic - exec {fd}<&- - if [ "$magic" = $'\177ELF' ]; then return 0; else return 1; fi -} - -# Return success if the specified file is a Mach-O object. -isMachO() { - local fn="$1" - local fd - local magic - exec {fd}< "$fn" - read -r -n 4 -u "$fd" magic - exec {fd}<&- - - # nix uses 'declare -F' in get-env.sh to retrieve the loaded functions. - # If we use the $'string' syntax instead of 'echo -ne' then 'declare' will print the raw characters and break nix. - # See https://github.com/NixOS/nixpkgs/pull/138334 and https://github.com/NixOS/nix/issues/5262. - - # https://opensource.apple.com/source/lldb/lldb-310.2.36/examples/python/mach_o.py.auto.html - if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xcf") || "$magic" = $(echo -ne "\xcf\xfa\xed\xfe") ]]; then - # MH_MAGIC_64 || MH_CIGAM_64 - return 0; - elif [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xce") || "$magic" = $(echo -ne "\xce\xfa\xed\xfe") ]]; then - # MH_MAGIC || MH_CIGAM - return 0; - elif [[ "$magic" = $(echo -ne "\xca\xfe\xba\xbe") || "$magic" = $(echo -ne "\xbe\xba\xfe\xca") ]]; then - # FAT_MAGIC || FAT_CIGAM - return 0; - else - return 1; - fi -} - -# Return success if the specified file is a script (i.e. starts with -# "#!"). -isScript() { - local fn="$1" - local fd - local magic - exec {fd}< "$fn" - read -r -n 2 -u "$fd" magic - exec {fd}<&- - if [[ "$magic" =~ \#! ]]; then return 0; else return 1; fi -} - -# printf unfortunately will print a trailing newline regardless -printLines() { - (( "$#" > 0 )) || return 0 - printf '%s\n' "$@" -} - -printWords() { - (( "$#" > 0 )) || return 0 - printf '%s ' "$@" -} - -###################################################################### -# Initialisation. - -# If using structured attributes, export variables from `env` to the environment. -# When not using structured attributes, those variables are already exported. -if [[ -n $__structuredAttrs ]]; then - for envVar in "${!env[@]}"; do - declare -x "${envVar}=${env[${envVar}]}" - done -fi - - -# Set a fallback default value for SOURCE_DATE_EPOCH, used by some build tools -# to provide a deterministic substitute for the "current" time. Note that -# 315532800 = 1980-01-01 12:00:00. We use this date because python's wheel -# implementation uses zip archive and zip does not support dates going back to -# 1970. -export SOURCE_DATE_EPOCH -: "${SOURCE_DATE_EPOCH:=315532800}" - - -# Wildcard expansions that don't match should expand to an empty list. -# This ensures that, for instance, "for i in *; do ...; done" does the -# right thing. -shopt -s nullglob - - -# Set up the initial path. -PATH= -HOST_PATH= -for i in $initialPath; do - if [ "$i" = / ]; then i=; fi - addToSearchPath PATH "$i/bin" - - # For backward compatibility, we add initial path to HOST_PATH so - # it can be used in auto patch-shebangs. Unfortunately this will - # not work with cross compilation. - if [ -z "${strictDeps-}" ]; then - addToSearchPath HOST_PATH "$i/bin" - fi -done - -unset i - -if (( "${NIX_DEBUG:-0}" >= 1 )); then - echo "initial path: $PATH" -fi - - -# Check that the pre-hook initialised SHELL. -if [ -z "${SHELL:-}" ]; then echo "SHELL not set"; exit 1; fi -BASH="$SHELL" -export CONFIG_SHELL="$SHELL" - - -# Execute the pre-hook. -if [ -z "${shell:-}" ]; then export shell="$SHELL"; fi -runHook preHook - - -# Allow the caller to augment buildInputs (it's not always possible to -# do this before the call to setup.sh, since the PATH is empty at that -# point; here we have a basic Unix environment). -runHook addInputsHook - - -# Package accumulators - -declare -a pkgsBuildBuild pkgsBuildHost pkgsBuildTarget -declare -a pkgsHostHost pkgsHostTarget -declare -a pkgsTargetTarget - -declare -a pkgBuildAccumVars=(pkgsBuildBuild pkgsBuildHost pkgsBuildTarget) -declare -a pkgHostAccumVars=(pkgsHostHost pkgsHostTarget) -declare -a pkgTargetAccumVars=(pkgsTargetTarget) - -declare -a pkgAccumVarVars=(pkgBuildAccumVars pkgHostAccumVars pkgTargetAccumVars) - - -# Hooks - -declare -a envBuildBuildHooks envBuildHostHooks envBuildTargetHooks -declare -a envHostHostHooks envHostTargetHooks -declare -a envTargetTargetHooks - -declare -a pkgBuildHookVars=(envBuildBuildHook envBuildHostHook envBuildTargetHook) -declare -a pkgHostHookVars=(envHostHostHook envHostTargetHook) -declare -a pkgTargetHookVars=(envTargetTargetHook) - -declare -a pkgHookVarVars=(pkgBuildHookVars pkgHostHookVars pkgTargetHookVars) - -# those variables are declared here, since where and if they are used varies -declare -a preFixupHooks fixupOutputHooks preConfigureHooks postFixupHooks postUnpackHooks unpackCmdHooks - -# Add env hooks for all sorts of deps with the specified host offset. -addEnvHooks() { - local depHostOffset="$1" - shift - local pkgHookVarsSlice="${pkgHookVarVars[$depHostOffset + 1]}[@]" - local pkgHookVar - for pkgHookVar in "${!pkgHookVarsSlice}"; do - eval "${pkgHookVar}s"'+=("$@")' - done -} - - -# Propagated dep files - -declare -a propagatedBuildDepFiles=( - propagated-build-build-deps - propagated-native-build-inputs # Legacy name for back-compat - propagated-build-target-deps -) -declare -a propagatedHostDepFiles=( - propagated-host-host-deps - propagated-build-inputs # Legacy name for back-compat -) -declare -a propagatedTargetDepFiles=( - propagated-target-target-deps -) -declare -a propagatedDepFilesVars=( - propagatedBuildDepFiles - propagatedHostDepFiles - propagatedTargetDepFiles -) - -# Platform offsets: build = -1, host = 0, target = 1 -declare -a allPlatOffsets=(-1 0 1) - - -# Mutually-recursively find all build inputs. See the dependency section of the -# stdenv chapter of the Nixpkgs manual for the specification this algorithm -# implements. -findInputs() { - local -r pkg="$1" - local -r hostOffset="$2" - local -r targetOffset="$3" - - # Sanity check - (( hostOffset <= targetOffset )) || exit 1 - - local varVar="${pkgAccumVarVars[hostOffset + 1]}" - local varRef="$varVar[$((targetOffset - hostOffset))]" - local var="${!varRef}" - unset -v varVar varRef - - # TODO(@Ericson2314): Restore using associative array once Darwin - # nix-shell doesn't use impure bash. This should replace the O(n) - # case with an O(1) hash map lookup, assuming bash is implemented - # well :D. - local varSlice="$var[*]" - # ${..-} to hack around old bash empty array problem - case "${!varSlice-}" in - *" $pkg "*) return 0 ;; - esac - unset -v varSlice - - eval "$var"'+=("$pkg")' - - if ! [ -e "$pkg" ]; then - echo "build input $pkg does not exist" >&2 - exit 1 - fi - - # The current package's host and target offset together - # provide a <=-preserving homomorphism from the relative - # offsets to current offset - function mapOffset() { - local -r inputOffset="$1" - local -n outputOffset="$2" - if (( inputOffset <= 0 )); then - outputOffset=$((inputOffset + hostOffset)) - else - outputOffset=$((inputOffset - 1 + targetOffset)) - fi - } - - # Host offset relative to that of the package whose immediate - # dependencies we are currently exploring. - local relHostOffset - for relHostOffset in "${allPlatOffsets[@]}"; do - # `+ 1` so we start at 0 for valid index - local files="${propagatedDepFilesVars[relHostOffset + 1]}" - - # Host offset relative to the package currently being - # built---as absolute an offset as will be used. - local hostOffsetNext - mapOffset "$relHostOffset" hostOffsetNext - - # Ensure we're in bounds relative to the package currently - # being built. - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue - - # Target offset relative to the *host* offset of the package - # whose immediate dependencies we are currently exploring. - local relTargetOffset - for relTargetOffset in "${allPlatOffsets[@]}"; do - (( "$relHostOffset" <= "$relTargetOffset" )) || continue - - local fileRef="${files}[$relTargetOffset - $relHostOffset]" - local file="${!fileRef}" - unset -v fileRef - - # Target offset relative to the package currently being - # built. - local targetOffsetNext - mapOffset "$relTargetOffset" targetOffsetNext - - # Once again, ensure we're in bounds relative to the - # package currently being built. - (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue - - [[ -f "$pkg/nix-support/$file" ]] || continue - - local pkgNext - read -r -d '' pkgNext < "$pkg/nix-support/$file" || true - for pkgNext in $pkgNext; do - findInputs "$pkgNext" "$hostOffsetNext" "$targetOffsetNext" - done - done - done -} - -# The way we handle deps* and *Inputs works with structured attrs -# either enabled or disabled. For this it's convenient that the items -# in each list must be store paths, and therefore space-free. - -# Make sure all are at least defined as empty -: "${depsBuildBuild=}" "${depsBuildBuildPropagated=}" -: "${nativeBuildInputs=}" "${propagatedNativeBuildInputs=}" "${defaultNativeBuildInputs=}" -: "${depsBuildTarget=}" "${depsBuildTargetPropagated=}" -: "${depsHostHost=}" "${depsHostHostPropagated=}" -: "${buildInputs=}" "${propagatedBuildInputs=}" "${defaultBuildInputs=}" -: "${depsTargetTarget=}" "${depsTargetTargetPropagated=}" - -for pkg in ${depsBuildBuild[@]} ${depsBuildBuildPropagated[@]}; do - findInputs "$pkg" -1 -1 -done -for pkg in ${nativeBuildInputs[@]} ${propagatedNativeBuildInputs[@]}; do - findInputs "$pkg" -1 0 -done -for pkg in ${depsBuildTarget[@]} ${depsBuildTargetPropagated[@]}; do - findInputs "$pkg" -1 1 -done -for pkg in ${depsHostHost[@]} ${depsHostHostPropagated[@]}; do - findInputs "$pkg" 0 0 -done -for pkg in ${buildInputs[@]} ${propagatedBuildInputs[@]} ; do - findInputs "$pkg" 0 1 -done -for pkg in ${depsTargetTarget[@]} ${depsTargetTargetPropagated[@]}; do - findInputs "$pkg" 1 1 -done -# Default inputs must be processed last -for pkg in ${defaultNativeBuildInputs[@]}; do - findInputs "$pkg" -1 0 -done -for pkg in ${defaultBuildInputs[@]}; do - findInputs "$pkg" 0 1 -done - -# Add package to the future PATH and run setup hooks -activatePackage() { - local pkg="$1" - local -r hostOffset="$2" - local -r targetOffset="$3" - - # Sanity check - (( hostOffset <= targetOffset )) || exit 1 - - if [ -f "$pkg" ]; then - source "$pkg" - fi - - # Only dependencies whose host platform is guaranteed to match the - # build platform are included here. That would be `depsBuild*`, - # and legacy `nativeBuildInputs`, in general. If we aren't cross - # compiling, however, everything can be put on the PATH. To ease - # the transition, we do include everything in that case. - # - # TODO(@Ericson2314): Don't special-case native compilation - if [[ -z "${strictDeps-}" || "$hostOffset" -le -1 ]]; then - addToSearchPath _PATH "$pkg/bin" - fi - - if (( hostOffset <= -1 )); then - addToSearchPath _XDG_DATA_DIRS "$pkg/share" - fi - - if [[ "$hostOffset" -eq 0 && -d "$pkg/bin" ]]; then - addToSearchPath _HOST_PATH "$pkg/bin" - fi - - if [[ -f "$pkg/nix-support/setup-hook" ]]; then - source "$pkg/nix-support/setup-hook" - fi -} - -_activatePkgs() { - local hostOffset targetOffset - local pkg - - for hostOffset in "${allPlatOffsets[@]}"; do - local pkgsVar="${pkgAccumVarVars[hostOffset + 1]}" - for targetOffset in "${allPlatOffsets[@]}"; do - (( hostOffset <= targetOffset )) || continue - local pkgsRef="${pkgsVar}[$targetOffset - $hostOffset]" - local pkgsSlice="${!pkgsRef}[@]" - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; do - activatePackage "$pkg" "$hostOffset" "$targetOffset" - done - done - done -} - -# Run the package setup hooks and build _PATH -_activatePkgs - -# Set the relevant environment variables to point to the build inputs -# found above. -# -# These `depOffset`s, beyond indexing the arrays, also tell the env -# hook what sort of dependency (ignoring propagatedness) is being -# passed to the env hook. In a real language, we'd append a closure -# with this information to the relevant env hook array, but bash -# doesn't have closures, so it's easier to just pass this in. -_addToEnv() { - local depHostOffset depTargetOffset - local pkg - - for depHostOffset in "${allPlatOffsets[@]}"; do - local hookVar="${pkgHookVarVars[depHostOffset + 1]}" - local pkgsVar="${pkgAccumVarVars[depHostOffset + 1]}" - for depTargetOffset in "${allPlatOffsets[@]}"; do - (( depHostOffset <= depTargetOffset )) || continue - local hookRef="${hookVar}[$depTargetOffset - $depHostOffset]" - if [[ -z "${strictDeps-}" ]]; then - - # Keep track of which packages we have visited before. - local visitedPkgs="" - - # Apply environment hooks to all packages during native - # compilation to ease the transition. - # - # TODO(@Ericson2314): Don't special-case native compilation - for pkg in \ - "${pkgsBuildBuild[@]}" \ - "${pkgsBuildHost[@]}" \ - "${pkgsBuildTarget[@]}" \ - "${pkgsHostHost[@]}" \ - "${pkgsHostTarget[@]}" \ - "${pkgsTargetTarget[@]}" - do - if [[ "$visitedPkgs" = *"$pkg"* ]]; then - continue - fi - runHook "${!hookRef}" "$pkg" - visitedPkgs+=" $pkg" - done - else - local pkgsRef="${pkgsVar}[$depTargetOffset - $depHostOffset]" - local pkgsSlice="${!pkgsRef}[@]" - for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; do - runHook "${!hookRef}" "$pkg" - done - fi - done - done -} - -# Run the package-specific hooks set by the setup-hook scripts. -_addToEnv - - -# Unset setup-specific declared variables -unset allPlatOffsets -unset pkgBuildAccumVars pkgHostAccumVars pkgTargetAccumVars pkgAccumVarVars -unset pkgBuildHookVars pkgHostHookVars pkgTargetHookVars pkgHookVarVars -unset propagatedDepFilesVars - - -_addRpathPrefix "$out" - - -# Set the TZ (timezone) environment variable, otherwise commands like -# `date' will complain (e.g., `Tue Mar 9 10:01:47 Local time zone must -# be set--see zic manual page 2004'). -export TZ=UTC - - -# Set the prefix. This is generally $out, but it can be overriden, -# for instance if we just want to perform a test build/install to a -# temporary location and write a build report to $out. -if [ -z "${prefix:-}" ]; then - prefix="$out"; -fi - -if [ "${useTempPrefix:-}" = 1 ]; then - prefix="$NIX_BUILD_TOP/tmp_prefix"; -fi - - -PATH="${_PATH-}${_PATH:+${PATH:+:}}$PATH" -HOST_PATH="${_HOST_PATH-}${_HOST_PATH:+${HOST_PATH:+:}}$HOST_PATH" -export XDG_DATA_DIRS="${_XDG_DATA_DIRS-}${_XDG_DATA_DIRS:+${XDG_DATA_DIRS:+:}}${XDG_DATA_DIRS-}" -if (( "${NIX_DEBUG:-0}" >= 1 )); then - echo "final path: $PATH" - echo "final host path: $HOST_PATH" - echo "final data dirs: $XDG_DATA_DIRS" -fi - -unset _PATH -unset _HOST_PATH -unset _XDG_DATA_DIRS - - -# Normalize the NIX_BUILD_CORES variable. The value might be 0, which -# means that we're supposed to try and auto-detect the number of -# available CPU cores at run-time. - -NIX_BUILD_CORES="${NIX_BUILD_CORES:-1}" -if ((NIX_BUILD_CORES <= 0)); then - guess=$(nproc 2>/dev/null || true) - ((NIX_BUILD_CORES = guess <= 0 ? 1 : guess)) -fi -export NIX_BUILD_CORES - - -# Prevent SSL libraries from using certificates in /etc/ssl, unless set explicitly. -# Leave it in impure shells for convenience. -if [[ -z "${NIX_SSL_CERT_FILE:-}" && "${IN_NIX_SHELL:-}" != "impure" ]]; then - export NIX_SSL_CERT_FILE=/no-cert-file.crt -fi -# Another variant left for compatibility. -if [[ -z "${SSL_CERT_FILE:-}" && "${IN_NIX_SHELL:-}" != "impure" ]]; then - export SSL_CERT_FILE=/no-cert-file.crt -fi - - -###################################################################### -# Textual substitution functions. - - -substituteStream() { - local var=$1 - local description=$2 - shift 2 - - while (( "$#" )); do - case "$1" in - --replace) - pattern="$2" - replacement="$3" - shift 3 - local savedvar - savedvar="${!var}" - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - if [ "$pattern" != "$replacement" ]; then - if [ "${!var}" == "$savedvar" ]; then - echo "substituteStream(): WARNING: pattern '$pattern' doesn't match anything in $description" >&2 - fi - fi - ;; - - --subst-var) - local varName="$2" - shift 2 - # check if the used nix attribute name is a valid bash name - if ! [[ "$varName" =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then - echo "substituteStream(): ERROR: substitution variables must be valid Bash names, \"$varName\" isn't." >&2 - return 1 - fi - if [ -z ${!varName+x} ]; then - echo "substituteStream(): ERROR: variable \$$varName is unset" >&2 - return 1 - fi - pattern="@$varName@" - replacement="${!varName}" - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - ;; - - --subst-var-by) - pattern="@$2@" - replacement="$3" - eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' - shift 3 - ;; - - *) - echo "substituteStream(): ERROR: Invalid command line argument: $1" >&2 - return 1 - ;; - esac - done - - printf "%s" "${!var}" -} - -# put the content of a file in a variable -# fail loudly if provided with a binary (containing null bytes) -consumeEntire() { - # read returns non-0 on EOF, so we want read to fail - if IFS='' read -r -d '' "$1" ; then - echo "consumeEntire(): ERROR: Input null bytes, won't process" >&2 - return 1 - fi -} - -substitute() { - local input="$1" - local output="$2" - shift 2 - - if [ ! -f "$input" ]; then - echo "substitute(): ERROR: file '$input' does not exist" >&2 - return 1 - fi - - local content - consumeEntire content < "$input" - - if [ -e "$output" ]; then chmod +w "$output"; fi - substituteStream content "file '$input'" "$@" > "$output" -} - -substituteInPlace() { - local -a fileNames=() - for arg in "$@"; do - if [[ "$arg" = "--"* ]]; then - break - fi - fileNames+=("$arg") - shift - done - - for file in "${fileNames[@]}"; do - substitute "$file" "$file" "$@" - done -} - -_allFlags() { - # export some local variables for the awk below - # so some substitutions such as name don't have to be in the env attrset - # when __structuredAttrs is enabled - export system pname name version - for varName in $(awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }'); do - if (( "${NIX_DEBUG:-0}" >= 1 )); then - printf "@%s@ -> %q\n" "${varName}" "${!varName}" - fi - args+=("--subst-var" "$varName") - done -} - -substituteAllStream() { - local -a args=() - _allFlags - - substituteStream "$1" "$2" "${args[@]}" -} - -# Substitute all environment variables that start with a lowercase character and -# are valid Bash names. -substituteAll() { - local input="$1" - local output="$2" - - local -a args=() - _allFlags - - substitute "$input" "$output" "${args[@]}" -} - - -substituteAllInPlace() { - local fileName="$1" - shift - substituteAll "$fileName" "$fileName" "$@" -} - - -###################################################################### -# What follows is the generic builder. - - -# This function is useful for debugging broken Nix builds. It dumps -# all environment variables to a file `env-vars' in the build -# directory. If the build fails and the `-K' option is used, you can -# then go to the build directory and source in `env-vars' to reproduce -# the environment used for building. -dumpVars() { - if [ "${noDumpEnvVars:-0}" != 1 ]; then - export 2>/dev/null >| "$NIX_BUILD_TOP/env-vars" || true - fi -} - - -# Utility function: echo the base name of the given path, with the -# prefix `HASH-' removed, if present. -stripHash() { - local strippedName casematchOpt=0 - # On separate line for `set -e` - strippedName="$(basename -- "$1")" - shopt -q nocasematch && casematchOpt=1 - shopt -u nocasematch - if [[ "$strippedName" =~ ^[a-z0-9]{32}- ]]; then - echo "${strippedName:33}" - else - echo "$strippedName" - fi - if (( casematchOpt )); then shopt -s nocasematch; fi -} - - -recordPropagatedDependencies() { - # Propagate dependencies into the development output. - declare -ra flatVars=( - # Build - depsBuildBuildPropagated - propagatedNativeBuildInputs - depsBuildTargetPropagated - # Host - depsHostHostPropagated - propagatedBuildInputs - # Target - depsTargetTargetPropagated - ) - declare -ra flatFiles=( - "${propagatedBuildDepFiles[@]}" - "${propagatedHostDepFiles[@]}" - "${propagatedTargetDepFiles[@]}" - ) - - local propagatedInputsIndex - for propagatedInputsIndex in "${!flatVars[@]}"; do - local propagatedInputsSlice="${flatVars[$propagatedInputsIndex]}[@]" - local propagatedInputsFile="${flatFiles[$propagatedInputsIndex]}" - - [[ "${!propagatedInputsSlice}" ]] || continue - - mkdir -p "${!outputDev}/nix-support" - # shellcheck disable=SC2086 - printWords ${!propagatedInputsSlice} > "${!outputDev}/nix-support/$propagatedInputsFile" - done -} - - -unpackCmdHooks+=(_defaultUnpack) -_defaultUnpack() { - local fn="$1" - local destination - - if [ -d "$fn" ]; then - - destination="$(stripHash "$fn")" - - if [ -e "$destination" ]; then - echo "Cannot copy $fn to $destination: destination already exists!" - echo "Did you specify two \"srcs\" with the same \"name\"?" - return 1 - fi - - # We can't preserve hardlinks because they may have been - # introduced by store optimization, which might break things - # in the build. - cp -pr --reflink=auto -- "$fn" "$destination" - - else - - case "$fn" in - *.tar.xz | *.tar.lzma | *.txz) - # Don't rely on tar knowing about .xz. - xz -d < "$fn" | tar xf - --warning=no-timestamp - ;; - *.tar | *.tar.* | *.tgz | *.tbz2 | *.tbz) - # GNU tar can automatically select the decompression method - # (info "(tar) gzip"). - tar xf "$fn" --warning=no-timestamp - ;; - *) - return 1 - ;; - esac - - fi -} - - -unpackFile() { - curSrc="$1" - echo "unpacking source archive $curSrc" - if ! runOneHook unpackCmd "$curSrc"; then - echo "do not know how to unpack source archive $curSrc" - exit 1 - fi -} - - -unpackPhase() { - runHook preUnpack - - if [ -z "${srcs:-}" ]; then - if [ -z "${src:-}" ]; then - # shellcheck disable=SC2016 - echo 'variable $src or $srcs should point to the source' - exit 1 - fi - srcs="$src" - fi - - local -a srcsArray - if [ -n "$__structuredAttrs" ]; then - srcsArray=( "${srcs[@]}" ) - else - srcsArray=( $srcs ) - fi - - # To determine the source directory created by unpacking the - # source archives, we record the contents of the current - # directory, then look below which directory got added. Yeah, - # it's rather hacky. - local dirsBefore="" - for i in *; do - if [ -d "$i" ]; then - dirsBefore="$dirsBefore $i " - fi - done - - # Unpack all source archives. - for i in "${srcsArray[@]}"; do - unpackFile "$i" - done - - # Find the source directory. - - # set to empty if unset - : "${sourceRoot=}" - - if [ -n "${setSourceRoot:-}" ]; then - runOneHook setSourceRoot - elif [ -z "$sourceRoot" ]; then - for i in *; do - if [ -d "$i" ]; then - case $dirsBefore in - *\ $i\ *) - ;; - *) - if [ -n "$sourceRoot" ]; then - echo "unpacker produced multiple directories" - exit 1 - fi - sourceRoot="$i" - ;; - esac - fi - done - fi - - if [ -z "$sourceRoot" ]; then - echo "unpacker appears to have produced no directories" - exit 1 - fi - - echo "source root is $sourceRoot" - - # By default, add write permission to the sources. This is often - # necessary when sources have been copied from other store - # locations. - if [ "${dontMakeSourcesWritable:-0}" != 1 ]; then - chmod -R u+w -- "$sourceRoot" - fi - - runHook postUnpack -} - - -patchPhase() { - runHook prePatch - - local -a patchesArray - if [ -n "$__structuredAttrs" ]; then - patchesArray=( ${patches:+"${patches[@]}"} ) - else - patchesArray=( ${patches:-} ) - fi - - for i in "${patchesArray[@]}"; do - echo "applying patch $i" - local uncompress=cat - case "$i" in - *.gz) - uncompress="gzip -d" - ;; - *.bz2) - uncompress="bzip2 -d" - ;; - *.xz) - uncompress="xz -d" - ;; - *.lzma) - uncompress="lzma -d" - ;; - esac - - local -a flagsArray - if [ -n "$__structuredAttrs" ]; then - flagsArray=( "${patchFlags[@]:--p1}" ) - else - # shellcheck disable=SC2086 - flagsArray=( ${patchFlags:--p1} ) - fi - # "2>&1" is a hack to make patch fail if the decompressor fails (nonexistent patch, etc.) - # shellcheck disable=SC2086 - $uncompress < "$i" 2>&1 | patch "${flagsArray[@]}" - done - - runHook postPatch -} - - -fixLibtool() { - local search_path - for flag in $NIX_LDFLAGS; do - case $flag in - -L*) - search_path+=" ${flag#-L}" - ;; - esac - done - - sed -i "$1" \ - -e "s^eval \(sys_lib_search_path=\).*^\1'$search_path'^" \ - -e 's^eval sys_lib_.+search_path=.*^^' -} - - -configurePhase() { - runHook preConfigure - - # set to empty if unset - : "${configureScript=}" - - if [[ -z "$configureScript" && -x ./configure ]]; then - configureScript=./configure - fi - - if [ -z "${dontFixLibtool:-}" ]; then - export lt_cv_deplibs_check_method="${lt_cv_deplibs_check_method-pass_all}" - local i - find . -iname "ltmain.sh" -print0 | while IFS='' read -r -d '' i; do - echo "fixing libtool script $i" - fixLibtool "$i" - done - - # replace `/usr/bin/file` with `file` in any `configure` - # scripts with vendored libtool code. Preserve mtimes to - # prevent some packages (e.g. libidn2) from spontaneously - # autoreconf'ing themselves - CONFIGURE_MTIME_REFERENCE=$(mktemp configure.mtime.reference.XXXXXX) - find . \ - -executable \ - -type f \ - -name configure \ - -exec grep -l 'GNU Libtool is free software; you can redistribute it and/or modify' {} \; \ - -exec touch -r {} "$CONFIGURE_MTIME_REFERENCE" \; \ - -exec sed -i s_/usr/bin/file_file_g {} \; \ - -exec touch -r "$CONFIGURE_MTIME_REFERENCE" {} \; - rm -f "$CONFIGURE_MTIME_REFERENCE" - fi - - if [[ -z "${dontAddPrefix:-}" && -n "$prefix" ]]; then - prependToVar configureFlags "${prefixKey:---prefix=}$prefix" - fi - - if [[ -f "$configureScript" ]]; then - # Add --disable-dependency-tracking to speed up some builds. - if [ -z "${dontAddDisableDepTrack:-}" ]; then - if grep -q dependency-tracking "$configureScript"; then - prependToVar configureFlags --disable-dependency-tracking - fi - fi - - # By default, disable static builds. - if [ -z "${dontDisableStatic:-}" ]; then - if grep -q enable-static "$configureScript"; then - prependToVar configureFlags --disable-static - fi - fi - fi - - if [ -n "$configureScript" ]; then - local -a flagsArray - _accumFlagsArray configureFlags configureFlagsArray - - echoCmd 'configure flags' "${flagsArray[@]}" - # shellcheck disable=SC2086 - $configureScript "${flagsArray[@]}" - unset flagsArray - else - echo "no configure script, doing nothing" - fi - - runHook postConfigure -} - - -buildPhase() { - runHook preBuild - - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom buildPhase, doing nothing" - else - foundMakefile=1 - - # shellcheck disable=SC2086 - local flagsArray=( - ${enableParallelBuilding:+-j${NIX_BUILD_CORES}} - SHELL=$SHELL - ) - _accumFlagsArray makeFlags makeFlagsArray buildFlags buildFlagsArray - - echoCmd 'build flags' "${flagsArray[@]}" - make ${makefile:+-f $makefile} "${flagsArray[@]}" - unset flagsArray - fi - - runHook postBuild -} - - -checkPhase() { - runHook preCheck - - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom checkPhase, doing nothing" - runHook postCheck - return - fi - - if [[ -z "${checkTarget:-}" ]]; then - #TODO(@oxij): should flagsArray influence make -n? - if make -n ${makefile:+-f $makefile} check >/dev/null 2>&1; then - checkTarget=check - elif make -n ${makefile:+-f $makefile} test >/dev/null 2>&1; then - checkTarget=test - fi - fi - - if [[ -z "${checkTarget:-}" ]]; then - echo "no check/test target in ${makefile:-Makefile}, doing nothing" - else - # Old bash empty array hack - # shellcheck disable=SC2086 - local flagsArray=( - ${enableParallelChecking:+-j${NIX_BUILD_CORES}} - SHELL=$SHELL - ) - - _accumFlagsArray makeFlags makeFlagsArray - if [ -n "$__structuredAttrs" ]; then - flagsArray+=( "${checkFlags[@]:-VERBOSE=y}" ) - else - flagsArray+=( ${checkFlags:-VERBOSE=y} ) - fi - _accumFlagsArray checkFlagsArray - flagsArray+=( ${checkTarget} ) - - echoCmd 'check flags' "${flagsArray[@]}" - make ${makefile:+-f $makefile} "${flagsArray[@]}" - - unset flagsArray - fi - - runHook postCheck -} - - -installPhase() { - runHook preInstall - - # Dont reuse 'foundMakefile' set in buildPhase, a makefile may have been created in buildPhase - if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then - echo "no Makefile or custom installPhase, doing nothing" - runHook postInstall - return - else - foundMakefile=1 - fi - - if [ -n "$prefix" ]; then - mkdir -p "$prefix" - fi - - # shellcheck disable=SC2086 - local flagsArray=( - ${enableParallelInstalling:+-j${NIX_BUILD_CORES}} - SHELL=$SHELL - ) - _accumFlagsArray makeFlags makeFlagsArray installFlags installFlagsArray - if [ -n "$__structuredAttrs" ]; then - flagsArray+=( "${installTargets[@]:-install}" ) - else - flagsArray+=( ${installTargets:-install} ) - fi - - echoCmd 'install flags' "${flagsArray[@]}" - make ${makefile:+-f $makefile} "${flagsArray[@]}" - unset flagsArray - - runHook postInstall -} - - -# The fixup phase performs generic, package-independent stuff, like -# stripping binaries, running patchelf and setting -# propagated-build-inputs. -fixupPhase() { - # Make sure everything is writable so "strip" et al. work. - local output - for output in $(getAllOutputNames); do - if [ -e "${!output}" ]; then chmod -R u+w "${!output}"; fi - done - - runHook preFixup - - # Apply fixup to each output. - local output - for output in $(getAllOutputNames); do - prefix="${!output}" runHook fixupOutput - done - - - # record propagated dependencies & setup hook into the development output. - recordPropagatedDependencies - - if [ -n "${setupHook:-}" ]; then - mkdir -p "${!outputDev}/nix-support" - substituteAll "$setupHook" "${!outputDev}/nix-support/setup-hook" - fi - - # TODO(@Ericson2314): Remove after https://github.com/NixOS/nixpkgs/pull/31414 - if [ -n "${setupHooks:-}" ]; then - mkdir -p "${!outputDev}/nix-support" - local hook - # have to use ${setupHooks[@]} without quotes because it needs to support setupHooks being a array or a whitespace separated string - # # values of setupHooks won't have spaces so it won't cause problems - # shellcheck disable=2068 - for hook in ${setupHooks[@]}; do - local content - consumeEntire content < "$hook" - substituteAllStream content "file '$hook'" >> "${!outputDev}/nix-support/setup-hook" - unset -v content - done - unset -v hook - fi - - # Propagate user-env packages into the output with binaries, TODO? - - if [ -n "${propagatedUserEnvPkgs:-}" ]; then - mkdir -p "${!outputBin}/nix-support" - # shellcheck disable=SC2086 - printWords $propagatedUserEnvPkgs > "${!outputBin}/nix-support/propagated-user-env-packages" - fi - - runHook postFixup -} - - -installCheckPhase() { - runHook preInstallCheck - - if [[ -z "${foundMakefile:-}" ]]; then - echo "no Makefile or custom installCheckPhase, doing nothing" - #TODO(@oxij): should flagsArray influence make -n? - elif [[ -z "${installCheckTarget:-}" ]] \ - && ! make -n ${makefile:+-f $makefile} "${installCheckTarget:-installcheck}" >/dev/null 2>&1; then - echo "no installcheck target in ${makefile:-Makefile}, doing nothing" - else - # Old bash empty array hack - # shellcheck disable=SC2086 - local flagsArray=( - ${enableParallelChecking:+-j${NIX_BUILD_CORES}} - SHELL=$SHELL - ) - - _accumFlagsArray makeFlags makeFlagsArray \ - installCheckFlags installCheckFlagsArray - flagsArray+=( ${installCheckTarget:-installcheck} ) - - echoCmd 'installcheck flags' "${flagsArray[@]}" - make ${makefile:+-f $makefile} "${flagsArray[@]}" - unset flagsArray - fi - - runHook postInstallCheck -} - - -distPhase() { - runHook preDist - - local flagsArray=() - _accumFlagsArray distFlags distFlagsArray - flagsArray+=( ${distTarget:-dist} ) - - echo 'dist flags: %q' "${flagsArray[@]}" - make ${makefile:+-f $makefile} "${flagsArray[@]}" - - if [ "${dontCopyDist:-0}" != 1 ]; then - mkdir -p "$out/tarballs" - - # Note: don't quote $tarballs, since we explicitly permit - # wildcards in there. - # shellcheck disable=SC2086 - cp -pvd ${tarballs[*]:-*.tar.gz} "$out/tarballs" - fi - - runHook postDist -} - - -showPhaseHeader() { - local phase="$1" - case "$phase" in - unpackPhase) echo "unpacking sources";; - patchPhase) echo "patching sources";; - configurePhase) echo "configuring";; - buildPhase) echo "building";; - checkPhase) echo "running tests";; - installPhase) echo "installing";; - fixupPhase) echo "post-installation fixup";; - installCheckPhase) echo "running install tests";; - *) echo "$phase";; - esac -} - - -showPhaseFooter() { - local phase="$1" - local startTime="$2" - local endTime="$3" - local delta=$(( endTime - startTime )) - (( delta < 30 )) && return - - local H=$((delta/3600)) - local M=$((delta%3600/60)) - local S=$((delta%60)) - echo -n "$phase completed in " - (( H > 0 )) && echo -n "$H hours " - (( M > 0 )) && echo -n "$M minutes " - echo "$S seconds" -} - - -genericBuild() { - # variable used by our gzip wrapper to add -n. - # gzip is in common-path.nix and is added to nix-shell but we only want to change its behaviour in nix builds. do not move to a setupHook in gzip. - export GZIP_NO_TIMESTAMPS=1 - - if [ -f "${buildCommandPath:-}" ]; then - source "$buildCommandPath" - return - fi - if [ -n "${buildCommand:-}" ]; then - eval "$buildCommand" - return - fi - - if [ -z "${phases[*]:-}" ]; then - phases="${prePhases[*]:-} unpackPhase patchPhase ${preConfigurePhases[*]:-} \ - configurePhase ${preBuildPhases[*]:-} buildPhase checkPhase \ - ${preInstallPhases[*]:-} installPhase ${preFixupPhases[*]:-} fixupPhase installCheckPhase \ - ${preDistPhases[*]:-} distPhase ${postPhases[*]:-}"; - fi - - # The use of ${phases[*]} gives the correct behavior both with and - # without structured attrs. This relies on the fact that each - # phase name is space-free, which it must be because it's the name - # of either a shell variable or a shell function. - for curPhase in ${phases[*]}; do - if [[ "$curPhase" = unpackPhase && -n "${dontUnpack:-}" ]]; then continue; fi - if [[ "$curPhase" = patchPhase && -n "${dontPatch:-}" ]]; then continue; fi - if [[ "$curPhase" = configurePhase && -n "${dontConfigure:-}" ]]; then continue; fi - if [[ "$curPhase" = buildPhase && -n "${dontBuild:-}" ]]; then continue; fi - if [[ "$curPhase" = checkPhase && -z "${doCheck:-}" ]]; then continue; fi - if [[ "$curPhase" = installPhase && -n "${dontInstall:-}" ]]; then continue; fi - if [[ "$curPhase" = fixupPhase && -n "${dontFixup:-}" ]]; then continue; fi - if [[ "$curPhase" = installCheckPhase && -z "${doInstallCheck:-}" ]]; then continue; fi - if [[ "$curPhase" = distPhase && -z "${doDist:-}" ]]; then continue; fi - - if [[ -n $NIX_LOG_FD ]]; then - echo "@nix { \"action\": \"setPhase\", \"phase\": \"$curPhase\" }" >&"$NIX_LOG_FD" - fi - - showPhaseHeader "$curPhase" - dumpVars - - local startTime=$(date +"%s") - - # Evaluate the variable named $curPhase if it exists, otherwise the - # function named $curPhase. - eval "${!curPhase:-$curPhase}" - - local endTime=$(date +"%s") - - showPhaseFooter "$curPhase" "$startTime" "$endTime" - - if [ "$curPhase" = unpackPhase ]; then - # make sure we can cd into the directory - [ -z "${sourceRoot}" ] || chmod +x "${sourceRoot}" - - cd "${sourceRoot:-.}" - fi - done -} - - -# Execute the post-hooks. -runHook postHook - - -# Execute the global user hook (defined through the Nixpkgs -# configuration option ‘stdenv.userHook’). This can be used to set -# global compiler optimisation flags, for instance. -runHook userHook - - -dumpVars - - -# Restore the original options for nix-shell -[[ $__nixpkgs_setup_set_original == *e* ]] || set +e -[[ $__nixpkgs_setup_set_original == *u* ]] || set +u -unset -v __nixpkgs_setup_set_original diff --git a/pkgs/stdenv/linux/bootstrap-files/armv5tel.nix b/pkgs/stdenv/linux/bootstrap-files/armv5tel.nix deleted file mode 100644 index 0ac818b9f22..00000000000 --- a/pkgs/stdenv/linux/bootstrap-files/armv5tel.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - # Note: do not use Hydra as a source URL. Ask a member of the - # infrastructure team to mirror the job. - busybox = import { - # from job: https://hydra.nixos.org/job/nixpkgs/cross-trunk/bootstrapTools.armv5tel.dist/latest - # from build: https://hydra.nixos.org/build/114203025 - url = "http://tarballs.nixos.org/stdenv-linux/armv5tel/0eb0ddc4dbe3cd5415c6b6e657538eb809fc3778/busybox"; - # note: the following hash is different than the above hash, due to executable = true - sha256 = "0qxp2fsvs4phbc17g9npj9bsm20ylr8myi5pivcrmxm5qqflgi8d"; - executable = true; - }; - bootstrapTools = import { - # from job: https://hydra.nixos.org/job/nixpkgs/cross-trunk/bootstrapTools.armv5tel.dist/latest - # from build: https://hydra.nixos.org/build/114203025 - url = "http://tarballs.nixos.org/stdenv-linux/armv5tel/0eb0ddc4dbe3cd5415c6b6e657538eb809fc3778/bootstrap-tools.tar.xz"; - sha256 = "28327343db5ecc7f7811449ec69280d5867fa5d1d377cab0426beb9d4e059ed6"; - }; -} diff --git a/pkgs/stdenv/linux/bootstrap-files/armv7l.nix b/pkgs/stdenv/linux/bootstrap-files/armv7l.nix deleted file mode 100644 index 74d15845223..00000000000 --- a/pkgs/stdenv/linux/bootstrap-files/armv7l.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - # Note: do not use Hydra as a source URL. Ask a member of the - # infrastructure team to mirror the job. - busybox = import { - # from job: https://hydra.nixos.org/job/nixpkgs/cross-trunk/bootstrapTools.armv7l.dist/latest - # from build: https://hydra.nixos.org/build/114203060 - url = "http://tarballs.nixos.org/stdenv-linux/armv7l/0eb0ddc4dbe3cd5415c6b6e657538eb809fc3778/busybox"; - # note: the following hash is different than the above hash, due to executable = true - sha256 = "18qc6w2yykh7nvhjklsqb2zb3fjh4p9r22nvmgj32jr1mjflcsjn"; - executable = true; - }; - bootstrapTools = import { - # from job: https://hydra.nixos.org/job/nixpkgs/cross-trunk/bootstrapTools.armv7l.dist/latest - # from build: https://hydra.nixos.org/build/114203060 - url = "http://tarballs.nixos.org/stdenv-linux/armv7l/0eb0ddc4dbe3cd5415c6b6e657538eb809fc3778/bootstrap-tools.tar.xz"; - sha256 = "cf2968e8085cd3e6b3e9359624060ad24d253800ede48c5338179f6e0082c443"; - }; -} diff --git a/pkgs/stdenv/linux/bootstrap-files/loongson2f.nix b/pkgs/stdenv/linux/bootstrap-files/loongson2f.nix deleted file mode 100644 index 8e22a274974..00000000000 --- a/pkgs/stdenv/linux/bootstrap-files/loongson2f.nix +++ /dev/null @@ -1,44 +0,0 @@ -let - - fetch = { file, sha256 }: import { - url = "http://tarballs.nixos.org/stdenv-linux/loongson2f/r22849/${file}"; - inherit sha256; - executable = true; - }; - -in { - sh = fetch { - file = "sh"; - sha256 = "02jjl49wdq85pgh61aqf78yaknn9mi3rcspbpk7hs9c4mida2rhf"; - }; - - bzip2 = fetch { - file = "bzip2"; - sha256 = "1qn27y3amj9c6mnjk2kyb59y0d2w4yv16z9apaxx91hyq19gf29z"; - }; - - mkdir = fetch { - file = "mkdir"; - sha256 = "1vbp2bv9hkyb2fwl8hjrffpywn1wrl1kc4yrwi2lirawlnc6kymh"; - }; - - cpio = fetch { - file = "cpio"; - sha256 = "0mqxwdx0sl7skxx6049mk35l7d0fnibqsv174284kdp4p7iixwa0"; - }; - - ln = fetch { - file = "ln"; - sha256 = "05lwx8qvga3yv8xhs8bjgsfygsfrcxsfck0lxw6gsdckx25fgi7s"; - }; - - curl = fetch { - file = "curl.bz2"; - sha256 = "0iblnz4my54gryac04i64fn3ksi9g3dx96yjq93fj39z6kx6151c"; - }; - - bootstrapTools = { - url = "http://tarballs.nixos.org/stdenv-linux/loongson2f/r22849/cross-bootstrap-tools.cpio.bz2"; - sha256 = "00aavbk76qjj2gdlmpaaj66r8nzl4d7pyl8cv1gigyzgpbr5vv3j"; - }; -} diff --git a/pkgs/stdenv/native/default.nix b/pkgs/stdenv/native/default.nix deleted file mode 100644 index bae4ff2c93b..00000000000 --- a/pkgs/stdenv/native/default.nix +++ /dev/null @@ -1,170 +0,0 @@ -{ lib -, localSystem, crossSystem, config, overlays, crossOverlays ? [] -}: - -assert crossSystem == localSystem; - -let - inherit (localSystem) system; - - shell = - if system == "i686-freebsd" || system == "x86_64-freebsd" then "/usr/local/bin/bash" - else "/bin/bash"; - - path = - (lib.optionals (system == "i686-solaris") [ "/usr/gnu" ]) ++ - (lib.optionals (system == "i686-netbsd") [ "/usr/pkg" ]) ++ - (lib.optionals (system == "x86_64-solaris") [ "/opt/local/gnu" ]) ++ - ["/" "/usr" "/usr/local"]; - - prehookBase = '' - # Disable purity tests; it's allowed (even needed) to link to - # libraries outside the Nix store (like the C library). - export NIX_ENFORCE_PURITY= - export NIX_ENFORCE_NO_NATIVE="''${NIX_ENFORCE_NO_NATIVE-1}" - ''; - - prehookFreeBSD = '' - ${prehookBase} - - alias make=gmake - alias tar=gtar - alias sed=gsed - export MAKE=gmake - shopt -s expand_aliases - ''; - - prehookOpenBSD = '' - ${prehookBase} - - alias make=gmake - alias grep=ggrep - alias mv=gmv - alias ln=gln - alias sed=gsed - alias tar=gtar - - export MAKE=gmake - shopt -s expand_aliases - ''; - - prehookNetBSD = '' - ${prehookBase} - - alias make=gmake - alias sed=gsed - alias tar=gtar - export MAKE=gmake - shopt -s expand_aliases - ''; - - # prevent libtool from failing to find dynamic libraries - prehookCygwin = '' - ${prehookBase} - - shopt -s expand_aliases - export lt_cv_deplibs_check_method=pass_all - ''; - - extraNativeBuildInputsCygwin = [ - ../cygwin/all-buildinputs-as-runtimedep.sh - ../cygwin/wrap-exes-to-find-dlls.sh - ] ++ (if system == "i686-cygwin" then [ - ../cygwin/rebase-i686.sh - ] else if system == "x86_64-cygwin" then [ - ../cygwin/rebase-x86_64.sh - ] else []); - - # A function that builds a "native" stdenv (one that uses tools in - # /usr etc.). - makeStdenv = - { cc, fetchurl, extraPath ? [], overrides ? (self: super: { }), extraNativeBuildInputs ? [] }: - - import ../generic { - buildPlatform = localSystem; - hostPlatform = localSystem; - targetPlatform = localSystem; - - preHook = - if system == "i686-freebsd" then prehookFreeBSD else - if system == "x86_64-freebsd" then prehookFreeBSD else - if system == "i686-openbsd" then prehookOpenBSD else - if system == "i686-netbsd" then prehookNetBSD else - if system == "i686-cygwin" then prehookCygwin else - if system == "x86_64-cygwin" then prehookCygwin else - prehookBase; - - extraNativeBuildInputs = extraNativeBuildInputs ++ - (if system == "i686-cygwin" then extraNativeBuildInputsCygwin else - if system == "x86_64-cygwin" then extraNativeBuildInputsCygwin else - []); - - initialPath = extraPath ++ path; - - fetchurlBoot = fetchurl; - - inherit shell cc overrides config; - }; - -in - -[ - - ({}: rec { - __raw = true; - - stdenv = makeStdenv { - cc = null; - fetchurl = null; - }; - stdenvNoCC = stdenv; - - cc = let - nativePrefix = { # switch - i686-solaris = "/usr/gnu"; - x86_64-solaris = "/opt/local/gcc47"; - }.${system} or "/usr"; - in - import ../../build-support/cc-wrapper { - name = "cc-native"; - nativeTools = true; - nativeLibc = true; - inherit lib nativePrefix; - bintools = import ../../build-support/bintools-wrapper { - name = "bintools"; - inherit lib stdenvNoCC nativePrefix; - nativeTools = true; - nativeLibc = true; - }; - inherit stdenvNoCC; - }; - - fetchurl = import ../../build-support/fetchurl { - inherit lib stdenvNoCC; - # Curl should be in /usr/bin or so. - curl = null; - }; - - }) - - # First build a stdenv based only on tools outside the store. - (prevStage: { - inherit config overlays; - stdenv = makeStdenv { - inherit (prevStage) cc fetchurl; - } // { inherit (prevStage) fetchurl; }; - }) - - # Using that, build a stdenv that adds the ‘xz’ command (which most systems - # don't have, so we mustn't rely on the native environment providing it). - (prevStage: { - inherit config overlays; - stdenv = makeStdenv { - inherit (prevStage.stdenv) cc fetchurl; - extraPath = [ prevStage.xz ]; - overrides = self: super: { inherit (prevStage) xz; }; - extraNativeBuildInputs = if localSystem.isLinux then [ prevStage.patchelf ] else []; - }; - }) - -] diff --git a/pkgs/stdenv/nix/default.nix b/pkgs/stdenv/nix/default.nix deleted file mode 100644 index e9e9936ccd8..00000000000 --- a/pkgs/stdenv/nix/default.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ lib -, crossSystem, localSystem, config, overlays -, bootStages -, ... -}: - -assert crossSystem == localSystem; - -bootStages ++ [ - (prevStage: { - inherit config overlays; - - stdenv = import ../generic rec { - inherit config; - - inherit (prevStage.stdenv) buildPlatform hostPlatform targetPlatform; - - preHook = '' - export NIX_ENFORCE_PURITY="''${NIX_ENFORCE_PURITY-1}" - export NIX_ENFORCE_NO_NATIVE="''${NIX_ENFORCE_NO_NATIVE-1}" - export NIX_IGNORE_LD_THROUGH_GCC=1 - ''; - - initialPath = (import ../generic/common-path.nix) { pkgs = prevStage; }; - - cc = import ../../build-support/cc-wrapper { - inherit lib; - nativeTools = false; - nativePrefix = lib.optionalString hostPlatform.isSunOS "/usr"; - nativeLibc = true; - inherit (prevStage) stdenvNoCC binutils coreutils gnugrep; - cc = prevStage.gcc.cc; - isGNU = true; - shell = prevStage.bash + "/bin/sh"; - }; - - shell = prevStage.bash + "/bin/sh"; - - fetchurlBoot = prevStage.stdenv.fetchurlBoot; - - overrides = self: super: { - inherit cc; - inherit (cc) binutils; - inherit (prevStage) - gzip bzip2 xz bash coreutils diffutils findutils gawk - gnumake gnused gnutar gnugrep gnupatch perl; - }; - }; - }) -] diff --git a/pkgs/stdenv/tests/succeedOnFailure.nix b/pkgs/stdenv/tests/succeedOnFailure.nix deleted file mode 100644 index fef7f178699..00000000000 --- a/pkgs/stdenv/tests/succeedOnFailure.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ stdenv }: - -stdenv.mkDerivation { - name = "stdenv-test-succeedOnFailure"; - - succeedOnFailure = true; - - passAsFile = [ "buildCommand" ]; - buildCommand = '' - mkdir $out - echo foo > $out/foo - exit 1 - ''; -} diff --git a/pkgs/test/cc-wrapper/cc-main.c b/pkgs/test/cc-wrapper/cc-main.c deleted file mode 100644 index 06f28bc33c6..00000000000 --- a/pkgs/test/cc-wrapper/cc-main.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main(int argc, char **argv) -{ - fprintf(stderr, "ok\n"); - return 0; -} diff --git a/pkgs/test/cc-wrapper/cflags-main.c b/pkgs/test/cc-wrapper/cflags-main.c deleted file mode 100644 index 9491232b538..00000000000 --- a/pkgs/test/cc-wrapper/cflags-main.c +++ /dev/null @@ -1,10 +0,0 @@ -#include -#include - -int main(int argc, char **argv) -{ - if (foo() != 42) - return 1; - fprintf(stderr, "ok\n"); - return 0; -} diff --git a/pkgs/test/cc-wrapper/core-foundation-main.c b/pkgs/test/cc-wrapper/core-foundation-main.c deleted file mode 100644 index fb3bd312619..00000000000 --- a/pkgs/test/cc-wrapper/core-foundation-main.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main(int argc, char** argv) -{ - CFShow(CFSTR("ok")); - return 0; -} diff --git a/pkgs/test/cc-wrapper/cxx-main.cc b/pkgs/test/cc-wrapper/cxx-main.cc deleted file mode 100644 index 83f704617a4..00000000000 --- a/pkgs/test/cc-wrapper/cxx-main.cc +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main(int argc, char **argv) -{ - std::cerr << "ok" << std::endl; - return 0; -} diff --git a/pkgs/test/cc-wrapper/default.nix b/pkgs/test/cc-wrapper/default.nix deleted file mode 100644 index 6fd7d9f45db..00000000000 --- a/pkgs/test/cc-wrapper/default.nix +++ /dev/null @@ -1,81 +0,0 @@ -{ lib, stdenv, glibc, buildPackages }: - -let - # Sanitizers are not supported on Darwin. - # Sanitizer headers aren't available in older libc++ stdenvs due to a bug - sanitizersWorking = (stdenv.buildPlatform == stdenv.hostPlatform) && !stdenv.isDarwin && !stdenv.hostPlatform.isMusl && ( - (stdenv.cc.isClang && lib.versionAtLeast (lib.getVersion stdenv.cc.name) "5.0.0") - || (stdenv.cc.isGNU && stdenv.isLinux) - ); - staticLibc = lib.optionalString (stdenv.hostPlatform.libc == "glibc") "-L ${glibc.static}/lib"; - emulator = stdenv.hostPlatform.emulator buildPackages; -in stdenv.mkDerivation { - name = "cc-wrapper-test"; - - buildCommand = '' - NIX_DEBUG=1 $CC -v - NIX_DEBUG=1 $CXX -v - - printf "checking whether compiler builds valid C binaries... " >&2 - $CC -o cc-check ${./cc-main.c} - ${emulator} ./cc-check - - printf "checking whether compiler builds valid C++ binaries... " >&2 - $CXX -o cxx-check ${./cxx-main.cc} - ${emulator} ./cxx-check - - ${lib.optionalString (stdenv.isDarwin && stdenv.cc.isClang) '' - printf "checking whether compiler can build with CoreFoundation.framework... " >&2 - mkdir -p foo/lib - $CC -framework CoreFoundation -o core-foundation-check ${./core-foundation-main.c} - ${emulator} ./core-foundation-check - ''} - - - ${lib.optionalString (!stdenv.isDarwin) '' - printf "checking whether compiler builds valid static C binaries... " >&2 - $CC ${staticLibc} -static -o cc-static ${./cc-main.c} - ${emulator} ./cc-static - ${lib.optionalString (stdenv.cc.isGNU && lib.versionAtLeast (lib.getVersion stdenv.cc.name) "8.0.0") '' - printf "checking whether compiler builds valid static pie C binaries... " >&2 - $CC ${staticLibc} -static-pie -o cc-static-pie ${./cc-main.c} - ${emulator} ./cc-static-pie - ''} - ''} - - printf "checking whether compiler uses NIX_CFLAGS_COMPILE... " >&2 - mkdir -p foo/include - cp ${./foo.c} foo/include/foo.h - NIX_CFLAGS_COMPILE="-Ifoo/include -DVALUE=42" $CC -o cflags-check ${./cflags-main.c} - ${emulator} ./cflags-check - - printf "checking whether compiler uses NIX_LDFLAGS... " >&2 - mkdir -p foo/lib - $CC -shared \ - ${lib.optionalString stdenv.isDarwin "-Wl,-install_name,@rpath/libfoo.dylib"} \ - -DVALUE=42 \ - -o foo/lib/libfoo${stdenv.hostPlatform.extensions.sharedLibrary} \ - ${./foo.c} - - NIX_LDFLAGS="-L$NIX_BUILD_TOP/foo/lib -rpath $NIX_BUILD_TOP/foo/lib" $CC -lfoo -o ldflags-check ${./ldflags-main.c} - ${emulator} ./ldflags-check - - printf "Check whether -nostdinc and -nostdinc++ is handled correctly" >&2 - mkdir -p std-include - cp ${./stdio.h} std-include/stdio.h - NIX_DEBUG=1 $CC -I std-include -nostdinc -o nostdinc-main ${./nostdinc-main.c} - ${emulator} ./nostdinc-main - $CXX -I std-include -nostdinc++ -o nostdinc-main++ ${./nostdinc-main.c} - ${emulator} ./nostdinc-main++ - - ${lib.optionalString sanitizersWorking '' - printf "checking whether sanitizers are fully functional... ">&2 - $CC -o sanitizers -fsanitize=address,undefined ${./sanitizers.c} - ASAN_OPTIONS=use_sigaltstack=0 ${emulator} ./sanitizers - ''} - - touch $out - ''; - - meta.platforms = lib.platforms.all; -} diff --git a/pkgs/test/cc-wrapper/foo.c b/pkgs/test/cc-wrapper/foo.c deleted file mode 100644 index 8be674be310..00000000000 --- a/pkgs/test/cc-wrapper/foo.c +++ /dev/null @@ -1,4 +0,0 @@ -unsigned int foo(void) -{ - return VALUE; -} diff --git a/pkgs/test/cc-wrapper/ldflags-main.c b/pkgs/test/cc-wrapper/ldflags-main.c deleted file mode 100644 index 89832b3bbad..00000000000 --- a/pkgs/test/cc-wrapper/ldflags-main.c +++ /dev/null @@ -1,12 +0,0 @@ -#include - -extern unsigned int foo(void); - -int main(int argc, char **argv) -{ - if (foo() != 42) { - return 1; - } - fprintf(stderr, "ok\n"); - return 0; -} diff --git a/pkgs/test/cc-wrapper/multilib.nix b/pkgs/test/cc-wrapper/multilib.nix deleted file mode 100644 index 828ad67f6c8..00000000000 --- a/pkgs/test/cc-wrapper/multilib.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ lib, stdenv }: - -stdenv.mkDerivation { - name = "cc-multilib-test"; - - # XXX: "depend" on cc-wrapper test? - - # TODO: Have tests report pointer size or something; ensure they are what we asked for - buildCommand = '' - NIX_DEBUG=1 $CC -v - NIX_DEBUG=1 $CXX -v - - printf "checking whether compiler builds valid C binaries... " >&2 - $CC -o cc-check ${./cc-main.c} - ./cc-check - - printf "checking whether compiler builds valid 32bit C binaries... " >&2 - $CC -m32 -o c32-check ${./cc-main.c} - ./c32-check - - printf "checking whether compiler builds valid 64bit C binaries... " >&2 - $CC -m64 -o c64-check ${./cc-main.c} - ./c64-check - - printf "checking whether compiler builds valid 32bit C++ binaries... " >&2 - $CXX -m32 -o cxx32-check ${./cxx-main.cc} - ./cxx32-check - - printf "checking whether compiler builds valid 64bit C++ binaries... " >&2 - $CXX -m64 -o cxx64-check ${./cxx-main.cc} - ./cxx64-check - - touch $out - ''; - - meta.platforms = lib.platforms.x86_64; -} diff --git a/pkgs/test/cc-wrapper/nostdinc-main.c b/pkgs/test/cc-wrapper/nostdinc-main.c deleted file mode 100644 index f71d155b1b2..00000000000 --- a/pkgs/test/cc-wrapper/nostdinc-main.c +++ /dev/null @@ -1,8 +0,0 @@ -// This one should not come from libc because of -nostdinc -#include - -int main(int argc, char *argv[]) { - // provided by our own stdio.h - foo(); - return 0; -} diff --git a/pkgs/test/cc-wrapper/sanitizers.c b/pkgs/test/cc-wrapper/sanitizers.c deleted file mode 100644 index 93dd78a903c..00000000000 --- a/pkgs/test/cc-wrapper/sanitizers.c +++ /dev/null @@ -1,8 +0,0 @@ -#include -#include - -int main(int argc, char **argv) -{ - fprintf(stderr, "ok\n"); - return 0; -} diff --git a/pkgs/test/cc-wrapper/stdio.h b/pkgs/test/cc-wrapper/stdio.h deleted file mode 100644 index 4bddf1d9d48..00000000000 --- a/pkgs/test/cc-wrapper/stdio.h +++ /dev/null @@ -1 +0,0 @@ -static void foo(void) {} diff --git a/pkgs/test/config.nix b/pkgs/test/config.nix deleted file mode 100644 index 734e1aace14..00000000000 --- a/pkgs/test/config.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ lib, ... }: -lib.recurseIntoAttrs { - - # https://github.com/NixOS/nixpkgs/issues/175196 - allowPkgsInPermittedInsecurePackages = - let pkgs = import ../.. { - config = { - permittedInsecurePackages = - tempAllow pkgs.authy "2.1.0" [ "electron-9.4.4" ]; - }; - }; - # A simplification of `tempAllow` that doesn't check the version, but - # has the same strictness characteristics. Actually checking a version - # here would add undue maintenance. - # - # Original: - # tempAllow = p: v: pa: - # lib.optionals (lib.assertMsg (p.version == v) "${p.name} is no longer at version ${v}, consider removing the tempAllow") pa; - # - tempAllow = p: v: pa: builtins.seq v builtins.seq p.version pa; - - in pkgs.hello; - -} diff --git a/pkgs/test/coq/default.nix b/pkgs/test/coq/default.nix deleted file mode 100644 index cf59dd473b4..00000000000 --- a/pkgs/test/coq/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ lib, callPackage }: - -lib.recurseIntoAttrs { - overrideCoqDerivation = callPackage ./overrideCoqDerivation { }; -} - diff --git a/pkgs/test/coq/overrideCoqDerivation/default.nix b/pkgs/test/coq/overrideCoqDerivation/default.nix deleted file mode 100644 index c251c498e60..00000000000 --- a/pkgs/test/coq/overrideCoqDerivation/default.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ lib, coq, mkCoqPackages, runCommand }: - -let - - # This is just coq, but with dontFilter set to true. We need to set - # dontFilter to true here so that _all_ packages are visibile in coqPackages. - # There may be some versions of the top-level coq and coqPackages that don't - # build QuickChick, which is what we are using for this test below. - coqWithAllPackages = coq // { dontFilter = true; }; - - coqPackages = mkCoqPackages coqWithAllPackages; - - # This is the main test. This uses overrideCoqDerivation to - # override arguments to mkCoqDerivation. - # - # Here, we override the defaultVersion and release arguments to - # mkCoqDerivation. - overriddenQuickChick = - coqPackages.lib.overrideCoqDerivation - { - defaultVersion = "9999"; - release."9999".sha256 = lib.fakeSha256; - } - coqPackages.QuickChick; -in - -runCommand - "coq-overrideCoqDerivation-test-0.1" - { meta.maintainers = with lib.maintainers; [cdepillabout]; } - '' - # Confirm that the computed version number for the overridden QuickChick does - # actually become 9999, as set above. - if [ "${overriddenQuickChick.version}" -eq "9999" ]; then - echo "overriddenQuickChick version was successfully set to 9999" - touch $out - else - echo "ERROR: overriddenQuickChick version was supposed to be 9999, but was actually: ${overriddenQuickChick.version}" - exit 1 - fi - '' diff --git a/pkgs/test/cross/default.nix b/pkgs/test/cross/default.nix deleted file mode 100644 index beb64df1957..00000000000 --- a/pkgs/test/cross/default.nix +++ /dev/null @@ -1,113 +0,0 @@ -{ pkgs, lib }: - -let - - testedSystems = lib.filterAttrs (name: value: let - platform = lib.systems.elaborate value; - in platform.isLinux || platform.isWindows - ) lib.systems.examples; - - getExecutable = pkgs: pkgFun: exec: - "${pkgFun pkgs}${exec}${pkgs.stdenv.hostPlatform.extensions.executable}"; - - compareTest = { emulator, pkgFun, hostPkgs, crossPkgs, exec, args ? [] }: let - pkgName = (pkgFun hostPkgs).name; - args' = lib.concatStringsSep " " args; - in crossPkgs.runCommand "test-${pkgName}-${crossPkgs.hostPlatform.config}" { - nativeBuildInputs = [ pkgs.dos2unix ]; - } '' - # Just in case we are using wine, get rid of that annoying extra - # stuff. - export WINEDEBUG=-all - - HOME=$(pwd) - mkdir -p $out - - # We need to remove whitespace, unfortunately - # Windows programs use \r but Unix programs use \n - - echo Running native-built program natively - - # find expected value natively - ${getExecutable hostPkgs pkgFun exec} ${args'} \ - | dos2unix > $out/expected - - echo Running cross-built program in emulator - - # run emulator to get actual value - ${emulator} ${getExecutable crossPkgs pkgFun exec} ${args'} \ - | dos2unix > $out/actual - - echo Comparing results... - - if [ "$(cat $out/actual)" != "$(cat $out/expected)" ]; then - echo "${pkgName} did not output expected value:" - cat $out/expected - echo "instead it output:" - cat $out/actual - exit 1 - else - echo "${pkgName} test passed" - echo "both produced output:" - cat $out/actual - fi - ''; - - mapMultiPlatformTest = crossSystemFun: test: lib.mapAttrs (name: system: test rec { - crossPkgs = import pkgs.path { - localSystem = { inherit (pkgs.stdenv.hostPlatform) config; }; - crossSystem = crossSystemFun system; - }; - - emulator = crossPkgs.hostPlatform.emulator pkgs; - - # Apply some transformation on windows to get dlls in the right - # place. Unfortunately mingw doesn’t seem to be able to do linking - # properly. - platformFun = pkg: if crossPkgs.hostPlatform.isWindows then - pkgs.buildEnv { - name = "${pkg.name}-winlinks"; - paths = [pkg] ++ pkg.buildInputs; - } else pkg; - }) testedSystems; - - tests = { - - file = {platformFun, crossPkgs, emulator}: compareTest { - inherit emulator crossPkgs; - hostPkgs = pkgs; - exec = "/bin/file"; - args = [ - "${pkgs.file}/share/man/man1/file.1.gz" - "${pkgs.dejavu_fonts}/share/fonts/truetype/DejaVuMathTeXGyre.ttf" - ]; - pkgFun = pkgs: platformFun pkgs.file; - }; - - hello = {platformFun, crossPkgs, emulator}: compareTest { - inherit emulator crossPkgs; - hostPkgs = pkgs; - exec = "/bin/hello"; - pkgFun = pkgs: pkgs.hello; - }; - - pkg-config = {platformFun, crossPkgs, emulator}: crossPkgs.runCommand - "test-pkg-config-${crossPkgs.hostPlatform.config}" - { - depsBuildBuild = [ crossPkgs.pkgsBuildBuild.pkg-config ]; - nativeBuildInputs = [ crossPkgs.pkgsBuildHost.pkg-config crossPkgs.buildPackages.zlib ]; - depsBuildTarget = [ crossPkgs.pkgsBuildTarget.pkg-config ]; - buildInputs = [ crossPkgs.zlib ]; - NIX_DEBUG = 7; - } '' - mkdir $out - ${crossPkgs.pkgsBuildBuild.pkg-config.targetPrefix}pkg-config --cflags zlib > "$out/for-build" - ${crossPkgs.pkgsBuildHost.pkg-config.targetPrefix}pkg-config --cflags zlib > "$out/for-host" - ! diff "$out/for-build" "$out/for-host" - ''; - }; - -in { - gcc = (lib.mapAttrs (_: mapMultiPlatformTest (system: system // {useLLVM = false;})) tests); - llvm = (lib.mapAttrs (_: mapMultiPlatformTest (system: system // {useLLVM = true;})) tests); -} diff --git a/pkgs/test/cuda/cuda-library-samples/extension.nix b/pkgs/test/cuda/cuda-library-samples/extension.nix deleted file mode 100644 index 4c721a9e9e1..00000000000 --- a/pkgs/test/cuda/cuda-library-samples/extension.nix +++ /dev/null @@ -1,3 +0,0 @@ -final: prev: { - cuda-library-samples = final.callPackage ./generic.nix { }; -} diff --git a/pkgs/test/cuda/cuda-library-samples/generic.nix b/pkgs/test/cuda/cuda-library-samples/generic.nix deleted file mode 100644 index e9a481c94a7..00000000000 --- a/pkgs/test/cuda/cuda-library-samples/generic.nix +++ /dev/null @@ -1,71 +0,0 @@ -{ lib, backendStdenv, fetchFromGitHub -, cmake, addOpenGLRunpath -, cudatoolkit -, cutensor -}: - -let - rev = "5aab680905d853bce0dbad4c488e4f7e9f7b2302"; - src = fetchFromGitHub { - owner = "NVIDIA"; - repo = "CUDALibrarySamples"; - inherit rev; - sha256 = "0gwgbkq05ygrfgg5hk07lmap7n7ampxv0ha1axrv8qb748ph81xs"; - }; - commonAttrs = { - version = lib.strings.substring 0 7 rev + "-" + lib.versions.majorMinor cudatoolkit.version; - nativeBuildInputs = [ cmake addOpenGLRunpath ]; - buildInputs = [ cudatoolkit ]; - postFixup = '' - for exe in $out/bin/*; do - addOpenGLRunpath $exe - done - ''; - meta = { - description = "examples of using libraries using CUDA"; - longDescription = '' - CUDA Library Samples contains examples demonstrating the use of - features in the math and image processing libraries cuBLAS, cuTENSOR, - cuSPARSE, cuSOLVER, cuFFT, cuRAND, NPP and nvJPEG. - ''; - license = lib.licenses.bsd3; - maintainers = with lib.maintainers; [ obsidian-systems-maintenance ]; - }; - }; -in - -{ - cublas = backendStdenv.mkDerivation (commonAttrs // { - pname = "cuda-library-samples-cublas"; - - src = "${src}/cuBLASLt"; - }); - - cusolver = backendStdenv.mkDerivation (commonAttrs // { - pname = "cuda-library-samples-cusolver"; - - src = "${src}/cuSOLVER"; - - sourceRoot = "cuSOLVER/gesv"; - }); - - cutensor = backendStdenv.mkDerivation (commonAttrs // { - pname = "cuda-library-samples-cutensor"; - - src = "${src}/cuTENSOR"; - - buildInputs = [ cutensor ]; - - cmakeFlags = [ - "-DCUTENSOR_EXAMPLE_BINARY_INSTALL_DIR=${builtins.placeholder "out"}/bin" - ]; - - # CUTENSOR_ROOT is double escaped - postPatch = '' - substituteInPlace CMakeLists.txt \ - --replace "\''${CUTENSOR_ROOT}/include" "${cutensor.dev}/include" - ''; - - CUTENSOR_ROOT = cutensor; - }); -} diff --git a/pkgs/test/cuda/cuda-samples/extension.nix b/pkgs/test/cuda/cuda-samples/extension.nix deleted file mode 100644 index 05861ee5e0e..00000000000 --- a/pkgs/test/cuda/cuda-samples/extension.nix +++ /dev/null @@ -1,23 +0,0 @@ -final: prev: let - - sha256 = { - "10.0" = "1zvh4xsdyc59m87brpcmssxsjlp9dkynh4asnkcmc3g94f53l0jw"; - "10.1" = "1s8ka0hznrni36ajhzf2gqpdrl8kd8fi047qijxks5l2abc093qd"; - "10.2" = "01p1innzgh9siacpld6nsqimj8jkg93rk4gj8q4crn62pa5vhd94"; - "11.0" = "1n3vjc8c7zdig2xgl5fppavrphqzhdiv9m9nk6smh4f99fwi0705"; - "11.1" = "1kjixk50i8y1bkiwbdn5lkv342crvkmbvy1xl5j3lsa1ica21kwh"; - "11.2" = "1p1qjvfbm28l933mmnln02rqrf0cy9kbpsyb488d1haiqzvrazl1"; - "11.3" = "0kbibb6pgz8j5iq6284axcnmycaha9bw8qlmdp6yfwmnahq1v0yz"; - "11.4" = "082dkk5y34wyvjgj2p5j1d00rk8xaxb9z0mhvz16bd469r1bw2qk"; - "11.5" = "sha256-AKRZbke0K59lakhTi8dX2cR2aBuWPZkiQxyKaZTvHrI="; - "11.6" = "sha256-AsLNmAplfuQbXg9zt09tXAuFJ524EtTYsQuUlV1tPkE="; - "11.7" = throw "The tag 11.7 of cuda-samples does not exist"; - "11.8" = "sha256-7+1P8+wqTKUGbCUBXGMDO9PkxYr2+PLDx9W2hXtXbuc="; - "12.0" = "sha256-Lj2kbdVFrJo5xPYPMiE4BS7Z8gpU5JLKXVJhZABUe/g="; - }.${prev.cudaVersion}; - -in { - cuda-samples = final.callPackage ./generic.nix { - inherit sha256; - }; -} diff --git a/pkgs/test/cuda/cuda-samples/generic.nix b/pkgs/test/cuda/cuda-samples/generic.nix deleted file mode 100644 index eeb3d6fcb52..00000000000 --- a/pkgs/test/cuda/cuda-samples/generic.nix +++ /dev/null @@ -1,60 +0,0 @@ -{ lib -, stdenv -, fetchFromGitHub -, fetchpatch -, addOpenGLRunpath -, cudatoolkit -, pkg-config -, sha256 -}: - -stdenv.mkDerivation rec { - pname = "cuda-samples"; - version = lib.versions.majorMinor cudatoolkit.version; - - src = fetchFromGitHub { - owner = "NVIDIA"; - repo = pname; - rev = "v${version}"; - inherit sha256; - }; - - nativeBuildInputs = [ pkg-config addOpenGLRunpath ]; - - buildInputs = [ cudatoolkit ]; - - # See https://github.com/NVIDIA/cuda-samples/issues/75. - patches = lib.optionals (version == "11.3") [ - (fetchpatch { - url = "https://github.com/NVIDIA/cuda-samples/commit/5c3ec60faeb7a3c4ad9372c99114d7bb922fda8d.patch"; - sha256 = "sha256-0XxdmNK9MPpHwv8+qECJTvXGlFxc+fIbta4ynYprfpU="; - }) - ]; - - enableParallelBuilding = true; - - preConfigure = '' - export CUDA_PATH=${cudatoolkit} - ''; - - installPhase = '' - runHook preInstall - - install -Dm755 -t $out/bin bin/${stdenv.hostPlatform.parsed.cpu.name}/${stdenv.hostPlatform.parsed.kernel.name}/release/* - - runHook postInstall - ''; - - postFixup = '' - for exe in $out/bin/*; do - addOpenGLRunpath $exe - done - ''; - - meta = { - description = "Samples for CUDA Developers which demonstrates features in CUDA Toolkit"; - # CUDA itself is proprietary, but these sample apps are not. - license = lib.licenses.bsd3; - maintainers = with lib.maintainers; [ obsidian-systems-maintenance ]; - }; -} diff --git a/pkgs/test/cuda/default.nix b/pkgs/test/cuda/default.nix deleted file mode 100644 index 7989e4e2b7d..00000000000 --- a/pkgs/test/cuda/default.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ callPackage }: - -rec { - cuda-samplesPackages = callPackage ./cuda-samples { }; - inherit (cuda-samplesPackages) - cuda-samples_cudatoolkit_10 - cuda-samples_cudatoolkit_10_0 - cuda-samples_cudatoolkit_10_1 - cuda-samples_cudatoolkit_10_2 - cuda-samples_cudatoolkit_11 - cuda-samples_cudatoolkit_11_0 - cuda-samples_cudatoolkit_11_1 - cuda-samples_cudatoolkit_11_2 - cuda-samples_cudatoolkit_11_3 - cuda-samples_cudatoolkit_11_4; - - cuda-library-samplesPackages = callPackage ./cuda-library-samples { }; - inherit (cuda-library-samplesPackages) - cuda-library-samples_cudatoolkit_10 - cuda-library-samples_cudatoolkit_10_1 - cuda-library-samples_cudatoolkit_10_2 - cuda-library-samples_cudatoolkit_11 - cuda-library-samples_cudatoolkit_11_0 - cuda-library-samples_cudatoolkit_11_1 - cuda-library-samples_cudatoolkit_11_2 - cuda-library-samples_cudatoolkit_11_3 - cuda-library-samples_cudatoolkit_11_4; -} diff --git a/pkgs/test/cue/default.nix b/pkgs/test/cue/default.nix deleted file mode 100644 index 2cc8bf34bb0..00000000000 --- a/pkgs/test/cue/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ writeCueValidator, runCommand, writeText, ... }: - -let - validator = writeCueValidator - (writeText "schema.cue" '' - #Def1: { - field1: string - } - '') - { document = "#Def1"; }; -in runCommand "cue-validation" {} '' - cat > valid.json < invalid.json </dev/null - touch $out - ''; - - localHasNoDirectReference = runCommand "localHasNoDirectReference" { - drvPath = builtins.unsafeDiscardOutputDependency localFromCabalSdist.drvPath; - } '' - grep -v ${./local} $drvPath >/dev/null - touch $out - ''; -} diff --git a/pkgs/test/haskell/cabalSdist/local/CHANGELOG.md b/pkgs/test/haskell/cabalSdist/local/CHANGELOG.md deleted file mode 100644 index 53cc3ae43d8..00000000000 --- a/pkgs/test/haskell/cabalSdist/local/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -# Revision history for local - -## 0.1.0.0 -- YYYY-mm-dd - -* First version. Released on an unsuspecting world. diff --git a/pkgs/test/haskell/cabalSdist/local/app/Main.hs b/pkgs/test/haskell/cabalSdist/local/app/Main.hs deleted file mode 100644 index 65ae4a05d5d..00000000000 --- a/pkgs/test/haskell/cabalSdist/local/app/Main.hs +++ /dev/null @@ -1,4 +0,0 @@ -module Main where - -main :: IO () -main = putStrLn "Hello, Haskell!" diff --git a/pkgs/test/haskell/cabalSdist/local/generated.nix b/pkgs/test/haskell/cabalSdist/local/generated.nix deleted file mode 100644 index bfa299962bc..00000000000 --- a/pkgs/test/haskell/cabalSdist/local/generated.nix +++ /dev/null @@ -1,12 +0,0 @@ -# nix run ../../../../..#cabal2nix -- ./. -{ mkDerivation, base, lib }: -mkDerivation { - pname = "local"; - version = "0.1.0.0"; - src = ./.; - isLibrary = false; - isExecutable = true; - executableHaskellDepends = [ base ]; - description = "Nixpkgs test case"; - license = lib.licenses.mit; -} diff --git a/pkgs/test/haskell/cabalSdist/local/local.cabal b/pkgs/test/haskell/cabalSdist/local/local.cabal deleted file mode 100644 index 1670aa3af63..00000000000 --- a/pkgs/test/haskell/cabalSdist/local/local.cabal +++ /dev/null @@ -1,13 +0,0 @@ -cabal-version: 2.4 -name: local -version: 0.1.0.0 - -synopsis: Nixpkgs test case -license: MIT -extra-source-files: CHANGELOG.md - -executable local - main-is: Main.hs - build-depends: base - hs-source-dirs: app - default-language: Haskell2010 diff --git a/pkgs/test/haskell/default.nix b/pkgs/test/haskell/default.nix deleted file mode 100644 index 337d2811c65..00000000000 --- a/pkgs/test/haskell/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ lib, callPackage }: - -lib.recurseIntoAttrs { - shellFor = callPackage ./shellFor { }; - cabalSdist = callPackage ./cabalSdist { }; - documentationTarball = callPackage ./documentationTarball { }; - setBuildTarget = callPackage ./setBuildTarget { }; - writers = callPackage ./writers { }; -} diff --git a/pkgs/test/haskell/documentationTarball/default.nix b/pkgs/test/haskell/documentationTarball/default.nix deleted file mode 100644 index 33751028101..00000000000 --- a/pkgs/test/haskell/documentationTarball/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ pkgs, haskellPackages }: - -let - drv = haskellPackages.vector; - docs = pkgs.haskell.lib.compose.documentationTarball drv; - -in pkgs.runCommand "test haskell.lib.compose.documentationTarball" { - meta = { - inherit (docs.meta) platforms; - }; -} '' - tar xvzf "${docs}/${drv.name}-docs.tar.gz" - - # Check for Haddock html - find "${drv.name}-docs" | grep -q "Data-Vector.html" - - # Check for source html - find "${drv.name}-docs" | grep -q "src/Data.Vector.html" - - touch "$out" -'' diff --git a/pkgs/test/haskell/setBuildTarget/Bar.hs b/pkgs/test/haskell/setBuildTarget/Bar.hs deleted file mode 100644 index 010014082c7..00000000000 --- a/pkgs/test/haskell/setBuildTarget/Bar.hs +++ /dev/null @@ -1,4 +0,0 @@ -module Main where - -main :: IO () -main = putStrLn "Hello, Bar!" diff --git a/pkgs/test/haskell/setBuildTarget/Foo.hs b/pkgs/test/haskell/setBuildTarget/Foo.hs deleted file mode 100644 index fec7bb11fe6..00000000000 --- a/pkgs/test/haskell/setBuildTarget/Foo.hs +++ /dev/null @@ -1,4 +0,0 @@ -module Main where - -main :: IO () -main = putStrLn "Hello, Foo!" diff --git a/pkgs/test/haskell/setBuildTarget/Setup.hs b/pkgs/test/haskell/setBuildTarget/Setup.hs deleted file mode 100644 index 9a994af677b..00000000000 --- a/pkgs/test/haskell/setBuildTarget/Setup.hs +++ /dev/null @@ -1,2 +0,0 @@ -import Distribution.Simple -main = defaultMain diff --git a/pkgs/test/haskell/setBuildTarget/default.nix b/pkgs/test/haskell/setBuildTarget/default.nix deleted file mode 100644 index f0c78c51044..00000000000 --- a/pkgs/test/haskell/setBuildTarget/default.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ pkgs, haskellPackages }: - -let - # This can be regenerated by running `cabal2nix .` in the current directory. - pkgDef = - { mkDerivation, base, lib }: - mkDerivation { - pname = "haskell-setBuildTarget"; - version = "0.1.0.0"; - src = ./.; - isLibrary = false; - isExecutable = true; - executableHaskellDepends = [ base ]; - license = lib.licenses.bsd3; - }; - - drv = haskellPackages.callPackage pkgDef {}; - - test = target: excluded: - let only = pkgs.haskell.lib.compose.setBuildTarget target drv; - in '' - if [[ ! -f "${only}/bin/${target}" ]]; then - echo "${target} was not built" - exit 1 - fi - - if [[ -f "${only}/bin/${excluded}" ]]; then - echo "${excluded} was built, when it should not have been" - exit 1 - fi - ''; - -in -pkgs.runCommand "test haskell.lib.compose.setBuildTarget" { - meta = { - inherit (drv.meta) platforms; - }; -} '' - ${test "foo" "bar"} - ${test "bar" "foo"} - touch "$out" -'' - diff --git a/pkgs/test/haskell/setBuildTarget/haskell-setBuildTarget.cabal b/pkgs/test/haskell/setBuildTarget/haskell-setBuildTarget.cabal deleted file mode 100644 index 7395e139451..00000000000 --- a/pkgs/test/haskell/setBuildTarget/haskell-setBuildTarget.cabal +++ /dev/null @@ -1,16 +0,0 @@ -cabal-version: >=1.10 -name: haskell-setBuildTarget -version: 0.1.0.0 -author: Isaac Shapira -maintainer: fresheyeball@protonmail.com -build-type: Simple - -executable foo - main-is: Foo.hs - build-depends: base - default-language: Haskell2010 - -executable bar - main-is: Bar.hs - build-depends: base - default-language: Haskell2010 diff --git a/pkgs/test/haskell/shellFor/default.nix b/pkgs/test/haskell/shellFor/default.nix deleted file mode 100644 index aa06ff6e52f..00000000000 --- a/pkgs/test/haskell/shellFor/default.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ lib, writeText, haskellPackages, cabal-install }: - -(haskellPackages.shellFor { - packages = p: [ p.constraints p.linear ]; - extraDependencies = p: { libraryHaskellDepends = [ p.releaser ]; }; - nativeBuildInputs = [ cabal-install ]; - phases = [ "unpackPhase" "buildPhase" "installPhase" ]; - unpackPhase = '' - sourceRoot=$(pwd)/scratch - mkdir -p "$sourceRoot" - cd "$sourceRoot" - tar -xf ${haskellPackages.constraints.src} - tar -xf ${haskellPackages.linear.src} - cp ${writeText "cabal.project" "packages: constraints* linear*"} cabal.project - ''; - buildPhase = '' - export HOME=$(mktemp -d) - mkdir -p $HOME/.cabal - touch $HOME/.cabal/config - - # Check extraDependencies.libraryHaskellDepends arg - ghci < doc/foo.1 - echo bar > doc/bar.2.gz - echo baz > doc/baz.3 - - installManPage doc/* - - cmp doc/foo.1 $out/share/man/man1/foo.1 - cmp doc/bar.2.gz $out/share/man/man2/bar.2.gz - cmp doc/baz.3 $out/share/man/man3/baz.3 - ''; - install-manpage-outputs = runTest "install-manpage-outputs" { - outputs = [ "out" "man" "devman" ]; - } '' - mkdir -p doc - echo foo > doc/foo.1 - echo bar > doc/bar.3 - - installManPage doc/* - - # assert they didn't go into $out - [[ ! -f $out/share/man/man1/foo.1 && ! -f $out/share/man/man3/bar.3 ]] - - # foo.1 alone went into man - cmp doc/foo.1 ''${!outputMan:?}/share/man/man1/foo.1 - [[ ! -f ''${!outputMan:?}/share/man/man3/bar.3 ]] - - # bar.3 alone went into devman - cmp doc/bar.3 ''${!outputDevman:?}/share/man/man3/bar.3 - [[ ! -f ''${!outputDevman:?}/share/man/man1/foo.1 ]] - - touch $out - ''; - - # installShellCompletion - - install-completion = runTest "install-completion" {} '' - echo foo > foo - echo bar > bar - echo baz > baz - echo qux > qux.zsh - echo quux > quux - - installShellCompletion --bash foo bar --zsh baz qux.zsh --fish quux - - cmp foo $out/share/bash-completion/completions/foo - cmp bar $out/share/bash-completion/completions/bar - cmp baz $out/share/zsh/site-functions/_baz - cmp qux.zsh $out/share/zsh/site-functions/_qux - cmp quux $out/share/fish/vendor_completions.d/quux - ''; - install-completion-output = runTest "install-completion-output" { - outputs = [ "out" "bin" ]; - } '' - echo foo > foo - - installShellCompletion --bash foo - - # assert it didn't go into $out - [[ ! -f $out/share/bash-completion/completions/foo ]] - - cmp foo ''${!outputBin:?}/share/bash-completion/completions/foo - - touch $out - ''; - install-completion-name = runTest "install-completion-name" {} '' - echo foo > foo - echo bar > bar - echo baz > baz - - installShellCompletion --bash --name foobar.bash foo --zsh --name _foobar bar --fish baz - - cmp foo $out/share/bash-completion/completions/foobar.bash - cmp bar $out/share/zsh/site-functions/_foobar - cmp baz $out/share/fish/vendor_completions.d/baz - ''; - install-completion-inference = runTest "install-completion-inference" {} '' - echo foo > foo.bash - echo bar > bar.zsh - echo baz > baz.fish - - installShellCompletion foo.bash bar.zsh baz.fish - - cmp foo.bash $out/share/bash-completion/completions/foo.bash - cmp bar.zsh $out/share/zsh/site-functions/_bar - cmp baz.fish $out/share/fish/vendor_completions.d/baz.fish - ''; - install-completion-cmd = runTest "install-completion-cmd" {} '' - echo foo > foo.bash - echo bar > bar.zsh - echo baz > baz.fish - echo qux > qux.fish - - installShellCompletion --cmd foobar --bash foo.bash --zsh bar.zsh --fish baz.fish --name qux qux.fish - - cmp foo.bash $out/share/bash-completion/completions/foobar.bash - cmp bar.zsh $out/share/zsh/site-functions/_foobar - cmp baz.fish $out/share/fish/vendor_completions.d/foobar.fish - cmp qux.fish $out/share/fish/vendor_completions.d/qux - ''; - install-completion-fifo = runTest "install-completion-fifo" {} '' - installShellCompletion \ - --bash --name foo.bash <(echo foo) \ - --zsh --name _foo <(echo bar) \ - --fish --name foo.fish <(echo baz) - - [[ $(<$out/share/bash-completion/completions/foo.bash) == foo ]] || { echo "foo.bash comparison failed"; exit 1; } - [[ $(<$out/share/zsh/site-functions/_foo) == bar ]] || { echo "_foo comparison failed"; exit 1; } - [[ $(<$out/share/fish/vendor_completions.d/foo.fish) == baz ]] || { echo "foo.fish comparison failed"; exit 1; } - ''; -} diff --git a/pkgs/test/kernel.nix b/pkgs/test/kernel.nix deleted file mode 100644 index 2ccd188b1ed..00000000000 --- a/pkgs/test/kernel.nix +++ /dev/null @@ -1,73 +0,0 @@ -# to run these tests: -# nix-instantiate --eval --strict . -A tests.kernel-config -# -# make sure to use NON EXISTING kernel settings else they may conflict with -# common-config.nix -{ lib, pkgs }: - -with lib; -with kernel; - -let - lts_kernel = pkgs.linuxPackages.kernel; - - # to see the result once the module transformed the lose structured config - getConfig = structuredConfig: - (lts_kernel.override { - structuredExtraConfig = structuredConfig; - }).configfile.structuredConfig; - - mandatoryVsOptionalConfig = mkMerge [ - { NIXOS_FAKE_USB_DEBUG = yes;} - { NIXOS_FAKE_USB_DEBUG = option yes; } - ]; - - freeformConfig = mkMerge [ - { NIXOS_FAKE_MMC_BLOCK_MINORS = freeform "32"; } # same as default, won't trigger any error - { NIXOS_FAKE_MMC_BLOCK_MINORS = freeform "64"; } # will trigger an error but the message is not great: - ]; - - mkDefaultWorksConfig = mkMerge [ - { "NIXOS_TEST_BOOLEAN" = yes; } - { "NIXOS_TEST_BOOLEAN" = lib.mkDefault no; } - ]; - - allOptionalRemainOptional = mkMerge [ - { NIXOS_FAKE_USB_DEBUG = option yes;} - { NIXOS_FAKE_USB_DEBUG = option yes;} - ]; - -in -runTests { - testEasy = { - expr = (getConfig { NIXOS_FAKE_USB_DEBUG = yes;}).NIXOS_FAKE_USB_DEBUG; - expected = { tristate = "y"; optional = false; freeform = null; }; - }; - - # mandatory flag should win over optional - testMandatoryCheck = { - expr = (getConfig mandatoryVsOptionalConfig).NIXOS_FAKE_USB_DEBUG.optional; - expected = false; - }; - - testYesWinsOverNo = { - expr = (getConfig mkDefaultWorksConfig)."NIXOS_TEST_BOOLEAN".tristate; - expected = "y"; - }; - - testAllOptionalRemainOptional = { - expr = (getConfig allOptionalRemainOptional)."NIXOS_FAKE_USB_DEBUG".optional; - expected = true; - }; - - # check that freeform options are unique - # Should trigger - # > The option `settings.NIXOS_FAKE_MMC_BLOCK_MINORS.freeform' has conflicting definitions, in `' and `' - testTreeform = let - res = builtins.tryEval ( (getConfig freeformConfig).NIXOS_FAKE_MMC_BLOCK_MINORS.freeform); - in { - expr = res.success; - expected = false; - }; - -} diff --git a/pkgs/test/ld-library-path/default.nix b/pkgs/test/ld-library-path/default.nix deleted file mode 100644 index 74c52cef253..00000000000 --- a/pkgs/test/ld-library-path/default.nix +++ /dev/null @@ -1,88 +0,0 @@ -{ lib, stdenv }: - -# This tests that libraries listed in LD_LIBRARY_PATH take precedence over those listed in RPATH. - -let - # A simple test library: libgreeting.so which exports a single function getGreeting() returning the good old hello greeting. - libgreeting = stdenv.mkDerivation { - name = "libgreeting"; - - code = '' - const char* getGreeting() { return "Hello, world!"; } - ''; - - unpackPhase = '' - echo "$code" > libgreeting.c - ''; - - installPhase = '' - mkdir -p $out/lib - $CC -c -fpic libgreeting.c - $CC -shared libgreeting.o -o $out/lib/libgreeting.so - ''; - }; - - # A variant of libgreeting.so that returns a different message. - libgoodbye = libgreeting.overrideAttrs (_: { - name = "libgoodbye"; - code = '' - const char* getGreeting() { return "Goodbye, world!"; } - ''; - }); - - # A simple consumer of libgreeting.so that just prints the greeting to stdout. - testProgram = stdenv.mkDerivation { - name = "greeting-test"; - - buildInputs = [ libgreeting ]; - - code = '' - #include - - extern const char* getGreeting(void); - - int main() { - puts(getGreeting()); - } - ''; - - unpackPhase = '' - echo "$code" > greeting-test.c - ''; - - installPhase = '' - mkdir -p $out/bin - $CC -c greeting-test.c - $CC greeting-test.o -lgreeting -o $out/bin/greeting-test - - # Now test the installed binaries right after compiling them. In particular, - # don't do this in installCheckPhase because fixupPhase has been run by then! - ( - export PATH=$out/bin - set -x - - # Verify that our unmodified binary works as expected. - [ "$(greeting-test)" = "Hello, world!" ] - - # And finally, test that a library in LD_LIBRARY_PATH takes precedence over the linked-in library. - [ "$(LD_LIBRARY_PATH=${libgoodbye}/lib greeting-test)" = "Goodbye, world!" ] - ) - ''; - - }; -in stdenv.mkDerivation { - name = "test-LD_LIBRARY_PATH"; - nativeBuildInputs = [ testProgram ]; - - buildCommand = '' - # And for good measure, repeat the tests again from a separate derivation, - # as fixupPhase done by the stdenv can (and has!) affect the result. - - [ "$(greeting-test)" = "Hello, world!" ] - [ "$(LD_LIBRARY_PATH=${libgoodbye}/lib greeting-test)" = "Goodbye, world!" ] - - touch $out - ''; - - meta.platforms = lib.platforms.linux; -} diff --git a/pkgs/test/macos-sierra-shared/default.nix b/pkgs/test/macos-sierra-shared/default.nix deleted file mode 100644 index 810d5d97829..00000000000 --- a/pkgs/test/macos-sierra-shared/default.nix +++ /dev/null @@ -1,90 +0,0 @@ -{ lib, clangStdenv, clang-sierraHack-stdenv, stdenvNoCC }: - -let - makeBigExe = stdenv: prefix: rec { - - count = 320; - - sillyLibs = lib.genList (i: stdenv.mkDerivation rec { - name = "${prefix}-fluff-${toString i}"; - unpackPhase = '' - src=$PWD - cat << 'EOF' > ${name}.c - unsigned int asdf_${toString i}(void) { - return ${toString i}; - } - EOF - ''; - buildPhase = '' - $CC -std=c99 -shared ${name}.c -o lib${name}.dylib -Wl,-install_name,$out/lib/lib${name}.dylib - ''; - installPhase = '' - mkdir -p "$out/lib" - mv lib${name}.dylib "$out/lib" - ''; - meta.platforms = lib.platforms.darwin; - }) count; - - finalExe = stdenv.mkDerivation { - name = "${prefix}-final-asdf"; - unpackPhase = '' - src=$PWD - cat << 'EOF' > main.cxx - - #include - #include - - ${toString (lib.genList (i: "extern \"C\" unsigned int asdf_${toString i}(void); ") count)} - - unsigned int (*funs[])(void) = { - ${toString (lib.genList (i: "asdf_${toString i},") count)} - }; - - int main(int argc, char **argv) { - bool ret; - unsigned int i = 0; - for (auto f : funs) { - if (f() != i++) { - std::cerr << "Failed to get expected response from function #" << i << std::endl; - return EXIT_FAILURE; - } - } - return EXIT_SUCCESS; - } - EOF - ''; - buildPhase = '' - $CXX -std=c++11 main.cxx ${toString (map (x: "-l${x.name}") sillyLibs)} -o ${prefix}-asdf - ''; - buildInputs = sillyLibs; - installPhase = '' - mkdir -p "$out/bin" - mv ${prefix}-asdf "$out/bin" - ''; - meta.platforms = lib.platforms.darwin; - }; - - }; - - good = makeBigExe clang-sierraHack-stdenv "good"; - - bad = makeBigExe clangStdenv "bad"; - -in stdenvNoCC.mkDerivation { - name = "macos-sierra-shared-test"; - buildInputs = [ good.finalExe bad.finalExe ]; - # TODO(@Ericson2314): Be impure or require exact MacOS version of builder? - buildCommand = '' - if bad-asdf &> /dev/null - then echo "WARNING: bad-asdf did not fail, not running on sierra?" >&2 - else echo "bad-asdf should fail on sierra, OK" >&2 - fi - - # Must succeed on all supported MacOS versions - good-asdf - echo "good-asdf should succeed on sierra, OK" - - touch $out - ''; - meta.platforms = lib.platforms.darwin; -} diff --git a/pkgs/test/make-binary-wrapper/add-flags.c b/pkgs/test/make-binary-wrapper/add-flags.c deleted file mode 100644 index 3ae8678d442..00000000000 --- a/pkgs/test/make-binary-wrapper/add-flags.c +++ /dev/null @@ -1,23 +0,0 @@ -#include -#include -#include - -int main(int argc, char **argv) { - char **argv_tmp = calloc(4 + argc + 2 + 1, sizeof(*argv_tmp)); - assert(argv_tmp != NULL); - argv_tmp[0] = argv[0]; - argv_tmp[1] = "-x"; - argv_tmp[2] = "-y"; - argv_tmp[3] = "-z"; - argv_tmp[4] = "-abc"; - for (int i = 1; i < argc; ++i) { - argv_tmp[4 + i] = argv[i]; - } - argv_tmp[4 + argc + 0] = "-foo"; - argv_tmp[4 + argc + 1] = "-bar"; - argv_tmp[4 + argc + 2] = NULL; - argv = argv_tmp; - - argv[0] = "/send/me/flags"; - return execv("/send/me/flags", argv); -} diff --git a/pkgs/test/make-binary-wrapper/add-flags.cmdline b/pkgs/test/make-binary-wrapper/add-flags.cmdline deleted file mode 100644 index f42d26f3adf..00000000000 --- a/pkgs/test/make-binary-wrapper/add-flags.cmdline +++ /dev/null @@ -1,3 +0,0 @@ - --append-flags "-foo -bar" \ - --add-flags "-x -y -z" \ - --add-flags -abc diff --git a/pkgs/test/make-binary-wrapper/add-flags.env b/pkgs/test/make-binary-wrapper/add-flags.env deleted file mode 100644 index 3626b8cf97b..00000000000 --- a/pkgs/test/make-binary-wrapper/add-flags.env +++ /dev/null @@ -1,8 +0,0 @@ -CWD=SUBST_CWD -SUBST_ARGV0 --x --y --z --abc --foo --bar diff --git a/pkgs/test/make-binary-wrapper/argv0.c b/pkgs/test/make-binary-wrapper/argv0.c deleted file mode 100644 index 70c36889dc8..00000000000 --- a/pkgs/test/make-binary-wrapper/argv0.c +++ /dev/null @@ -1,7 +0,0 @@ -#include -#include - -int main(int argc, char **argv) { - argv[0] = "alternative-name"; - return execv("/send/me/flags", argv); -} diff --git a/pkgs/test/make-binary-wrapper/argv0.cmdline b/pkgs/test/make-binary-wrapper/argv0.cmdline deleted file mode 100644 index 1cadce8312a..00000000000 --- a/pkgs/test/make-binary-wrapper/argv0.cmdline +++ /dev/null @@ -1 +0,0 @@ - --argv0 alternative-name diff --git a/pkgs/test/make-binary-wrapper/argv0.env b/pkgs/test/make-binary-wrapper/argv0.env deleted file mode 100644 index 04c13d32ee6..00000000000 --- a/pkgs/test/make-binary-wrapper/argv0.env +++ /dev/null @@ -1,2 +0,0 @@ -CWD=SUBST_CWD -alternative-name diff --git a/pkgs/test/make-binary-wrapper/basic.c b/pkgs/test/make-binary-wrapper/basic.c deleted file mode 100644 index 1c126618137..00000000000 --- a/pkgs/test/make-binary-wrapper/basic.c +++ /dev/null @@ -1,7 +0,0 @@ -#include -#include - -int main(int argc, char **argv) { - argv[0] = "/send/me/flags"; - return execv("/send/me/flags", argv); -} diff --git a/pkgs/test/make-binary-wrapper/basic.cmdline b/pkgs/test/make-binary-wrapper/basic.cmdline deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/pkgs/test/make-binary-wrapper/basic.env b/pkgs/test/make-binary-wrapper/basic.env deleted file mode 100644 index b0da3195944..00000000000 --- a/pkgs/test/make-binary-wrapper/basic.env +++ /dev/null @@ -1,2 +0,0 @@ -CWD=SUBST_CWD -SUBST_ARGV0 diff --git a/pkgs/test/make-binary-wrapper/chdir.c b/pkgs/test/make-binary-wrapper/chdir.c deleted file mode 100644 index 9e0b7e2c7f5..00000000000 --- a/pkgs/test/make-binary-wrapper/chdir.c +++ /dev/null @@ -1,11 +0,0 @@ -#include -#include -#include - -#define assert_success(e) do { if ((e) < 0) { perror(#e); abort(); } } while (0) - -int main(int argc, char **argv) { - assert_success(chdir("./tmp/foo")); - argv[0] = "/send/me/flags"; - return execv("/send/me/flags", argv); -} diff --git a/pkgs/test/make-binary-wrapper/chdir.cmdline b/pkgs/test/make-binary-wrapper/chdir.cmdline deleted file mode 100644 index d6ab081e8d3..00000000000 --- a/pkgs/test/make-binary-wrapper/chdir.cmdline +++ /dev/null @@ -1 +0,0 @@ - --chdir ./tmp/foo diff --git a/pkgs/test/make-binary-wrapper/chdir.env b/pkgs/test/make-binary-wrapper/chdir.env deleted file mode 100644 index ea1c61054e5..00000000000 --- a/pkgs/test/make-binary-wrapper/chdir.env +++ /dev/null @@ -1,2 +0,0 @@ -CWD=SUBST_CWD/tmp/foo -SUBST_ARGV0 diff --git a/pkgs/test/make-binary-wrapper/combination.c b/pkgs/test/make-binary-wrapper/combination.c deleted file mode 100644 index 8ce8a4722a0..00000000000 --- a/pkgs/test/make-binary-wrapper/combination.c +++ /dev/null @@ -1,53 +0,0 @@ -#define _GNU_SOURCE /* See feature_test_macros(7) */ -#include -#include -#include -#include - -#define assert_success(e) do { if ((e) < 0) { perror(#e); abort(); } } while (0) - -void set_env_prefix(char *env, char *sep, char *prefix) { - char *existing = getenv(env); - if (existing) { - char *val; - assert_success(asprintf(&val, "%s%s%s", prefix, sep, existing)); - assert_success(setenv(env, val, 1)); - free(val); - } else { - assert_success(setenv(env, prefix, 1)); - } -} - -void set_env_suffix(char *env, char *sep, char *suffix) { - char *existing = getenv(env); - if (existing) { - char *val; - assert_success(asprintf(&val, "%s%s%s", existing, sep, suffix)); - assert_success(setenv(env, val, 1)); - free(val); - } else { - assert_success(setenv(env, suffix, 1)); - } -} - -int main(int argc, char **argv) { - assert_success(setenv("MESSAGE", "HELLO", 0)); - set_env_prefix("PATH", ":", "/usr/bin/"); - set_env_suffix("PATH", ":", "/usr/local/bin/"); - putenv("MESSAGE2=WORLD"); - - char **argv_tmp = calloc(3 + argc + 0 + 1, sizeof(*argv_tmp)); - assert(argv_tmp != NULL); - argv_tmp[0] = argv[0]; - argv_tmp[1] = "-x"; - argv_tmp[2] = "-y"; - argv_tmp[3] = "-z"; - for (int i = 1; i < argc; ++i) { - argv_tmp[3 + i] = argv[i]; - } - argv_tmp[3 + argc + 0] = NULL; - argv = argv_tmp; - - argv[0] = "my-wrapper"; - return execv("/send/me/flags", argv); -} diff --git a/pkgs/test/make-binary-wrapper/combination.cmdline b/pkgs/test/make-binary-wrapper/combination.cmdline deleted file mode 100644 index fb3861235c8..00000000000 --- a/pkgs/test/make-binary-wrapper/combination.cmdline +++ /dev/null @@ -1,6 +0,0 @@ - --argv0 my-wrapper \ - --set-default MESSAGE HELLO \ - --prefix PATH : /usr/bin/ \ - --suffix PATH : /usr/local/bin/ \ - --add-flags "-x -y -z" \ - --set MESSAGE2 WORLD diff --git a/pkgs/test/make-binary-wrapper/combination.env b/pkgs/test/make-binary-wrapper/combination.env deleted file mode 100644 index 886420c01d1..00000000000 --- a/pkgs/test/make-binary-wrapper/combination.env +++ /dev/null @@ -1,8 +0,0 @@ -MESSAGE=HELLO -PATH=/usr/bin/:/usr/local/bin/ -MESSAGE2=WORLD -CWD=SUBST_CWD -my-wrapper --x --y --z diff --git a/pkgs/test/make-binary-wrapper/cross.nix b/pkgs/test/make-binary-wrapper/cross.nix deleted file mode 100644 index 36758086b92..00000000000 --- a/pkgs/test/make-binary-wrapper/cross.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ stdenv -, runCommand -, makeBinaryWrapper -, binutils -, expectedArch ? stdenv.hostPlatform.parsed.cpu.name -}: - -runCommand "make-binary-wrapper-test-cross" { - nativeBuildInputs = [ - makeBinaryWrapper - binutils - ]; - inherit expectedArch; -} '' - touch prog - chmod +x prog - makeWrapper prog $out - read -r _ arch < <($READELF --file-header $out | grep Machine:) - if [[ ''${arch,,} != *"''${expectedArch,,}"* ]]; then - echo "expected $expectedArch, got $arch" - exit 1 - fi -'' diff --git a/pkgs/test/make-binary-wrapper/default.nix b/pkgs/test/make-binary-wrapper/default.nix deleted file mode 100644 index 4c6fffd100a..00000000000 --- a/pkgs/test/make-binary-wrapper/default.nix +++ /dev/null @@ -1,61 +0,0 @@ -{ lib -, stdenv -, pkgsCross -, makeBinaryWrapper -, writeText -, runCommand -, runCommandCC -}: - -let - env = { nativeBuildInputs = [ makeBinaryWrapper ]; }; - envCheck = runCommandCC "envcheck" env '' - cc -Wall -Werror -Wpedantic -o $out ${./envcheck.c} - ''; - makeGoldenTest = testname: runCommand "make-binary-wrapper-test-${testname}" env '' - mkdir -p tmp/foo # for the chdir test - - params=$(<"${./.}/${testname}.cmdline") - eval "makeCWrapper /send/me/flags $params" > wrapper.c - - diff wrapper.c "${./.}/${testname}.c" - - if [ -f "${./.}/${testname}.env" ]; then - eval "makeWrapper ${envCheck} wrapped $params" - env -i ./wrapped > env.txt - sed "s#SUBST_ARGV0#${envCheck}#;s#SUBST_CWD#$PWD#" \ - "${./.}/${testname}.env" > golden-env.txt - if ! diff env.txt golden-env.txt; then - echo "env/argv should be:" - cat golden-env.txt - echo "env/argv output is:" - cat env.txt - exit 1 - fi - else - # without a golden env, we expect the wrapper compilation to fail - ! eval "makeWrapper ${envCheck} wrapped $params" &> error.txt - fi - - cp wrapper.c $out - ''; - tests = lib.genAttrs [ - "add-flags" - "argv0" - "basic" - "chdir" - "combination" - "env" - "inherit-argv0" - "invalid-env" - "overlength-strings" - "prefix" - "suffix" - ] makeGoldenTest // lib.optionalAttrs (! stdenv.isDarwin) { - cross = pkgsCross.${if stdenv.buildPlatform.isAarch64 then "gnu64" else "aarch64-multiplatform"}.callPackage ./cross.nix { }; - }; -in - -writeText "make-binary-wrapper-tests" '' - ${lib.concatStringsSep "\n" (builtins.attrValues tests)} -'' // tests diff --git a/pkgs/test/make-binary-wrapper/env.c b/pkgs/test/make-binary-wrapper/env.c deleted file mode 100644 index 7e0422dee3b..00000000000 --- a/pkgs/test/make-binary-wrapper/env.c +++ /dev/null @@ -1,14 +0,0 @@ -#include -#include -#include - -#define assert_success(e) do { if ((e) < 0) { perror(#e); abort(); } } while (0) - -int main(int argc, char **argv) { - putenv("PART1=HELLO"); - assert_success(setenv("PART2", "WORLD", 0)); - assert_success(unsetenv("SOME_OTHER_VARIABLE")); - putenv("PART3=\"!!\n\""); - argv[0] = "/send/me/flags"; - return execv("/send/me/flags", argv); -} diff --git a/pkgs/test/make-binary-wrapper/env.cmdline b/pkgs/test/make-binary-wrapper/env.cmdline deleted file mode 100644 index 3c89f33e2dc..00000000000 --- a/pkgs/test/make-binary-wrapper/env.cmdline +++ /dev/null @@ -1,4 +0,0 @@ - --set PART1 HELLO \ - --set-default PART2 WORLD \ - --unset SOME_OTHER_VARIABLE \ - --set PART3 $'"!!\n"' diff --git a/pkgs/test/make-binary-wrapper/env.env b/pkgs/test/make-binary-wrapper/env.env deleted file mode 100644 index c7661e165e0..00000000000 --- a/pkgs/test/make-binary-wrapper/env.env +++ /dev/null @@ -1,6 +0,0 @@ -PART1=HELLO -PART2=WORLD -PART3="!! -" -CWD=SUBST_CWD -SUBST_ARGV0 diff --git a/pkgs/test/make-binary-wrapper/envcheck.c b/pkgs/test/make-binary-wrapper/envcheck.c deleted file mode 100644 index 848fbdaa80f..00000000000 --- a/pkgs/test/make-binary-wrapper/envcheck.c +++ /dev/null @@ -1,22 +0,0 @@ -#include -#include -#include - -int main(int argc, char **argv, char **envp) { - for (char **env = envp; *env != 0; ++env) { - puts(*env); - } - - char cwd[PATH_MAX]; - if (getcwd(cwd, sizeof(cwd))) { - printf("CWD=%s\n", cwd); - } else { - perror("getcwd() error"); - return 1; - } - - for (int i=0; i < argc; ++i) { - puts(argv[i]); - } - return 0; -} diff --git a/pkgs/test/make-binary-wrapper/inherit-argv0.c b/pkgs/test/make-binary-wrapper/inherit-argv0.c deleted file mode 100644 index e1c2bc926aa..00000000000 --- a/pkgs/test/make-binary-wrapper/inherit-argv0.c +++ /dev/null @@ -1,6 +0,0 @@ -#include -#include - -int main(int argc, char **argv) { - return execv("/send/me/flags", argv); -} diff --git a/pkgs/test/make-binary-wrapper/inherit-argv0.cmdline b/pkgs/test/make-binary-wrapper/inherit-argv0.cmdline deleted file mode 100644 index 08807679983..00000000000 --- a/pkgs/test/make-binary-wrapper/inherit-argv0.cmdline +++ /dev/null @@ -1 +0,0 @@ - --inherit-argv0 diff --git a/pkgs/test/make-binary-wrapper/inherit-argv0.env b/pkgs/test/make-binary-wrapper/inherit-argv0.env deleted file mode 100644 index c46ca95eefb..00000000000 --- a/pkgs/test/make-binary-wrapper/inherit-argv0.env +++ /dev/null @@ -1,2 +0,0 @@ -CWD=SUBST_CWD -./wrapped diff --git a/pkgs/test/make-binary-wrapper/invalid-env.c b/pkgs/test/make-binary-wrapper/invalid-env.c deleted file mode 100644 index 4dfd36fb68a..00000000000 --- a/pkgs/test/make-binary-wrapper/invalid-env.c +++ /dev/null @@ -1,14 +0,0 @@ -#include -#include -#include - -#define assert_success(e) do { if ((e) < 0) { perror(#e); abort(); } } while (0) - -int main(int argc, char **argv) { - putenv("==TEST1"); - #error Illegal environment variable name `=` (cannot contain `=`) - assert_success(setenv("", "TEST2", 0)); - #error Environment variable name can't be empty. - argv[0] = "/send/me/flags"; - return execv("/send/me/flags", argv); -} diff --git a/pkgs/test/make-binary-wrapper/invalid-env.cmdline b/pkgs/test/make-binary-wrapper/invalid-env.cmdline deleted file mode 100644 index a03b001e754..00000000000 --- a/pkgs/test/make-binary-wrapper/invalid-env.cmdline +++ /dev/null @@ -1,2 +0,0 @@ - --set "=" "TEST1" \ - --set-default "" "TEST2" diff --git a/pkgs/test/make-binary-wrapper/overlength-strings.c b/pkgs/test/make-binary-wrapper/overlength-strings.c deleted file mode 100644 index 579705d33e9..00000000000 --- a/pkgs/test/make-binary-wrapper/overlength-strings.c +++ /dev/null @@ -1,25 +0,0 @@ -#define _GNU_SOURCE /* See feature_test_macros(7) */ -#include -#include -#include -#include - -#define assert_success(e) do { if ((e) < 0) { perror(#e); abort(); } } while (0) - -void set_env_prefix(char *env, char *sep, char *prefix) { - char *existing = getenv(env); - if (existing) { - char *val; - assert_success(asprintf(&val, "%s%s%s", prefix, sep, existing)); - assert_success(setenv(env, val, 1)); - free(val); - } else { - assert_success(setenv(env, prefix, 1)); - } -} - -int main(int argc, char **argv) { - set_env_prefix("PATH", ":", "/nix/store/00000000000000000000000000000000-loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"); - argv[0] = "/send/me/flags"; - return execv("/send/me/flags", argv); -} diff --git a/pkgs/test/make-binary-wrapper/overlength-strings.cmdline b/pkgs/test/make-binary-wrapper/overlength-strings.cmdline deleted file mode 100644 index 686abbb1cdb..00000000000 --- a/pkgs/test/make-binary-wrapper/overlength-strings.cmdline +++ /dev/null @@ -1 +0,0 @@ - --prefix PATH : /nix/store/00000000000000000000000000000000-loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong diff --git a/pkgs/test/make-binary-wrapper/overlength-strings.env b/pkgs/test/make-binary-wrapper/overlength-strings.env deleted file mode 100644 index 83a02f5f834..00000000000 --- a/pkgs/test/make-binary-wrapper/overlength-strings.env +++ /dev/null @@ -1,3 +0,0 @@ -PATH=/nix/store/00000000000000000000000000000000-loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong -CWD=SUBST_CWD -SUBST_ARGV0 diff --git a/pkgs/test/make-binary-wrapper/prefix.c b/pkgs/test/make-binary-wrapper/prefix.c deleted file mode 100644 index ea8fbdc64a8..00000000000 --- a/pkgs/test/make-binary-wrapper/prefix.c +++ /dev/null @@ -1,26 +0,0 @@ -#define _GNU_SOURCE /* See feature_test_macros(7) */ -#include -#include -#include -#include - -#define assert_success(e) do { if ((e) < 0) { perror(#e); abort(); } } while (0) - -void set_env_prefix(char *env, char *sep, char *prefix) { - char *existing = getenv(env); - if (existing) { - char *val; - assert_success(asprintf(&val, "%s%s%s", prefix, sep, existing)); - assert_success(setenv(env, val, 1)); - free(val); - } else { - assert_success(setenv(env, prefix, 1)); - } -} - -int main(int argc, char **argv) { - set_env_prefix("PATH", ":", "/usr/bin/"); - set_env_prefix("PATH", ":", "/usr/local/bin/"); - argv[0] = "/send/me/flags"; - return execv("/send/me/flags", argv); -} diff --git a/pkgs/test/make-binary-wrapper/prefix.cmdline b/pkgs/test/make-binary-wrapper/prefix.cmdline deleted file mode 100644 index 99cebf9503f..00000000000 --- a/pkgs/test/make-binary-wrapper/prefix.cmdline +++ /dev/null @@ -1,2 +0,0 @@ - --prefix PATH : /usr/bin/ \ - --prefix PATH : /usr/local/bin/ diff --git a/pkgs/test/make-binary-wrapper/prefix.env b/pkgs/test/make-binary-wrapper/prefix.env deleted file mode 100644 index 033676457c5..00000000000 --- a/pkgs/test/make-binary-wrapper/prefix.env +++ /dev/null @@ -1,3 +0,0 @@ -PATH=/usr/local/bin/:/usr/bin/ -CWD=SUBST_CWD -SUBST_ARGV0 diff --git a/pkgs/test/make-binary-wrapper/suffix.c b/pkgs/test/make-binary-wrapper/suffix.c deleted file mode 100644 index d33f86c070c..00000000000 --- a/pkgs/test/make-binary-wrapper/suffix.c +++ /dev/null @@ -1,26 +0,0 @@ -#define _GNU_SOURCE /* See feature_test_macros(7) */ -#include -#include -#include -#include - -#define assert_success(e) do { if ((e) < 0) { perror(#e); abort(); } } while (0) - -void set_env_suffix(char *env, char *sep, char *suffix) { - char *existing = getenv(env); - if (existing) { - char *val; - assert_success(asprintf(&val, "%s%s%s", existing, sep, suffix)); - assert_success(setenv(env, val, 1)); - free(val); - } else { - assert_success(setenv(env, suffix, 1)); - } -} - -int main(int argc, char **argv) { - set_env_suffix("PATH", ":", "/usr/bin/"); - set_env_suffix("PATH", ":", "/usr/local/bin/"); - argv[0] = "/send/me/flags"; - return execv("/send/me/flags", argv); -} diff --git a/pkgs/test/make-binary-wrapper/suffix.cmdline b/pkgs/test/make-binary-wrapper/suffix.cmdline deleted file mode 100644 index 95d291f3c16..00000000000 --- a/pkgs/test/make-binary-wrapper/suffix.cmdline +++ /dev/null @@ -1,2 +0,0 @@ - --suffix PATH : /usr/bin/ \ - --suffix PATH : /usr/local/bin/ diff --git a/pkgs/test/make-binary-wrapper/suffix.env b/pkgs/test/make-binary-wrapper/suffix.env deleted file mode 100644 index 3ce4cc54de4..00000000000 --- a/pkgs/test/make-binary-wrapper/suffix.env +++ /dev/null @@ -1,3 +0,0 @@ -PATH=/usr/bin/:/usr/local/bin/ -CWD=SUBST_CWD -SUBST_ARGV0 diff --git a/pkgs/test/make-hardcode-gsettings-patch/default.nix b/pkgs/test/make-hardcode-gsettings-patch/default.nix deleted file mode 100644 index 6c5d2318c6d..00000000000 --- a/pkgs/test/make-hardcode-gsettings-patch/default.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ runCommandLocal -, git -, clang-tools -, makeHardcodeGsettingsPatch -}: - -let - mkTest = - { - name, - expected, - src, - schemaIdToVariableMapping, - }: - - let - patch = makeHardcodeGsettingsPatch { - inherit src schemaIdToVariableMapping; - }; - in - runCommandLocal - "makeHardcodeGsettingsPatch-tests-${name}" - - { - nativeBuildInputs = [ - git - clang-tools - ]; - } - - '' - cp -r --no-preserve=all "${src}" src - cp -r --no-preserve=all "${expected}" src-expected - - pushd src - patch < "${patch}" - popd - - find src -name '*.c' -print0 | while read -d $'\0' sourceFile; do - sourceFile=''${sourceFile#src/} - clang-format -style='{BasedOnStyle: InheritParentConfig, ColumnLimit: 240}' -i "src/$sourceFile" "src-expected/$sourceFile" - git diff --no-index "src/$sourceFile" "src-expected/$sourceFile" | cat - done - touch "$out" - ''; -in -{ - basic = mkTest { - name = "basic"; - src = ./fixtures/example-project; - schemaIdToVariableMapping = { - "org.gnome.evolution-data-server.addressbook" = "EDS"; - "org.gnome.evolution.calendar" = "EVO"; - "org.gnome.seahorse.nautilus.window" = "SEANAUT"; - }; - expected = ./fixtures/example-project-patched; - }; -} diff --git a/pkgs/test/make-hardcode-gsettings-patch/fixtures/example-project-patched/main.c b/pkgs/test/make-hardcode-gsettings-patch/fixtures/example-project-patched/main.c deleted file mode 100644 index 7822a42b840..00000000000 --- a/pkgs/test/make-hardcode-gsettings-patch/fixtures/example-project-patched/main.c +++ /dev/null @@ -1,85 +0,0 @@ -#include -#include - -void schema_id_literal() { - GSettings *settings; - { - g_autoptr(GSettingsSchemaSource) schema_source; - g_autoptr(GSettingsSchema) schema; - schema_source = g_settings_schema_source_new_from_directory("@EDS@", g_settings_schema_source_get_default(), TRUE, NULL); - schema = g_settings_schema_source_lookup(schema_source, "org.gnome.evolution-data-server.addressbook", FALSE); - settings = g_settings_new_full(schema, NULL, NULL); - } - g_object_unref(settings); -} - -#define SELF_UID_PATH_ID "org.gnome.evolution-data-server.addressbook" -int schema_id_from_constant() { - GSettings *settings; - { - g_autoptr(GSettingsSchemaSource) schema_source; - g_autoptr(GSettingsSchema) schema; - schema_source = g_settings_schema_source_new_from_directory("@EDS@", g_settings_schema_source_get_default(), TRUE, NULL); - schema = g_settings_schema_source_lookup(schema_source, SELF_UID_PATH_ID, FALSE); - settings = g_settings_new_full(schema, NULL, NULL); - } - g_object_unref(settings); -} - -void schema_id_autoptr() { - g_autoptr(GSettings) settings = NULL; - { - g_autoptr(GSettingsSchemaSource) schema_source; - g_autoptr(GSettingsSchema) schema; - schema_source = g_settings_schema_source_new_from_directory("@EVO@", g_settings_schema_source_get_default(), TRUE, NULL); - schema = g_settings_schema_source_lookup(schema_source, "org.gnome.evolution.calendar", FALSE); - settings = g_settings_new_full(schema, NULL, NULL); - } -} - -void schema_id_with_backend() { - GSettings *settings; - { - g_autoptr(GSettingsSchemaSource) schema_source; - g_autoptr(GSettingsSchema) schema; - schema_source = g_settings_schema_source_new_from_directory("@EDS@", g_settings_schema_source_get_default(), TRUE, NULL); - schema = g_settings_schema_source_lookup(schema_source, "org.gnome.evolution-data-server.addressbook", FALSE); - settings = g_settings_new_full(schema, g_settings_backend_get_default(), NULL); - } - g_object_unref(settings); -} - -void schema_id_with_backend_and_path() { - GSettings *settings; - { - g_autoptr(GSettingsSchemaSource) schema_source; - g_autoptr(GSettingsSchema) schema; - schema_source = g_settings_schema_source_new_from_directory("@SEANAUT@", g_settings_schema_source_get_default(), TRUE, NULL); - schema = g_settings_schema_source_lookup(schema_source, "org.gnome.seahorse.nautilus.window", FALSE); - settings = g_settings_new_full(schema, g_settings_backend_get_default(), "/org/gnome/seahorse/nautilus/windows/123/"); - } - g_object_unref(settings); -} - -void schema_id_with_path() { - GSettings *settings; - { - g_autoptr(GSettingsSchemaSource) schema_source; - g_autoptr(GSettingsSchema) schema; - schema_source = g_settings_schema_source_new_from_directory("@SEANAUT@", g_settings_schema_source_get_default(), TRUE, NULL); - schema = g_settings_schema_source_lookup(schema_source, "org.gnome.seahorse.nautilus.window", FALSE); - settings = g_settings_new_full(schema, NULL, "/org/gnome/seahorse/nautilus/windows/123/"); - } - g_object_unref(settings); -} - -int main() { - schema_id_literal(); - schema_id_from_constant(); - schema_id_autoptr(); - schema_id_with_backend(); - schema_id_with_backend_and_path(); - schema_id_with_path(); - - return 0; -} diff --git a/pkgs/test/make-hardcode-gsettings-patch/fixtures/example-project/main.c b/pkgs/test/make-hardcode-gsettings-patch/fixtures/example-project/main.c deleted file mode 100644 index afcb3686ec8..00000000000 --- a/pkgs/test/make-hardcode-gsettings-patch/fixtures/example-project/main.c +++ /dev/null @@ -1,49 +0,0 @@ -#include -#include - -void schema_id_literal() { - GSettings *settings; - settings = g_settings_new("org.gnome.evolution-data-server.addressbook"); - g_object_unref(settings); -} - -#define SELF_UID_PATH_ID "org.gnome.evolution-data-server.addressbook" -int schema_id_from_constant() { - GSettings *settings; - settings = g_settings_new(SELF_UID_PATH_ID); - g_object_unref(settings); -} - -void schema_id_autoptr() { - g_autoptr(GSettings) settings = NULL; - settings = g_settings_new("org.gnome.evolution.calendar"); -} - -void schema_id_with_backend() { - GSettings *settings; - settings = g_settings_new_with_backend("org.gnome.evolution-data-server.addressbook", g_settings_backend_get_default()); - g_object_unref(settings); -} - -void schema_id_with_backend_and_path() { - GSettings *settings; - settings = g_settings_new_with_backend_and_path("org.gnome.seahorse.nautilus.window", g_settings_backend_get_default(), "/org/gnome/seahorse/nautilus/windows/123/"); - g_object_unref(settings); -} - -void schema_id_with_path() { - GSettings *settings; - settings = g_settings_new_with_path("org.gnome.seahorse.nautilus.window", "/org/gnome/seahorse/nautilus/windows/123/"); - g_object_unref(settings); -} - -int main() { - schema_id_literal(); - schema_id_from_constant(); - schema_id_autoptr(); - schema_id_with_backend(); - schema_id_with_backend_and_path(); - schema_id_with_path(); - - return 0; -} diff --git a/pkgs/test/make-wrapper/default.nix b/pkgs/test/make-wrapper/default.nix deleted file mode 100644 index 5cc7cee5a86..00000000000 --- a/pkgs/test/make-wrapper/default.nix +++ /dev/null @@ -1,139 +0,0 @@ -{ lib -, writeText -, writeCBin -, writeShellScript -, makeWrapper -, runCommand -, which -, ... -}: - -let - # Testfiles - foofile = writeText "foofile" "foo"; - barfile = writeText "barfile" "bar"; - - # Wrapped binaries - wrappedArgv0 = writeCBin "wrapped-argv0" '' - #include - #include - - void main(int argc, char** argv) { - printf("argv0=%s", argv[0]); - exit(0); - } - ''; - wrappedBinaryVar = writeShellScript "wrapped-var" '' - echo "VAR=$VAR" - ''; - wrappedBinaryArgs = writeShellScript "wrapped-args" '' - echo "$@" - ''; - - mkWrapperBinary = { name, args, wrapped ? wrappedBinaryVar }: runCommand name - { - nativeBuildInputs = [ makeWrapper ]; - } '' - mkdir -p $out/bin - makeWrapper "${wrapped}" "$out/bin/${name}" ${lib.escapeShellArgs args} - ''; - - mkTest = cmd: toExpect: '' - output="$(${cmd})" - if [[ "$output" != '${toExpect}' ]]; then - echo "test failed: the output of ${cmd} was '$output', expected '${toExpect}'" - echo "the wrapper contents:" - for i in ${cmd}; do - if [[ $i =~ ^test- ]]; then - cat $(which $i) - fi - done - exit 1 - fi - ''; -in -runCommand "make-wrapper-test" -{ - nativeBuildInputs = [ - which - (mkWrapperBinary { name = "test-argv0"; args = [ "--argv0" "foo" ]; wrapped = "${wrappedArgv0}/bin/wrapped-argv0"; }) - (mkWrapperBinary { name = "test-set"; args = [ "--set" "VAR" "abc" ]; }) - (mkWrapperBinary { name = "test-set-default"; args = [ "--set-default" "VAR" "abc" ]; }) - (mkWrapperBinary { name = "test-unset"; args = [ "--unset" "VAR" ]; }) - (mkWrapperBinary { name = "test-run"; args = [ "--run" "echo bar" ]; }) - (mkWrapperBinary { name = "test-run-and-set"; args = [ "--run" "export VAR=foo" "--set" "VAR" "bar" ]; }) - (mkWrapperBinary { name = "test-args"; args = [ "--add-flags" "abc" "--append-flags" "xyz" ]; wrapped = wrappedBinaryArgs; }) - (mkWrapperBinary { name = "test-prefix"; args = [ "--prefix" "VAR" ":" "abc" ]; }) - (mkWrapperBinary { name = "test-prefix-noglob"; args = [ "--prefix" "VAR" ":" "./*" ]; }) - (mkWrapperBinary { name = "test-suffix"; args = [ "--suffix" "VAR" ":" "abc" ]; }) - (mkWrapperBinary { name = "test-prefix-and-suffix"; args = [ "--prefix" "VAR" ":" "foo" "--suffix" "VAR" ":" "bar" ]; }) - (mkWrapperBinary { name = "test-prefix-multi"; args = [ "--prefix" "VAR" ":" "abc:foo:foo" ]; }) - (mkWrapperBinary { name = "test-suffix-each"; args = [ "--suffix-each" "VAR" ":" "foo bar:def" ]; }) - (mkWrapperBinary { name = "test-prefix-each"; args = [ "--prefix-each" "VAR" ":" "foo bar:def" ]; }) - (mkWrapperBinary { name = "test-suffix-contents"; args = [ "--suffix-contents" "VAR" ":" "${foofile} ${barfile}" ]; }) - (mkWrapperBinary { name = "test-prefix-contents"; args = [ "--prefix-contents" "VAR" ":" "${foofile} ${barfile}" ]; }) - ]; -} - ( - # --argv0 works - mkTest "test-argv0" "argv0=foo" - - # --set works - + mkTest "test-set" "VAR=abc" - # --set overwrites the variable - + mkTest "VAR=foo test-set" "VAR=abc" - # --set-default works - + mkTest "test-set-default" "VAR=abc" - # --set-default doesn"t overwrite the variable - + mkTest "VAR=foo test-set-default" "VAR=foo" - # --unset works - + mkTest "VAR=foo test-unset" "VAR=" - - # --add-flags and --append-flags work - + mkTest "test-args" "abc xyz" - # given flags are kept - + mkTest "test-args foo" "abc foo xyz" - - # --run works - + mkTest "test-run" "bar\nVAR=" - # --run & --set works - + mkTest "test-run-and-set" "VAR=bar" - - # --prefix works - + mkTest "VAR=foo test-prefix" "VAR=abc:foo" - # sets variable if not set yet - + mkTest "test-prefix" "VAR=abc" - # prepends value only once - + mkTest "VAR=abc test-prefix" "VAR=abc" - # Moves value to the front if it already existed - + mkTest "VAR=foo:abc test-prefix" "VAR=abc:foo" - + mkTest "VAR=abc:foo:bar test-prefix-multi" "VAR=abc:foo:bar" - # Doesn't overwrite parts of the string - + mkTest "VAR=test:abcde:test test-prefix" "VAR=abc:test:abcde:test" - # Only append the value once when given multiple times in a parameter - # to makeWrapper - + mkTest "test-prefix" "VAR=abc" - # --prefix doesn't expand globs - + mkTest "VAR=f?oo test-prefix-noglob" "VAR=./*:f?oo" - - - # --suffix works - + mkTest "VAR=foo test-suffix" "VAR=foo:abc" - # sets variable if not set yet - + mkTest "test-suffix" "VAR=abc" - # adds the same value only once - + mkTest "VAR=abc test-suffix" "VAR=abc" - + mkTest "VAR=abc:foo test-suffix" "VAR=abc:foo" - # --prefix in combination with --suffix - + mkTest "VAR=abc test-prefix-and-suffix" "VAR=foo:abc:bar" - - # --suffix-each works - + mkTest "VAR=abc test-suffix-each" "VAR=abc:foo:bar:def" - # --prefix-each works - + mkTest "VAR=abc test-prefix-each" "VAR=bar:def:foo:abc" - # --suffix-contents works - + mkTest "VAR=abc test-suffix-contents" "VAR=abc:foo:bar" - # --prefix-contents works - + mkTest "VAR=abc test-prefix-contents" "VAR=bar:foo:abc" - + "touch $out" - ) diff --git a/pkgs/test/nixos-functions/default.nix b/pkgs/test/nixos-functions/default.nix deleted file mode 100644 index bdd5e3c6d8b..00000000000 --- a/pkgs/test/nixos-functions/default.nix +++ /dev/null @@ -1,31 +0,0 @@ -/* - -This file is a test that makes sure that the `pkgs.nixos` and -`pkgs.testers.nixosTest` functions work. It's far from a perfect test suite, -but better than not checking them at all on hydra. - -To run this test: - - nixpkgs$ nix-build -A tests.nixos-functions - - */ -{ pkgs, lib, stdenv, ... }: - -let - dummyVersioning = { - revision = "test"; - versionSuffix = "test"; - label = "test"; - }; -in lib.optionalAttrs stdenv.hostPlatform.isLinux ( - pkgs.recurseIntoAttrs { - - nixos-test = (pkgs.nixos { - system.nixos = dummyVersioning; - boot.loader.grub.enable = false; - fileSystems."/".device = "/dev/null"; - system.stateVersion = lib.trivial.release; - }).toplevel; - - } -) diff --git a/pkgs/test/overriding.nix b/pkgs/test/overriding.nix deleted file mode 100644 index edc1b27cf4f..00000000000 --- a/pkgs/test/overriding.nix +++ /dev/null @@ -1,56 +0,0 @@ -{ lib, pkgs, stdenvNoCC }: - -let - tests = - let - p = pkgs.python3Packages.xpybutil.overridePythonAttrs (_: { dontWrapPythonPrograms = true; }); - in - [ - ({ - name = "overridePythonAttrs"; - expr = !lib.hasInfix "wrapPythonPrograms" p.postFixup; - expected = true; - }) - ({ - name = "repeatedOverrides-pname"; - expr = repeatedOverrides.pname == "a-better-hello-with-blackjack"; - expected = true; - }) - ({ - name = "repeatedOverrides-entangled-pname"; - expr = repeatedOverrides.entangled.pname == "a-better-figlet-with-blackjack"; - expected = true; - }) - ]; - - addEntangled = origOverrideAttrs: f: - origOverrideAttrs ( - lib.composeExtensions f (self: super: { - passthru = super.passthru // { - entangled = super.passthru.entangled.overrideAttrs f; - overrideAttrs = addEntangled self.overrideAttrs; - }; - }) - ); - - entangle = pkg1: pkg2: pkg1.overrideAttrs (self: super: { - passthru = super.passthru // { - entangled = pkg2; - overrideAttrs = addEntangled self.overrideAttrs; - }; - }); - - example = entangle pkgs.hello pkgs.figlet; - - overrides1 = example.overrideAttrs (_: super: { pname = "a-better-${super.pname}"; }); - - repeatedOverrides = overrides1.overrideAttrs (_: super: { pname = "${super.pname}-with-blackjack"; }); -in - -stdenvNoCC.mkDerivation { - name = "test-overriding"; - passthru = { inherit tests; }; - buildCommand = '' - touch $out - '' + lib.concatMapStringsSep "\n" (t: "([[ ${lib.boolToString t.expr} == ${lib.boolToString t.expected} ]] && echo '${t.name} success') || (echo '${t.name} fail' && exit 1)") tests; -} diff --git a/pkgs/test/php/default.nix b/pkgs/test/php/default.nix deleted file mode 100644 index 3c6c8f61b6d..00000000000 --- a/pkgs/test/php/default.nix +++ /dev/null @@ -1,116 +0,0 @@ -{ lib -, php -, runCommand -}: - -let - runTest = name: body: runCommand name { } '' - testFailed= - checking() { - echo -n "Checking $1... " > /dev/stderr - } - ok() { - echo ok > /dev/stderr - } - nok() { - echo fail > /dev/stderr - testFailed=1 - } - - ${body} - - if test -n "$testFailed"; then - exit 1 - fi - - touch $out - ''; - - check = cond: if cond then "ok" else "nok"; -in -{ - withExtensions-enables-previously-disabled-extensions = runTest "php-test-withExtensions-enables-previously-disabled-extensions" '' - php="${php}" - - checking "that imagick is not present by default" - $php/bin/php -r 'exit(extension_loaded("imagick") ? 1 : 0);' && ok || nok - - phpWithImagick="${php.withExtensions ({ all, ... }: [ all.imagick ])}" - checking "that imagick extension is present when enabled" - $phpWithImagick/bin/php -r 'exit(extension_loaded("imagick") ? 0 : 1);' && ok || nok - ''; - - overrideAttrs-preserves-enabled-extensions = - let - customPhp = - (php.withExtensions ({ all, ... }: [ all.imagick ])).overrideAttrs (attrs: { - postInstall = attrs.postInstall or "" + '' - touch "$out/oApee-was-here" - ''; - }); - in - runTest "php-test-overrideAttrs-preserves-enabled-extensions" '' - php="${customPhp}" - phpUnwrapped="${customPhp.unwrapped}" - - checking "if overrides took hold" - test -f "$phpUnwrapped/oApee-was-here" && ok || nok - - checking "if imagick extension is still present" - $php/bin/php -r 'exit(extension_loaded("imagick") ? 0 : 1);' && ok || nok - - checking "if imagick extension is linked against the overridden PHP" - echo $php - $php/bin/php -r 'exit(extension_loaded("imagick") ? 0 : 1);' && ok || nok - ''; - - unwrapped-overrideAttrs-stacks = - let - customPhp = - lib.pipe php.unwrapped [ - (pkg: pkg.overrideAttrs (attrs: { - postInstall = attrs.postInstall or "" + '' - touch "$out/oAs-first" - ''; - })) - - (pkg: pkg.overrideAttrs (attrs: { - postInstall = attrs.postInstall or "" + '' - touch "$out/oAs-second" - ''; - })) - ]; - in - runTest "php-test-unwrapped-overrideAttrs-stacks" '' - checking "if first override remained" - ${check (builtins.match ".*oAs-first.*" customPhp.postInstall != null)} - - checking "if second override is there" - ${check (builtins.match ".*oAs-second.*" customPhp.postInstall != null)} - ''; - - wrapped-overrideAttrs-stacks = - let - customPhp = - lib.pipe php [ - (pkg: pkg.overrideAttrs (attrs: { - postInstall = attrs.postInstall or "" + '' - touch "$out/oAs-first" - ''; - })) - - (pkg: pkg.overrideAttrs (attrs: { - postInstall = attrs.postInstall or "" + '' - touch "$out/oAs-second" - ''; - })) - ]; - in - runTest "php-test-wrapped-overrideAttrs-stacks" '' - checking "if first override remained" - ${check (builtins.match ".*oAs-first.*" customPhp.unwrapped.postInstall != null)} - - checking "if second override is there" - ${check (builtins.match ".*oAs-second.*" customPhp.unwrapped.postInstall != null)} - ''; -} diff --git a/pkgs/test/rust-sysroot/default.nix b/pkgs/test/rust-sysroot/default.nix deleted file mode 100644 index a5a1596504f..00000000000 --- a/pkgs/test/rust-sysroot/default.nix +++ /dev/null @@ -1,60 +0,0 @@ -{ lib, rust, rustPlatform, fetchFromGitHub }: - -let - mkBlogOsTest = target: rustPlatform.buildRustPackage rec { - name = "blog_os-sysroot-test"; - - src = fetchFromGitHub { - owner = "phil-opp"; - repo = "blog_os"; - rev = "4e38e7ddf8dd021c3cd7e4609dfa01afb827797b"; - sha256 = "0k9ipm9ddm1bad7bs7368wzzp6xwrhyfzfpckdax54l4ffqwljcg"; - }; - - cargoSha256 = "1x8iwgy1irgfkv2yjkxm6479nwbrk82b0c80jm7y4kw0s32r01lg"; - - inherit target; - - RUSTFLAGS = "-C link-arg=-nostartfiles"; - - # Tests don't work for `no_std`. See https://os.phil-opp.com/testing/ - doCheck = false; - - meta = with lib; { - description = "Test for using custom sysroots with buildRustPackage"; - maintainers = with maintainers; [ aaronjanse ]; - platforms = lib.platforms.x86_64; - }; - }; - - # The book uses rust-lld for linking, but rust-lld is not currently packaged for NixOS. - # The justification in the book for using rust-lld suggests that gcc can still be used for testing: - # > Instead of using the platform's default linker (which might not support Linux targets), - # > we use the cross platform LLD linker that is shipped with Rust for linking our kernel. - # https://github.com/phil-opp/blog_os/blame/7212ffaa8383122b1eb07fe1854814f99d2e1af4/blog/content/second-edition/posts/02-minimal-rust-kernel/index.md#L157 - targetContents = { - "llvm-target" = "x86_64-unknown-none"; - "data-layout" = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"; - "arch" = "x86_64"; - "target-endian" = "little"; - "target-pointer-width" = "64"; - "target-c-int-width" = "32"; - "os" = "none"; - "executables" = true; - "linker-flavor" = "gcc"; - "panic-strategy" = "abort"; - "disable-redzone" = true; - "features" = "-mmx,-sse,+soft-float"; - }; - -in { - blogOS-targetByFile = mkBlogOsTest (builtins.toFile "x86_64-blog_os.json" (builtins.toJSON targetContents)); - blogOS-targetByNix = let - plat = lib.systems.elaborate { config = "x86_64-none"; } // { - rustc = { - config = "x86_64-blog_os"; - platform = targetContents; - }; - }; - in mkBlogOsTest (rust.toRustTargetSpec plat); -} diff --git a/pkgs/test/simple/builder.sh b/pkgs/test/simple/builder.sh deleted file mode 100644 index 908faec3c38..00000000000 --- a/pkgs/test/simple/builder.sh +++ /dev/null @@ -1,43 +0,0 @@ -if [ -e .attrs.sh ]; then source .attrs.sh; fi -set -x - -export NIX_DEBUG=1 - -source $stdenv/setup - -export NIX_ENFORCE_PURITY=1 - -mkdir $out -mkdir $out/bin - -cat > hello.c < - -int main(int argc, char * * argv) -{ - printf("Hello World!\n"); - return 0; -} -EOF - -#gcc -I/nix/store/foo -I /nix/store/foo -I/usr/lib -I /usr/lib hello.c -o $out/bin/hello -gcc -I`pwd` -L /nix/store/abcd/lib -isystem /usr/lib hello.c -o $out/bin/hello - -$out/bin/hello - -cat > hello2.cc < - -int main(int argc, char * * argv) -{ - std::cout << "Hello World!\n"; - std::cout << VALUE << std::endl; - return 0; -} -EOF - -g++ hello2.cc -o $out/bin/hello2 -DVALUE="1 + 2 * 3" - -$out/bin/hello2 - -ld -v diff --git a/pkgs/test/stdenv-inputs/bar.c b/pkgs/test/stdenv-inputs/bar.c deleted file mode 100644 index 2d7299c2d46..00000000000 --- a/pkgs/test/stdenv-inputs/bar.c +++ /dev/null @@ -1,3 +0,0 @@ -unsigned int bar(void) { - return 42; -} diff --git a/pkgs/test/stdenv-inputs/cc-main.c b/pkgs/test/stdenv-inputs/cc-main.c deleted file mode 100644 index 06f28bc33c6..00000000000 --- a/pkgs/test/stdenv-inputs/cc-main.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main(int argc, char **argv) -{ - fprintf(stderr, "ok\n"); - return 0; -} diff --git a/pkgs/test/stdenv-inputs/default.nix b/pkgs/test/stdenv-inputs/default.nix deleted file mode 100644 index 6a2e441d019..00000000000 --- a/pkgs/test/stdenv-inputs/default.nix +++ /dev/null @@ -1,68 +0,0 @@ -{ lib, stdenv }: - -let - foo = stdenv.mkDerivation { - name = "foo-test"; - - dontUnpack = true; - - installPhase = '' - mkdir -p $out/bin $out/include $out/lib - $CC -o $out/bin/foo ${./cc-main.c} - chmod +x $out/bin/foo - cp ${./foo.c} $out/include/foo.h - $CC -shared \ - ${lib.optionalString stdenv.isDarwin "-Wl,-install_name,$out/lib/libfoo.dylib"} \ - -o $out/lib/libfoo${stdenv.hostPlatform.extensions.sharedLibrary} \ - ${./foo.c} - ''; - }; - - bar = stdenv.mkDerivation { - name = "bar-test"; - outputs = [ "out" "dev" ]; - - dontUnpack = true; - - installPhase = '' - mkdir -p $out/bin $dev/include $dev/lib - $CC -o $out/bin/bar ${./cc-main.c} - chmod +x $out/bin/bar - cp ${./bar.c} $dev/include/bar.h - $CC -shared \ - ${lib.optionalString stdenv.isDarwin "-Wl,-install_name,$dev/lib/libbar.dylib"} \ - -o $dev/lib/libbar${stdenv.hostPlatform.extensions.sharedLibrary} \ - ${./bar.c} - ''; - }; -in - -stdenv.mkDerivation { - name = "stdenv-inputs-test"; - phases = [ "buildPhase" ]; - - buildInputs = [ foo bar ]; - - buildPhase = '' - env - - printf "checking whether binaries are available... " >&2 - foo && bar - - printf "checking whether compiler can find headers... " >&2 - $CC -o include-check ${./include-main.c} - ./include-check - - printf "checking whether compiler can find headers... " >&2 - $CC -o include-check ${./include-main.c} - ./include-check - - printf "checking whether compiler can find libraries... " >&2 - $CC -lfoo -lbar -o lib-check ${./lib-main.c} - ./lib-check - - touch $out - ''; - - meta.platforms = lib.platforms.all; -} diff --git a/pkgs/test/stdenv-inputs/foo.c b/pkgs/test/stdenv-inputs/foo.c deleted file mode 100644 index 0253a26d5d2..00000000000 --- a/pkgs/test/stdenv-inputs/foo.c +++ /dev/null @@ -1,3 +0,0 @@ -unsigned int foo(void) { - return 42; -} diff --git a/pkgs/test/stdenv-inputs/include-main.c b/pkgs/test/stdenv-inputs/include-main.c deleted file mode 100644 index 35e5ee0d90f..00000000000 --- a/pkgs/test/stdenv-inputs/include-main.c +++ /dev/null @@ -1,13 +0,0 @@ -#include -#include -#include - -int main(int argc, char **argv) -{ - if (foo() != 42) - return 1; - if (bar() != 42) - return 1; - fprintf(stderr, "ok\n"); - return 0; -} diff --git a/pkgs/test/stdenv-inputs/lib-main.c b/pkgs/test/stdenv-inputs/lib-main.c deleted file mode 100644 index c9488fe43e5..00000000000 --- a/pkgs/test/stdenv-inputs/lib-main.c +++ /dev/null @@ -1,14 +0,0 @@ -#include - -extern unsigned int foo(void); -extern unsigned int bar(void); - -int main(int argc, char **argv) -{ - if (foo() != 42) - return 1; - if (bar() != 42) - return 1; - fprintf(stderr, "ok\n"); - return 0; -} diff --git a/pkgs/test/stdenv/default.nix b/pkgs/test/stdenv/default.nix deleted file mode 100644 index 7648b430c5f..00000000000 --- a/pkgs/test/stdenv/default.nix +++ /dev/null @@ -1,278 +0,0 @@ -# To run these tests: -# nix-build -A tests.stdenv - -{ stdenv -, pkgs -, lib -, testers -}: - -let - # early enough not to rebuild gcc but late enough to have patchelf - earlyPkgs = stdenv.__bootPackages.stdenv.__bootPackages; - earlierPkgs = stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages; - # use a early stdenv so when hacking on stdenv this test can be run quickly - bootStdenv = stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages.stdenv; - pkgsStructured = import pkgs.path { config = { structuredAttrsByDefault = true; }; inherit (stdenv.hostPlatform) system; }; - bootStdenvStructuredAttrsByDefault = pkgsStructured.stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages.stdenv; - - runCommand = earlierPkgs.runCommand; - - - ccWrapperSubstitutionsTest = { name, stdenv', extraAttrs ? { } }: - - stdenv'.cc.overrideAttrs (previousAttrs: ({ - inherit name; - - postFixup = previousAttrs.postFixup + '' - declare -p wrapperName - echo "env.wrapperName = $wrapperName" - [[ $wrapperName == "CC_WRAPPER" ]] || (echo "'\$wrapperName' was not 'CC_WRAPPER'" && false) - declare -p suffixSalt - echo "env.suffixSalt = $suffixSalt" - [[ $suffixSalt == "${stdenv'.cc.suffixSalt}" ]] || (echo "'\$suffxSalt' was not '${stdenv'.cc.suffixSalt}'" && false) - - grep -q "@out@" $out/bin/cc || echo "@out@ in $out/bin/cc was substituted" - grep -q "@suffixSalt@" $out/bin/cc && (echo "$out/bin/cc contains unsubstituted variables" && false) - - touch $out - ''; - } // extraAttrs)); - - testEnvAttrset = { name, stdenv', extraAttrs ? { } }: - stdenv'.mkDerivation - ({ - inherit name; - env = { - string = "testing-string"; - }; - - passAsFile = [ "buildCommand" ]; - buildCommand = '' - declare -p string - echo "env.string = $string" - [[ $string == "testing-string" ]] || (echo "'\$string' was not 'testing-string'" && false) - [[ "$(declare -p string)" == 'declare -x string="testing-string"' ]] || (echo "'\$string' was not exported" && false) - touch $out - ''; - } // extraAttrs); - - testPrependAndAppendToVar = { name, stdenv', extraAttrs ? { } }: - stdenv'.mkDerivation - ({ - inherit name; - env = { - string = "testing-string"; - }; - - passAsFile = [ "buildCommand" ] ++ lib.optionals (extraAttrs ? extraTest) [ "extraTest" ]; - buildCommand = '' - declare -p string - appendToVar string hello - # test that quoted strings work - prependToVar string "world" - declare -p string - - declare -A associativeArray=(["X"]="Y") - [[ $(appendToVar associativeArray "fail" 2>&1) =~ "trying to use" ]] || (echo "prependToVar did not catch prepending associativeArray" && false) - [[ $(prependToVar associativeArray "fail" 2>&1) =~ "trying to use" ]] || (echo "prependToVar did not catch prepending associativeArray" && false) - - [[ $string == "world testing-string hello" ]] || (echo "'\$string' was not 'world testing-string hello'" && false) - - # test appending to a unset variable - appendToVar nonExistant created hello - typeset -p nonExistant - if [[ -n $__structuredAttrs ]]; then - [[ "''${nonExistant[@]}" == "created hello" ]] - else - # there's a extra " " in front here and a extra " " in the end of prependToVar - # shouldn't matter because these functions will mostly be used for $*Flags and the Flag variable will in most cases already exit - [[ "$nonExistant" == " created hello" ]] - fi - - eval "$extraTest" - - touch $out - ''; - } // extraAttrs); - -in - -{ - # tests for hooks in `stdenv.defaultNativeBuildInputs` - hooks = lib.recurseIntoAttrs (import ./hooks.nix { stdenv = bootStdenv; pkgs = earlyPkgs; inherit lib; }); - - outputs-no-out = runCommand "outputs-no-out-assert" { - result = earlierPkgs.testers.testBuildFailure (bootStdenv.mkDerivation { - NIX_DEBUG = 1; - name = "outputs-no-out"; - outputs = ["foo"]; - buildPhase = ":"; - installPhase = '' - touch $foo - ''; - }); - - # Assumption: the first output* variable to be configured is - # _overrideFirst outputDev "dev" "out" - expectedMsg = "error: _assignFirst: could not find a non-empty variable whose name to assign to outputDev.\n The following variables were all unset or empty:\n dev out"; - } '' - grep -F "$expectedMsg" $result/testBuildFailure.log >/dev/null - touch $out - ''; - - test-env-attrset = testEnvAttrset { name = "test-env-attrset"; stdenv' = bootStdenv; }; - - # Test compatibility with derivations using `env` as a regular variable. - test-env-derivation = bootStdenv.mkDerivation rec { - name = "test-env-derivation"; - env = bootStdenv.mkDerivation { - name = "foo"; - buildCommand = '' - mkdir "$out" - touch "$out/bar" - ''; - }; - - passAsFile = [ "buildCommand" ]; - buildCommand = '' - declare -p env - [[ $env == "${env}" ]] - touch "$out" - ''; - }; - - test-prepend-append-to-var = testPrependAndAppendToVar { - name = "test-prepend-append-to-var"; - stdenv' = bootStdenv; - }; - - test-structured-env-attrset = testEnvAttrset { - name = "test-structured-env-attrset"; - stdenv' = bootStdenv; - extraAttrs = { __structuredAttrs = true; }; - }; - - test-cc-wrapper-substitutions = ccWrapperSubstitutionsTest { - name = "test-cc-wrapper-substitutions"; - stdenv' = bootStdenv; - }; - - structuredAttrsByDefault = lib.recurseIntoAttrs { - - hooks = lib.recurseIntoAttrs (import ./hooks.nix { stdenv = bootStdenvStructuredAttrsByDefault; pkgs = earlyPkgs; inherit lib; }); - - test-cc-wrapper-substitutions = ccWrapperSubstitutionsTest { - name = "test-cc-wrapper-substitutions-structuredAttrsByDefault"; - stdenv' = bootStdenvStructuredAttrsByDefault; - }; - - test-structured-env-attrset = testEnvAttrset { - name = "test-structured-env-attrset-structuredAttrsByDefault"; - stdenv' = bootStdenvStructuredAttrsByDefault; - }; - - test-prepend-append-to-var = testPrependAndAppendToVar { - name = "test-prepend-append-to-var-structuredAttrsByDefault"; - stdenv' = bootStdenvStructuredAttrsByDefault; - extraAttrs = { - # will be a bash indexed array in attrs.sh - # declare -a list=('a' 'b' ) - # and a json array in attrs.json - # "list":["a","b"] - list = [ "a" "b" ]; - # will be a bash associative array(dictionary) in attrs.sh - # declare -A array=(['a']='1' ['b']='2' ) - # and a json object in attrs.json - # {"array":{"a":"1","b":"2"} - array = { a = "1"; b = "2"; }; - extraTest = '' - declare -p array - array+=(["c"]="3") - declare -p array - - [[ "''${array[c]}" == "3" ]] || (echo "c element of '\$array' was not '3'" && false) - - declare -p list - prependToVar list hello - # test that quoted strings work - appendToVar list "world" - declare -p list - - [[ "''${list[0]}" == "hello" ]] || (echo "first element of '\$list' was not 'hello'" && false) - [[ "''${list[1]}" == "a" ]] || (echo "first element of '\$list' was not 'a'" && false) - [[ "''${list[-1]}" == "world" ]] || (echo "last element of '\$list' was not 'world'" && false) - ''; - }; - }; - - test-golden-example-structuredAttrs = - let - goldenSh = earlyPkgs.writeText "goldenSh" '' - declare -A EXAMPLE_ATTRS=(['foo']='bar' ) - declare EXAMPLE_BOOL_FALSE= - declare EXAMPLE_BOOL_TRUE=1 - declare EXAMPLE_INT=123 - declare EXAMPLE_INT_NEG=-123 - declare -a EXAMPLE_LIST=('foo' 'bar' ) - declare EXAMPLE_STR='foo bar' - ''; - goldenJson = earlyPkgs.writeText "goldenSh" '' - { - "EXAMPLE_ATTRS": { - "foo": "bar" - }, - "EXAMPLE_BOOL_FALSE": false, - "EXAMPLE_BOOL_TRUE": true, - "EXAMPLE_INT": 123, - "EXAMPLE_INT_NEG": -123, - "EXAMPLE_LIST": [ - "foo", - "bar" - ], - "EXAMPLE_NESTED_ATTRS": { - "foo": { - "bar": "baz" - } - }, - "EXAMPLE_NESTED_LIST": [ - [ - "foo", - "bar" - ], - [ - "baz" - ] - ], - "EXAMPLE_STR": "foo bar" - } - ''; - in - bootStdenvStructuredAttrsByDefault.mkDerivation { - name = "test-golden-example-structuredAttrsByDefault"; - nativeBuildInputs = [ earlyPkgs.jq ]; - - EXAMPLE_BOOL_TRUE = true; - EXAMPLE_BOOL_FALSE = false; - EXAMPLE_INT = 123; - EXAMPLE_INT_NEG = -123; - EXAMPLE_STR = "foo bar"; - EXAMPLE_LIST = [ "foo" "bar" ]; - EXAMPLE_NESTED_LIST = [ [ "foo" "bar" ] [ "baz" ] ]; - EXAMPLE_ATTRS = { foo = "bar"; }; - EXAMPLE_NESTED_ATTRS = { foo.bar = "baz"; }; - - inherit goldenSh; - inherit goldenJson; - - buildCommand = '' - mkdir -p $out - cat $NIX_ATTRS_SH_FILE | grep "EXAMPLE" | grep -v -E 'installPhase|jq' > $out/sh - jq 'with_entries(select(.key|match("EXAMPLE")))' $NIX_ATTRS_JSON_FILE > $out/json - diff $out/sh $goldenSh - diff $out/json $goldenJson - ''; - }; - - }; -} diff --git a/pkgs/test/stdenv/gcc-stageCompare.nix b/pkgs/test/stdenv/gcc-stageCompare.nix deleted file mode 100644 index e5c2ed5921b..00000000000 --- a/pkgs/test/stdenv/gcc-stageCompare.nix +++ /dev/null @@ -1,32 +0,0 @@ -# This test *must* be run prior to releasing any build of either stdenv or the -# gcc that it exports! This check should also be part of CI for any PR that -# causes a rebuild of `stdenv.cc`. -# -# When we used gcc's internal bootstrap it did this check as part of (and -# serially with) the gcc derivation. Now that we bootstrap externally this -# check can be done in parallel with any/all of stdenv's referrers. But we -# must remember to do the check. -# - -{ stdenv -, pkgs -, lib -}: - -assert stdenv.cc.isGNU; -with pkgs; -# rebuild gcc using the "final" stdenv -let gcc-stageCompare = (gcc-unwrapped.override { - reproducibleBuild = true; - profiledCompiler = false; - stdenv = overrideCC stdenv (wrapCCWith { - cc = stdenv.cc; - }); - }).overrideAttrs(_: { - NIX_OUTPATH_USED_AS_RANDOM_SEED = stdenv.cc.cc.out; - }); -in (runCommand "gcc-stageCompare" {} '' - diff -sr ${pkgs.gcc-unwrapped.checksum}/checksums ${gcc-stageCompare.checksum}/checksums && touch $out -'').overrideAttrs (a: { - meta = (a.meta or { }) // { platforms = lib.platforms.linux; }; -}) diff --git a/pkgs/test/stdenv/hooks.nix b/pkgs/test/stdenv/hooks.nix deleted file mode 100644 index ba5da511c6f..00000000000 --- a/pkgs/test/stdenv/hooks.nix +++ /dev/null @@ -1,136 +0,0 @@ -{ stdenv, pkgs, lib }: - -# ordering should match defaultNativeBuildInputs - -{ - # TODO: add audit-tmpdir - compress-man-pages = - let - manFile = pkgs.writeText "small-man" '' - .TH HELLO "1" "May 2022" "hello 2.12.1" "User Commands" - .SH NAME - hello - friendly greeting program - ''; - in - stdenv.mkDerivation { - name = "test-compress-man-pages"; - buildCommand = '' - mkdir -p $out/share/man - cp ${manFile} $out/share/man/small-man.1 - compressManPages $out - [[ -e $out/share/man/small-man.1.gz ]] - ''; - }; - make-symlinks-relative = stdenv.mkDerivation { - name = "test-make-symlinks-relative"; - outputs = [ "out" "man" ]; - buildCommand = '' - mkdir -p $out/{bar,baz} - mkdir -p $man/share/{x,y} - source1="$out/bar/foo" - destination1="$out/baz/foo" - source2="$man/share/x/file1" - destination2="$man/share/y/file2" - echo foo > $source1 - echo foo > $source2 - ln -s $source1 $destination1 - ln -s $source2 $destination2 - echo "symlink before patching: $(readlink $destination1)" - echo "symlink before patching: $(readlink $destination2)" - - _makeSymlinksRelativeInAllOutputs - - echo "symlink after patching: $(readlink $destination1)" - ([[ -e $destination1 ]] && echo "symlink isn't broken") || (echo "symlink is broken" && exit 1) - ([[ $(readlink $destination1) == "../bar/foo" ]] && echo "absolute symlink was made relative") || (echo "symlink was not made relative" && exit 1) - echo "symlink after patching: $(readlink $destination2)" - ([[ -e $destination2 ]] && echo "symlink isn't broken") || (echo "symlink is broken" && exit 1) - ([[ $(readlink $destination2) == "../x/file1" ]] && echo "absolute symlink was made relative") || (echo "symlink was not made relative" && exit 1) - ''; - }; - move-docs = stdenv.mkDerivation { - name = "test-move-docs"; - buildCommand = '' - mkdir -p $out/{man,doc,info} - touch $out/{man,doc,info}/foo - cat $out/{man,doc,info}/foo - - _moveToShare - - (cat $out/share/{man,doc,info}/foo 2>/dev/null && echo "man,doc,info were moved") || (echo "man,doc,info were not moved" && exit 1) - ''; - }; - move-lib64 = stdenv.mkDerivation { - name = "test-move-lib64"; - buildCommand = '' - mkdir -p $out/lib64 - touch $out/lib64/foo - cat $out/lib64/foo - - _moveLib64 - - # check symlink - [[ -h $out/lib64 ]] - ([[ -e $out/lib64 ]] && echo "symlink isn't broken") || (echo "symlink is broken" && exit 1) - [[ -e $out/lib/foo ]] - ''; - }; - move-sbin = stdenv.mkDerivation { - name = "test-move-sbin"; - buildCommand = '' - mkdir -p $out/sbin - touch $out/sbin/foo - cat $out/sbin/foo - - _moveSbin - - # check symlink - [[ -h $out/sbin ]] - ([[ -e $out/sbin ]] && echo "symlink isn't broken") || (echo "symlink is broken" && exit 1) - [[ -e $out/bin/foo ]] - ''; - }; - # TODO: add multiple-outputs - patch-shebangs = import ./patch-shebangs.nix { inherit stdenv lib pkgs; }; - prune-libtool-files = - let - libFoo = pkgs.writeText "libFoo" '' - # Generated by libtool (GNU libtool) 2.4.6 - old_library=''' - dependency_libs=' -Lbar.la -Lbaz.la' - ''; - in - stdenv.mkDerivation { - name = "test-prune-libtool-files"; - buildCommand = '' - mkdir -p $out/lib - cp ${libFoo} $out/lib/libFoo.la - _pruneLibtoolFiles - grep "^dependency_libs=''' #pruned" $out/lib/libFoo.la - # confirm file doesn't only contain the above - grep "^old_library='''" $out/lib/libFoo.la - ''; - }; - reproducible-builds = stdenv.mkDerivation { - name = "test-reproducible-builds"; - buildCommand = '' - # can't be tested more precisely because the value of random-seed changes depending on the output - [[ $env.NIX_CFLAGS_COMPILE =~ "-frandom-seed=" ]] - touch $out - ''; - }; - set-source-date-epoch-to-latest = stdenv.mkDerivation { - name = "test-set-source-date-epoch-to-latest"; - buildCommand = '' - sourceRoot=$NIX_BUILD_TOP/source - mkdir -p $sourceRoot - touch --date=1/1/2015 $sourceRoot/foo - - _updateSourceDateEpochFromSourceRoot - - [[ $SOURCE_DATE_EPOCH == "1420070400" ]] - touch $out - ''; - }; - # TODO: add strip -} diff --git a/pkgs/test/stdenv/patch-shebangs.nix b/pkgs/test/stdenv/patch-shebangs.nix deleted file mode 100644 index fb52f38ecc9..00000000000 --- a/pkgs/test/stdenv/patch-shebangs.nix +++ /dev/null @@ -1,98 +0,0 @@ -{ lib, stdenv, pkgs }: - -# since the tests are using a early stdenv, the stdenv will have dontPatchShebangs=1, so it has to be unset -# https://github.com/NixOS/nixpkgs/blob/768a982bfc9d29a6bd3beb963ed4b054451ce3d0/pkgs/stdenv/linux/default.nix#L148-L153 - -# strictDeps has to be disabled because the shell isn't in buildInputs - -let - tests = { - bad-shebang = stdenv.mkDerivation { - name = "bad-shebang"; - strictDeps = false; - dontUnpack = true; - installPhase = '' - mkdir -p $out/bin - echo "#!/bin/bash" > $out/bin/test - echo "echo -n hello" >> $out/bin/test - chmod +x $out/bin/test - dontPatchShebangs= - ''; - passthru = { - assertion = "grep '^#!${stdenv.shell}' $out/bin/test > /dev/null"; - }; - }; - - ignores-nix-store = stdenv.mkDerivation { - name = "ignores-nix-store"; - strictDeps = false; - dontUnpack = true; - installPhase = '' - mkdir -p $out/bin - echo "#!$NIX_STORE/path/to/bash" > $out/bin/test - echo "echo -n hello" >> $out/bin/test - chmod +x $out/bin/test - dontPatchShebangs= - ''; - passthru = { - assertion = "grep \"^#!$NIX_STORE/path/to/bash\" $out/bin/test > /dev/null"; - }; - }; - - split-string = stdenv.mkDerivation { - name = "split-string"; - strictDeps = false; - dontUnpack = true; - installPhase = '' - mkdir -p $out/bin - echo "#!/usr/bin/env -S bash --posix" > $out/bin/test - echo "echo -n hello" >> $out/bin/test - chmod +x $out/bin/test - dontPatchShebangs= - ''; - passthru = { - assertion = "grep -v '^#!${pkgs.coreutils}/bin/env -S ${stdenv.shell} --posix' $out/bin/test > /dev/null"; - }; - }; - - }; -in -stdenv.mkDerivation { - name = "test-patch-shebangs"; - passthru = { inherit (tests) bad-shebang ignores-nix-store split-string; }; - buildCommand = '' - validate() { - local name=$1 - local testout=$2 - local assertion=$3 - - echo -n "... $name: " >&2 - - local rc=0 - (out=$testout eval "$assertion") || rc=1 - - if [ "$rc" -eq 0 ]; then - echo "yes" >&2 - else - echo "no" >&2 - fi - - return "$rc" - } - - echo "checking whether patchShebangs works properly... ">&2 - - fail= - ${lib.concatStringsSep "\n" (lib.mapAttrsToList (_: test: '' - validate "${test.name}" "${test}" ${lib.escapeShellArg test.assertion} || fail=1 - '') tests)} - - if [ "$fail" ]; then - echo "failed" - exit 1 - else - echo "succeeded" - touch $out - fi - ''; -} diff --git a/pkgs/test/texlive/default.nix b/pkgs/test/texlive/default.nix deleted file mode 100644 index 5e0369f4db4..00000000000 --- a/pkgs/test/texlive/default.nix +++ /dev/null @@ -1,202 +0,0 @@ -{ lib, runCommand, fetchurl, file, texlive, writeShellScript }: - -{ - - tlpdbNix = runCommand "texlive-test-tlpdb-nix" { - nixpkgsTlpdbNix = ../../tools/typesetting/tex/texlive/tlpdb.nix; - tlpdbNix = texlive.tlpdb.nix; - } - '' - mkdir -p "$out" - diff -u "''${nixpkgsTlpdbNix}" "''${tlpdbNix}" | tee "$out/tlpdb.nix.patch" - ''; - - opentype-fonts = runCommand "texlive-test-opentype" { - nativeBuildInputs = [ - (with texlive; combine { inherit scheme-medium libertinus-fonts; }) - ]; - input = builtins.toFile "opentype-testfile.tex" '' - \documentclass{article} - \usepackage{fontspec} - \setmainfont{Libertinus Serif} - \begin{document} - \LaTeX{} is great - \end{document} - ''; - } - '' - export HOME="$(mktemp -d)" - # We use the same testfile to test two completely different - # font discovery mechanisms, both of which were once broken: - # - lualatex uses its own luaotfload script (#220228) - # - xelatex uses fontconfig (#228196) - # both of the following two commands need to succeed. - lualatex -halt-on-error "$input" - xelatex -halt-on-error "$input" - echo success > $out - ''; - - chktex = runCommand "texlive-test-chktex" { - nativeBuildInputs = [ - (with texlive; combine { inherit scheme-infraonly chktex; }) - ]; - input = builtins.toFile "chktex-sample.tex" '' - \documentclass{article} - \begin{document} - \LaTeX is great - \end{document} - ''; - } '' - chktex -v -nall -w1 "$input" 2>&1 | tee "$out" - grep "One warning printed" "$out" - ''; - - dvipng = lib.recurseIntoAttrs { - # https://github.com/NixOS/nixpkgs/issues/75605 - basic = runCommand "texlive-test-dvipng-basic" { - nativeBuildInputs = [ file texlive.combined.scheme-medium ]; - input = fetchurl { - name = "test_dvipng.tex"; - url = "http://git.savannah.nongnu.org/cgit/dvipng.git/plain/test_dvipng.tex?id=b872753590a18605260078f56cbd6f28d39dc035"; - sha256 = "1pjpf1jvwj2pv5crzdgcrzvbmn7kfmgxa39pcvskl4pa0c9hl88n"; - }; - } '' - cp "$input" ./document.tex - - latex document.tex - dvipng -T tight -strict -picky document.dvi - for f in document*.png; do - file "$f" | tee output - grep PNG output - done - - mkdir "$out" - mv document*.png "$out"/ - ''; - - # test dvipng's limited capability to render postscript specials via GS - ghostscript = runCommand "texlive-test-ghostscript" { - nativeBuildInputs = [ file (with texlive; combine { inherit scheme-small dvipng; }) ]; - input = builtins.toFile "postscript-sample.tex" '' - \documentclass{minimal} - \begin{document} - Ni - \special{ps: - newpath - 0 0 moveto - 7 7 rlineto - 0 7 moveto - 7 -7 rlineto - stroke - showpage - } - \end{document} - ''; - gs_trap = writeShellScript "gs_trap.sh" '' - exit 1 - ''; - } '' - cp "$gs_trap" ./gs - export PATH=$PWD:$PATH - # check that the trap works - gs && exit 1 - - cp "$input" ./document.tex - - latex document.tex - dvipng -T 1in,1in -strict -picky document.dvi - for f in document*.png; do - file "$f" | tee output - grep PNG output - done - - mkdir "$out" - mv document*.png "$out"/ - ''; - }; - - # https://github.com/NixOS/nixpkgs/issues/75070 - dvisvgm = runCommand "texlive-test-dvisvgm" { - nativeBuildInputs = [ file texlive.combined.scheme-medium ]; - input = builtins.toFile "dvisvgm-sample.tex" '' - \documentclass{article} - \begin{document} - mwe - \end{document} - ''; - } '' - cp "$input" ./document.tex - - latex document.tex - dvisvgm document.dvi -n -o document_dvi.svg - cat document_dvi.svg - file document_dvi.svg | grep SVG - - pdflatex document.tex - dvisvgm -P document.pdf -n -o document_pdf.svg - cat document_pdf.svg - file document_pdf.svg | grep SVG - - mkdir "$out" - mv document*.svg "$out"/ - ''; - - texdoc = runCommand "texlive-test-texdoc" { - nativeBuildInputs = [ - (with texlive; combine { - inherit scheme-infraonly luatex texdoc; - pkgFilter = pkg: lib.elem pkg.tlType [ "run" "bin" "doc" ]; - }) - ]; - } '' - texdoc --version - - texdoc --debug --list texdoc | tee "$out" - grep texdoc.pdf "$out" - ''; - - # test that language files are generated as expected - hyphen-base = runCommand "texlive-test-hyphen-base" { - hyphenBase = lib.head texlive.hyphen-base.pkgs; - schemeFull = texlive.combined.scheme-full; - schemeInfraOnly = texlive.combined.scheme-infraonly; - } '' - mkdir -p "$out"/{scheme-infraonly,scheme-full} - - # create language files with no hyphenation patterns - cat "$hyphenBase"/tex/generic/config/language.us >language.dat - cat "$hyphenBase"/tex/generic/config/language.us.def >language.def - cat "$hyphenBase"/tex/generic/config/language.us.lua >language.dat.lua - - cat >>language.dat.lua <>language.def <